Warn on using 'jdkHome' option in Gradle builds.

User should instead use KotlinJavaToolchain that will take care of
tracking major java version and provide nicer API.

Gradle will still pass jdkHome value to the compiler, but it should
be changed in Kotlin 1.6 release.

^KT-45611 Fixed
This commit is contained in:
Yahor Berdnikau
2021-05-06 17:28:19 +02:00
committed by TeamCityServer
parent 74d1812461
commit 800e382ba9
6 changed files with 76 additions and 8 deletions
@@ -30,6 +30,11 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
@Argument(value = "-include-runtime", description = "Include Kotlin runtime into the resulting JAR")
var includeRuntime: Boolean by FreezableVar(false)
@DeprecatedOption(
message = "This option is not working well with Gradle caching and will be removed in the future.",
removeAfter = "1.7",
level = DeprecationLevel.WARNING
)
@GradleOption(DefaultValues.StringNullDefault::class)
@Argument(
value = "-jdk-home",