Slackbot
07/07/2023, 12:25 PMChris Lee
07/07/2023, 12:41 PMPhilip W
07/07/2023, 12:42 PMChris Lee
07/07/2023, 1:05 PMChris Lee
07/07/2023, 1:09 PMdependencies {
implementation(libs.plugins.kotlin.jvm.toDep())
}
This isn’t advisable, it messes with the dependencies and Kotlin versions that Gradle depends on for Gradle-code.Chris Lee
07/07/2023, 1:11 PMChris Lee
07/07/2023, 1:12 PMtasks.withType<KotlinCompile>().configureEach {
compilerOptions {
languageVersion.set(KotlinVersion.KOTLIN_1_9)
}
}Philip W
07/07/2023, 1:15 PMimplementation(kgp) as plugin author too, otherwise you can get a new kgp transitively, won't it?Chris Lee
07/07/2023, 1:16 PMembeddedKotlinVersion as the version to match everything up.Chris Lee
07/07/2023, 1:18 PMcompileOnly such that consumers of your plugin could provide their own version, as the plugin could presumably run on different Gradle versions.Chris Lee
07/07/2023, 1:19 PMplugin("gradle.kotlin.dslPlugins" to "org.gradle.kotlin.kotlin-dsl:$expectedKotlinDslPluginsVersion")
plugin("jetbrains.kotlin.jvm" to "org.jetbrains.kotlin.jvm:$embeddedKotlinVersion")Chris Lee
07/07/2023, 1:20 PMcompileOnly(plugin("org.gradle.kotlin.kotlin-dsl", expectedKotlinDslPluginsVersion))
compileOnly(plugin("org.jetbrains.kotlin.jvm", embeddedKotlinVersion))Philip W
07/07/2023, 1:42 PMChris Lee
07/07/2023, 1:44 PMcompileOnly("org.jetbrains…:<kgp>:$embeddedKotlinVersion")Philip W
07/07/2023, 2:20 PMPhilip W
07/07/2023, 2:20 PMEli Graber
07/08/2023, 12:15 AMclasspath(<kgp group>:<kgp name>:$embeddedKotlinVersion)
Then I added a compileOnly dependency to KGP with v1.9.0 to the project that needed itEli Graber
07/08/2023, 12:16 AM