Slackbot
07/01/2023, 2:46 PMChris Lee
07/01/2023, 2:48 PMJakub Chrzanowski
07/01/2023, 2:55 PMJakub Chrzanowski
07/01/2023, 2:56 PMChris Lee
07/01/2023, 2:56 PMJakub Chrzanowski
07/01/2023, 2:57 PMChris Lee
07/01/2023, 2:58 PMWARNING: Unsupported Kotlin plugin version.
Theandembedded-kotlinplugins rely on features of Kotlinkotlin-dslthat might work differently than in the requested version1.8.20.1.8.22
Jakub Chrzanowski
07/01/2023, 2:58 PMChris Lee
07/01/2023, 2:59 PMChris Lee
07/01/2023, 3:00 PMplugins {
`jvm-test-suite`
`java-test-fixtures`
`java-gradle-plugin`
`kotlin-dsl`
`maven-publish`
alias(libs.plugins.kotlin)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.kotlinSamWithReceiver)
alias(libs.plugins.pluginPublish)
alias(libs.plugins.changelog)
alias(libs.plugins.dokka)
}
1. `java-gradle-plugin`is provided by kotlin-dsl and can be removed (this is cleanup, unrelated to issue)
2. libs.plugins.kotlin should not be mixed with kotlin-dsl. The former is for compiling application code with Kotlin; the latter is for what you are doing, compiling Gradle code.Chris Lee
07/01/2023, 3:02 PMJakub Chrzanowski
07/01/2023, 3:08 PMplugins {
`jvm-test-suite`
`java-test-fixtures`
// `java-gradle-plugin`
`kotlin-dsl`
`maven-publish`
// alias(libs.plugins.kotlin)
alias(libs.plugins.kotlinSerialization)
// alias(libs.plugins.kotlinSamWithReceiver)
alias(libs.plugins.pluginPublish)
alias(libs.plugins.changelog)
alias(libs.plugins.dokka)
}Chris Lee
07/01/2023, 3:08 PMcompileOnly(libs.kotlinGradlePlugin)
…and perhaps other inclusions of stuff at different Kotlin versions.Chris Lee
07/01/2023, 3:17 PMlowercase() isn’t compiling:
w: Language version 1.4 is deprecated and its support will be removed in a future version of KotlinThese changes:
plugins {
`jvm-test-suite`
`java-test-fixtures`
// `java-gradle-plugin`
`kotlin-dsl`
`maven-publish`
// alias(libs.plugins.kotlin)
id("org.jetbrains.kotlin.plugin.serialization") version(embeddedKotlinVersion)
// kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
// alias(libs.plugins.kotlinSerialization)
// alias(libs.plugins.kotlinSamWithReceiver)
alias(libs.plugins.pluginPublish)
alias(libs.plugins.changelog)
alias(libs.plugins.dokka)
}
and these dep changes:
implementation(libs.jacksonDatabind)
// implementation(libs.kotlinxSerializationJson)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
implementation(libs.jaxbApi)
implementation(libs.ddPlist)
// compileOnly(libs.kotlinGradlePlugin)
additionalPluginClasspath(libs.kotlinGradlePlugin)Chris Lee
07/01/2023, 3:17 PMwithType<KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
apiVersion = "1.4"
languageVersion = "1.4"
}
}Chris Lee
07/01/2023, 3:18 PMJakub Chrzanowski
07/01/2023, 3:22 PMChris Lee
07/01/2023, 3:25 PM// compileOnly(libs.kotlinGradlePlugin)
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:$embeddedKotlinVersion")Vampire
07/01/2023, 3:37 PMI guess I can entirely drop the above part as I rely on JVM Toolchain.... yeah ... no
Vampire
07/01/2023, 3:37 PMjvmTarget yes, if that is coming from the toolchain anywayVampire
07/01/2023, 3:37 PMapiVersion and languageVersion is about Kotlin api and language so is not related to the JVM toolchainVampire
07/01/2023, 3:38 PMVampire
07/01/2023, 3:38 PMlowercase() was introduced later than 1.4 I think as a replacement for toLowerCase().Vampire
07/01/2023, 3:39 PMVampire
07/01/2023, 3:40 PMVampire
07/01/2023, 3:40 PMChris Lee
07/01/2023, 3:41 PMVampire
07/01/2023, 3:42 PMChris Lee
07/01/2023, 3:43 PMVampire
07/01/2023, 3:43 PMJakub Chrzanowski
07/04/2023, 9:36 AMVampire
07/04/2023, 9:41 AMembeddedKotlin("<kotlin-module>")Jakub Chrzanowski
07/05/2023, 6:13 PMVampire
07/05/2023, 6:14 PMproject.dependencies.embeddedKotlin("kotlin-test") and additionally open a feature request or even better PR 🙂Jakub Chrzanowski
07/05/2023, 6:26 PMimplementation(project.dependencies.embeddedKotlin("test") as String)Vampire
07/05/2023, 6:27 PMJakub Chrzanowski
07/05/2023, 6:27 PMembeddedKotlin gives you Any (but eventually a String)which confuses implementation.Vampire
07/05/2023, 6:27 PMVampire
07/05/2023, 6:29 PMVampire
07/05/2023, 6:30 PMfun JvmComponentDependencies.embeddedKotlin(module: String) =
project.dependencies.embeddedKotlin(module) as String