ianbrandt
05/06/2019, 4:54 AM> Task :buildSrc:compileKotlin FAILED
e: multi-kotlin-project/buildSrc/src/main/kotlin/kotlin-project.gradle.kts: (2, 22): Unresolved reference: kotlin
e: multi-kotlin-project/buildSrc/src/main/kotlin/kotlin-project.gradle.kts: (9, 2): Unresolved reference: implementation
e: multi-kotlin-project/buildSrc/src/main/kotlin/kotlin-project.gradle.kts: (13, 11): Unresolved reference: KotlinCompile
e: multi-kotlin-project/buildSrc/src/main/kotlin/kotlin-project.gradle.kts: (13, 26): Type mismatch: inferred type is () -> TypeVariable(_L) but Class<TypeVariable(S)> was expected
e: multi-kotlin-project/buildSrc/src/main/kotlin/kotlin-project.gradle.kts: (14, 3): Unresolved reference: kotlinOptions
The intent is to have a multi-project build where standardized Kotlin, Java, etc. plugins and configuration can be mixed into child projects as needed.
Any ideas as to what I'm doing wrong?mkobit
05/06/2019, 2:17 PMbuildSrc
so they are available on the classpath
i think https://github.com/gradle/gradle/issues/9240 is the right open issue to provide better compiler output when trying to declare the version
so in buildSrc/build.gradle.kts
you have something like
dependencies {
// taken from <https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm>
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31")
}
https://github.com/gradle/gradle/issues/9282 is for improving the dependency declaration
then, in your kotlin-project.gradle.kts
just omit the version
plugins {
kotlin("jvm")
}
ianbrandt
05/06/2019, 11:01 PM