Mark obsolete Gradle JVM options as Deprecated with Error
Options `includeRuntime`, `noStdlib` and `noReflect` were affected #Fixed KT-44361
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.cli.common.arguments
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class DeprecatedOption(
|
||||
val message: String = "This option has no effect and will be removed in a future release.",
|
||||
val removeAfter: String,
|
||||
val level: DeprecationLevel
|
||||
)
|
||||
+3
@@ -25,6 +25,7 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
description = "List of directories and JAR/ZIP archives to search for user class files")
|
||||
var classpath: String? by NullableStringFreezableVar(null)
|
||||
|
||||
@DeprecatedOption(removeAfter = "1.5", level = DeprecationLevel.ERROR)
|
||||
@GradleOption(DefaultValues.BooleanFalseDefault::class)
|
||||
@Argument(value = "-include-runtime", description = "Include Kotlin runtime into the resulting JAR")
|
||||
var includeRuntime: Boolean by FreezableVar(false)
|
||||
@@ -41,10 +42,12 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
@Argument(value = "-no-jdk", description = "Don't automatically include the Java runtime into the classpath")
|
||||
var noJdk: Boolean by FreezableVar(false)
|
||||
|
||||
@DeprecatedOption(removeAfter = "1.5", level = DeprecationLevel.ERROR)
|
||||
@GradleOption(DefaultValues.BooleanTrueDefault::class)
|
||||
@Argument(value = "-no-stdlib", description = "Don't automatically include the Kotlin/JVM stdlib and Kotlin reflection into the classpath")
|
||||
var noStdlib: Boolean by FreezableVar(false)
|
||||
|
||||
@DeprecatedOption(removeAfter = "1.5", level = DeprecationLevel.ERROR)
|
||||
@GradleOption(DefaultValues.BooleanTrueDefault::class)
|
||||
@Argument(value = "-no-reflect", description = "Don't automatically include Kotlin reflection into the classpath")
|
||||
var noReflect: Boolean by FreezableVar(false)
|
||||
|
||||
Reference in New Issue
Block a user