Hugo Costa
04/17/2024, 11:32 AMFAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileKotlin'.
> Could not isolate parameters org.jetbrains.kotlin.gradle.internal.transforms.BuildToolsApiClasspathEntrySnapshotTransform$Parameters_Decorated@2fc73041 of artifact transform BuildToolsApiClasspathEntrySnapshotTransform
> Could not isolate value org.jetbrains.kotlin.gradle.internal.transforms.BuildToolsApiClasspathEntrySnapshotTransform$Parameters_Decorated@2fc73041 of type BuildToolsApiClasspathEntrySnapshotTransform.Parameters
> Could not resolve all files for configuration ':kotlinBuildToolsApiClasspath'.
> Could not find org.jetbrains.kotlin:kotlin-build-tools-impl:2.0.0-RC1.
Searched in the following locations:
I find it strange, as I do not see any direct dependency on org.jetbrains.kotlin:kotlin-build-tools-impl
anywhere. Is it just something we should manually take a dependency on?tapchicoma
04/17/2024, 3:21 PMHugo Costa
04/17/2024, 3:23 PMtapchicoma
04/17/2024, 3:26 PMCould not find find org.jetbrains.kotlinkotlin build tools impl2.0.0-RC1If you are not using
mavenCentral()
- be sure to add this dependency in your artifactoryAlexander.Likhachev
04/17/2024, 3:27 PMkotlin.incremental.useClasspathSnapshot=false
to your gradle.properties, would it work fine?
Also, maybe you have dependency filtering on the repository declaration side?Hugo Costa
04/17/2024, 3:28 PMmavenCentral()
internally unfortunately. Has this become a requirement in 2.0.0? We have several projects with 1.9.23 where this has never been requested. I see this package was created for 1.9.0Alexander.Likhachev
04/17/2024, 3:29 PMHugo Costa
04/17/2024, 3:32 PMmavenCentral()
, so I'm mostly trying to understand if this is a Kotlin issue or an Amazon one.
I'm going to try to add kotlin-build-tools-impl
as a runtime dependency of the KGP. Me specifically adding it, would it be something that you think might break some behaviour?Hugo Costa
04/17/2024, 3:36 PM* What went wrong:
Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':kotlinCompilerPluginClasspathMain'.
> Could not find org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.0-RC1.
Hugo Costa
04/17/2024, 3:38 PMkotlin-scripting-compiler-embeddable
is not declared as a dependency of the plugin either, which is likely why our internal solution is not providing itHugo Costa
04/17/2024, 3:47 PMorg.jetbrains.kotlin:kotlin-build-tools-impl:2.0.0-RC1
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.0-RC1
as a runtime dependency of the KGP, it actually ends up building everything as expected.
Would you consider having these as explicit runtime dependencies in Maven? It would solve my use casetapchicoma
04/17/2024, 3:59 PMWould you consider having these as explicit runtime dependencies in Maven?Yes, they are part of our tooling
Hugo Costa
04/17/2024, 4:01 PMtapchicoma
04/17/2024, 4:10 PMHugo Costa
04/17/2024, 4:14 PMuseClasspathSnapshot
means you require either one or the other right? Would it be possible to mark them as optional then? Similar to what is currently done in https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin-idea/2.0.0-RC1Chris Lee
04/18/2024, 4:25 PMHugo Costa
04/18/2024, 4:29 PM