alexhelder
08/21/2025, 1:02 AMTeodora Mihaila
08/21/2025, 12:14 PMrewrite-kotlin module I get the following error:
Caused by: java.lang.NoSuchMethodError: 'org.jetbrains.kotlin.buildtools.api.jvm.ClasspathEntrySnapshot org.jetbrains.kotlin.buildtools.api.CompilationService.calculateClasspathSnapshot(java.io.File, org.jetbrains.kotlin.buildtools.api.jvm.ClassSnapshotGranularity, boolean)'
along with the following warning:
w: ⚠️ 'org.jetbrains.kotlin:kotlin-compiler-embeddable' Artifact Present in Build Classpath
The artifact `org.jetbrains.kotlin:kotlin-compiler-embeddable` is present in the build classpath along Kotlin Gradle plugin.
This may lead to unpredictable and inconsistent behavior.
I think it's important mentioning that I get when same error even when just trying to upgrade from Kotlin 1.9.25 to 2.2.0 in the main repo without the changes from the PR.
From what I understand the cause of the error is a transitive dependency from the Kotlin Gradle plugin that introduces an older version on the build class path.
So far I have tried to fix this by doing the following:
1. Exploring the config files for any hardcoded old Kotlin version, but nothing was found.
2. Commenting out the dependencies in the build.gradle.kts file of rewrite-kotlin module to prevent transitive leaks. Nothing changed.
3. Using the following command: ./gradlew :rewrite-kotlin:dependencies | grep -A 5 "kotlin-compiler-embeddable" to check which version of kotlin-compiler-embeddable was Gradle resolving. The versions all appeared to match the set Kotlin language version.
4. Disabled classpath snapshots into gradle.properties by adding: kotlin.incremental.useClasspathSnapshot=false . Nothing changed.
5. Testing multiple Gradle/JDK combinations: Gradle versions between 8.14.3 & 9.0.0 with JDK 17, 21, 23, 24. Nothing changed.
Does anyone have any pointers on what could be going wrong and how to fix it?tapchicoma
08/21/2025, 3:38 PMDavid Herman
08/22/2025, 7:13 AMflorent
08/22/2025, 7:55 PMCLOVIS
08/23/2025, 1:09 PMkotlin {
js {
compilerOptions {
target.set("es2015")
}
}
}
How can I get which target is set from within a Gradle plugin?
The only thing I see is project.kotlinExtension.sourceSets but that doesn't seem to have that option.Yongjun Hong
08/26/2025, 12:26 PMlicense field
• Redefined required fields
• Completed the documentation
You can check the updates and download the latest plugin here:
• https://plugins.gradle.org/plugin/io.github.yonggoose.maven.central.utility.plugin.check
• https://plugins.gradle.org/plugin/io.github.yonggoose.maven.central.utility.plugin.project
• https://plugins.gradle.org/plugin/io.github.yonggoose.maven.central.utility.plugin.setting
• Release notes: https://github.com/YongGoose/Maven-Central-utility-plugins-for-Gradle/releases/tag/v0.1.7
For usage instructions, you can refer to the docs directory for a simple guide:
https://github.com/YongGoose/Maven-Central-utility-plugins-for-Gradle/tree/main/docs
I’d really appreciate it if you could try it out and share your feedback!
Special thanks to my mentor @Oleg Nenashev for continuous guidance and support throughout the project 🙏Justin Tullgren
08/28/2025, 10:11 PMwithPluginClasspath method to include the gradle plugin under test while also having a test set up that uses a plugin in the gradle plugin portal?
We have a set of gradle plugins that set conventions on other plugins, for example the kotlin jvm plugin. To test them we build up a test build.gradle.kts file with our plugin under test id AND a real kotlin plugin. However if we use withPluginClasspath then testkit can’t find the kotlin plugin.Emilio Colindres
08/31/2025, 10:57 PMDownloading com.android.library.gradle.plugin-8.11.1.pom...
and eventually fails with
Plugin [id: 'com.android.library', version: '8.11.1'] was not found in any of the following sources:
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.library', version: '8.11.1'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (could not resolve plugin artifact 'com.android.library:com.android.library.gradle.plugin:8.11.1')
Searched in the following repositories:
Google
MavenRepo
Gradle Central Plugin Repository
at org.gradle.plugin.use.resolve.internal.PluginResolutionResult.getFound(PluginResolutionResult.java:112)
at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolvePluginRequest(DefaultPluginRequestApplicator.java:197)
at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugins(DefaultPluginRequestApplicator.java:101)
at org.gradle.kotlin.dsl.provider.PluginRequestsHandler.handle(PluginRequestsHandler.kt:45)
at org.gradle.kotlin.dsl.provider.StandardKotlinScriptEvaluator$InterpreterHost.applyPluginsTo(KotlinScriptEvaluator.kt:242)
at org.gradle.kotlin.dsl.execution.Interpreter$ProgramHost.applyPluginsTo(Interpreter.kt:387)
at Program.execute(Unknown Source)
at org.gradle.kotlin.dsl.execution.Interpreter$ProgramHost.eval(Interpreter.kt:516)
I've tried clearing global and local gradle caches, intellij caches, reinstalling intellij, restarting mac, turning vpn on and off since it was on the first time it happened, and nothing works. I've even tried a completely fresh project from scratch and it still didn't work
At this point i'm thinking google's maven repo might be down? because https://maven.google.com/web/index.html shows no libraries. but i've never visited the site before so idk if that's the case. Does any one have any ideas here?Lukáš Kúšik
09/02/2025, 11:39 AMcom.android.internal.application plugin causing this, in an afterEvaluate task..
But the clue ends there, could anyone point me on how to go further and how to investigate which afterEvaluate it is? Thanks!Edoardo Luppi
09/10/2025, 5:28 PMtargets {
configureEach {
tasks.named(targetName + "SourcesJar").configure {
dependsOn(generateCharsets)
}
}
}
With 2.2.20, I was getting a deprecation message that says:
> [DEPRECATION] 'targets(TargetsFromPresetExtension.() -> Unit): Unit' is deprecated. Usages of this DSL are deprecated, please migrate to top-level 'kotlin {}' extension.
After a bit of searching on my own I figured out that I just had to use:
targets.configureEach {
tasks.named(targetName + "SourcesJar").configure {
dependsOn(generateCharsets)
}
}
The deprecation definitely did not help. It seems too generic to be honest.Eugen Martynov
09/12/2025, 2:45 PMplugins {
kotlin("plugin.power-assert") version "2.0.0"
}
So it is probably something to do with kotlin compile task in the convention pluginLeon Linhart
09/15/2025, 9:22 AMDefaultTask > MyAbstractBaseTask > MyTask > MyTask_Decorated (generated by Gradle), inside MyAbstractBaseTask I've observed:
println(this@MyAbstractBaseTask::class.supertypes) // [MyAbstractBaseTask]
println(this@MyAbstractBaseTask.javaClass.superclass) // MyTask
Is this expected?Meet
09/17/2025, 9:37 AM.gradle and .gradle.kts files into Kotlin data classes?Piotr Krzemiński
09/18/2025, 7:16 AMAn exception occurred applying plugin request [id: 'buildsrc.conventions.lang.kotlin-multiplatform']
> Failed to apply plugin 'buildsrc.conventions.lang.kotlin-multiplatform'.
> Future was not completed yet 'Kotlin Plugin Lifecycle: (root project 'snakeyaml-engine-kmp') stage 'EvaluateBuildscript''
Full logs here. I cannot reproduce locally, although admittedly I have a Mac, and the build works fine on a MacOS worker.
Is anyone else seeing this as well? Or having a Linux/Windows machine where it reproduces?ursus
09/19/2025, 8:32 PMumbrella modules?
Say umbrella consists of 10 modules and that is cached.
If one module changes, would I still get a cache hit on the 9, even if its exposed to ios via the umbrella?Piotr Krzemiński
09/21/2025, 3:37 PMeygraber
09/21/2025, 4:32 PMGRADLE_OPTS env var:
-Dkotlin.incremental=false
I'm guessing that's not actually doing anything because -D is a meant for JVM properties, but is there any chance that's getting forwarded to KGP?mbonnin
09/22/2025, 9:47 AMagp-9) that contributes the main jar but does not leak its compileOnly dependencies to the main compilation?
• If I use main.associateWith(agp-9) , the dependencies are automatically added
• I can configure the dependencies manually but then internal declarations are not seen from main, I'm guessing because of friendSourceSets
Is there a way?Oliver.O
09/24/2025, 9:54 AMandroidUnitTest dependency's symbols are not found during clean testReleaseUnitTest, unless the dependency is removed, testReleaseUnitTest is executed again, the dependency is re-added, after which testReleaseUnitTest succeeds. Does this ring a bell to anyone? Details in 🧵.Said Shatila
09/26/2025, 3:30 PM/**
* Minimal Hilt convention:
* - Applies Hilt Gradle plugin and KSP
* - Wires hilt-android + hilt-compiler (KSP)
* Assumes the module already applies com.android.* and kotlin-android outside.
*/
class AndroidHiltConventionPlugin : Plugin<Project> {
override fun apply(target: Project) = with(target) {
// Apply external plugins to the target project
pluginManager.apply("com.google.dagger.hilt.android")
pluginManager.apply("com.google.devtools.ksp")
// Access the root version catalog named "libs"
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
dependencies {
add("implementation", libs.findLibrary("hilt-android").get())
add("ksp", libs.findLibrary("hilt-android-compiler").get())
}
}
}
My register in build.gradle for build logic.
register("androidHilt") {
id = "com.yinzcam.android.hilt"
implementationClass = "yinz.cam.build_logic.conventions.AndroidHiltConventionPlugin"
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlinVersion = "2.1.0"
ext.kotlinCoroutinesVersion = '1.6.4'
ext.kotlinSerializationVersion = '1.0.1'
ext.dokkaVersion = "0.10.1"
def gradlePluginVersion = "8.9.1"
def hiltVersion = '2.57'
def kspVersion = '2.1.0-1.0.29'
repositories {
google()
mavenCentral()
mavenLocal()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$gradlePluginVersion"
classpath 'com.google.gms:google-services:4.3.14'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$project.ext.kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:5.2.5"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3"
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:$project.ext.kotlinVersion"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hiltVersion"
classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:$kspVersion"
}
}
plugins {
alias(libs.plugins.hilt) apply false
}
This build.gradle is the one that is outside for all of the project and the main module app since the app isn't modularized still
and this is the one responsible for dependencies and inner plugins
buildscript {
repositories {
google()
mavenCentral()
mavenLocal()
jcenter()
flatDir {
dirs 'libs'
}
}
dependencies {
classpath "com.android.tools.build:gradle:$project.ext.gradlePluginVersion"
classpath "com.google.firebase:firebase-appdistribution-gradle:$project.ext.firebaseGradlePlugin"
}
}
apply plugin: 'com.android.application'
apply plugin: 'project-report'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlinx-serialization'
apply plugin: 'com.google.firebase.appdistribution'
apply plugin: "com.google.android.libraries.mapsplatform.secrets-gradle-plugin"
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
apply plugin: 'org.jetbrains.kotlin.plugin.serialization'
//apply plugin: 'com.google.devtools.ksp'
//apply plugin: 'com.google.dagger.hilt.android'
here where I commented apply plugin --> Up.
I was trying to add my hilt plugin -->
plugin {
id ("com.yinzcam.android.hilt")
}
but it's not detecting it any idea about it
line: 17
An exception occurred applying plugin request [id: 'com.yinzcam.android.hilt']
> Failed to apply plugin 'com.yinzcam.android.hilt'.
> Configuration with name 'implementation' not found.loke
09/28/2025, 2:22 PMmohamed rejeb
09/29/2025, 10:15 AMmbonnin
09/30/2025, 8:52 AMPHondogo
10/01/2025, 8:54 AMmbonnin
10/01/2025, 12:16 PMfun foo(action: Action<Bar>) {
TODO()
}
/**
* Overload for Kotlin callers
*/
fun foo(action: Bar.() -> Unit) {
TODO()
}
Is it really that important to transform the lambda parameter in a receiver? If I really want to, isn't it the whole point of the sam-with-receiver plugin? Are there any upsides to do this?Slackbot
10/01/2025, 5:02 PMGuilherme Delgado
10/13/2025, 9:59 AMMaksym M.
10/16/2025, 2:33 PMorg.jetbrains.kotlin.plugin.parcelize?
Specifically the class that is being called via apply when we put this dependency in plugins { } block of a build fileRicardo C.
10/22/2025, 2:16 PMkotlin {
sourceSets {
androidMain {
dependencies {
api(projects.core.initializers.api)
}
}
}
}
> Task :core:initializers:api:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :core:initializers:api:processResources UP-TO-DATE
> Task :core:initializers:api:compileKotlin
> Task :core:initializers:api:compileJava NO-SOURCE
> Task :core:initializers:api:classes UP-TO-DATE
> Task :core:initializers:api:jar UP-TO-DATE
I could not find anything about it, but it does not seem normal to run them before task execution phase. Any idea what could it be?