joney
12/07/2022, 2:58 PMjava.lang.UnsupportedOperationException: Unsupported receiver value: Cxt { context(org.gradle.api.Project) [...]
Chris Lee
12/07/2022, 3:06 PM// afterEvaluate required as kotlin dsl plugin sets its defaults in afterEvaluate
// <https://github.com/gradle/gradle/blob/master/subprojects/kotlin-dsl-plugins/src/main/kotlin/org/gradle/kotlin/dsl/plugins/dsl/KotlinDslCompilerPlugins.kt#L43>
afterEvaluate {
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs += "-Xsam-conversions=class"
apiVersion = "1.7"
languageVersion = "1.7"
}
}
}
joney
12/07/2022, 3:30 PMsam-conversions=class
is not required, right?Chris Lee
12/07/2022, 3:31 PMVampire
12/07/2022, 5:44 PMVampire
12/07/2022, 5:47 PMmbonnin
12/07/2022, 5:53 PMmbonnin
12/07/2022, 5:56 PMembedded-kotlin
instead of kotlin-dsl
, this way, it "feels" more like a generic Kotlin project. Only one that uses the same Kotlin version as the Gradle compiling itChris Lee
12/07/2022, 5:57 PMembedded-kotlin
plugin.Chris Lee
12/07/2022, 5:57 PM