louiscad
02/21/2019, 10:17 PMjs
target and a dependency to the js stdlib, but when I run the build
gradle task, I get the following error:
org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures.
...
...
Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':modules:bitflags:compileKotlinJs'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
...
...
... 6 more
Caused by: java.lang.NoSuchMethodError: org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments.setCommonSources([Ljava/lang/String;)V
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runJsCompilerAsync(GradleKotlinCompilerRunner.kt:297)
at org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile.callCompilerAsync$kotlin_gradle_plugin(Tasks.kt:566)
at org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile.callCompilerAsync$kotlin_gradle_plugin(Tasks.kt:476)
Here's the link to the gradle.kts file of the module I'm trying to build: https://github.com/LouisCAD/Splitties/blob/baaf3548141ac5f8e631b5f858cc9ce25bfa2cbe/modules/bitflags/build.gradle.kts#L28
and here's the buildSrc
it depends on:
https://github.com/LouisCAD/Splitties/tree/baaf3548141ac5f8e631b5f858cc9ce25bfa2cbe/buildSrc
I'm using Kotlin 1.3.21 with Gradle 4.10.1, and AGP 3.3.1 for the Android part.Dico
02/21/2019, 10:46 PMDico
02/21/2019, 10:46 PMDico
02/21/2019, 10:49 PMlouiscad
02/22/2019, 7:00 AMlouiscad
02/22/2019, 8:47 AMbuild.gradle.kts
file resolved my issue:
configurations.all {
val isKotlinCompiler = name == "embeddedKotlin" || name.startsWith("kotlin") || name.startsWith("kapt")
if (!isKotlinCompiler) {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlin" && requested.module.name == "kotlin-compiler-embeddable") {
useVersion("1.3.21") // Update to whatever the Kotlin version you need is
}
}
}
}
janvladimirmostert
02/22/2019, 1:54 PMDico
02/22/2019, 2:21 PMjanvladimirmostert
02/22/2019, 2:36 PMnapperley
02/22/2019, 7:10 PM