Remove 'noStdlib' from Gradle options
^KT-49011 Fixed
This commit is contained in:
-2
@@ -47,8 +47,6 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
@Argument(value = "-no-jdk", description = "Don't automatically include the Java runtime into the classpath")
|
||||
var noJdk: Boolean by FreezableVar(false)
|
||||
|
||||
@GradleDeprecatedOption(removeAfter = "1.6", 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"
|
||||
|
||||
@@ -256,6 +256,12 @@ private fun Printer.generateImpl(
|
||||
for (property in properties) {
|
||||
println("${property.name} = ${property.gradleDefaultValue}")
|
||||
}
|
||||
// Adding required 'noStdlib' and 'noReflect' compiler arguments for JVM compilation
|
||||
// Otherwise compilation via build tools will fail
|
||||
if (type.shortName().toString() == "KotlinJvmOptionsBase") {
|
||||
println("noStdlib = true")
|
||||
println("noReflect = true")
|
||||
}
|
||||
}
|
||||
println("}")
|
||||
}
|
||||
|
||||
-7
@@ -37,13 +37,6 @@ interface KotlinJvmOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOption
|
||||
*/
|
||||
var noJdk: kotlin.Boolean
|
||||
|
||||
/**
|
||||
* Don't automatically include the Kotlin/JVM stdlib and Kotlin reflection into the classpath
|
||||
* Default value: true
|
||||
*/
|
||||
@Deprecated(message = "This option has no effect and will be removed in a future release.", level = DeprecationLevel.ERROR)
|
||||
var noStdlib: kotlin.Boolean
|
||||
|
||||
/**
|
||||
* Use the old JVM backend
|
||||
* Default value: false
|
||||
|
||||
+2
-2
@@ -235,7 +235,7 @@ open class Kapt3IT : Kapt3BaseIT() {
|
||||
gradleVersion,
|
||||
buildOptions = defaultBuildOptions.copy(incremental = false)
|
||||
) {
|
||||
build("build") {
|
||||
build("build", enableGradleDebug = true) {
|
||||
assertTasksExecuted(":kaptGenerateStubsKotlin")
|
||||
assertOutputDoesNotContain(USING_JVM_INCREMENTAL_COMPILATION_MESSAGE)
|
||||
}
|
||||
@@ -803,7 +803,7 @@ open class Kapt3IT : Kapt3BaseIT() {
|
||||
}
|
||||
|
||||
@DisplayName("Works with JPMS on JDK 9+")
|
||||
@JdkVersions(versions = [JavaVersion.VERSION_1_9])
|
||||
@JdkVersions(versions = [JavaVersion.VERSION_11])
|
||||
@GradleWithJdkTest
|
||||
fun testJpmsModule(
|
||||
gradleVersion: GradleVersion,
|
||||
|
||||
+1
-10
@@ -58,14 +58,6 @@ internal abstract class KotlinJvmOptionsBase : org.jetbrains.kotlin.gradle.dsl.K
|
||||
noJdkField = value
|
||||
}
|
||||
|
||||
private var noStdlibField: kotlin.Boolean? = null
|
||||
@Deprecated(message = "This option has no effect and will be removed in a future release.", level = DeprecationLevel.ERROR)
|
||||
override var noStdlib: kotlin.Boolean
|
||||
get() = noStdlibField ?: true
|
||||
set(value) {
|
||||
noStdlibField = value
|
||||
}
|
||||
|
||||
private var useOldBackendField: kotlin.Boolean? = null
|
||||
override var useOldBackend: kotlin.Boolean
|
||||
get() = useOldBackendField ?: false
|
||||
@@ -85,7 +77,6 @@ internal abstract class KotlinJvmOptionsBase : org.jetbrains.kotlin.gradle.dsl.K
|
||||
jvmTarget?.let { args.jvmTarget = it }
|
||||
moduleName?.let { args.moduleName = it }
|
||||
noJdkField?.let { args.noJdk = it }
|
||||
noStdlibField?.let { args.noStdlib = it }
|
||||
useOldBackendField?.let { args.useOldBackend = it }
|
||||
}
|
||||
}
|
||||
@@ -102,7 +93,7 @@ internal fun org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments.fi
|
||||
jvmTarget = null
|
||||
moduleName = null
|
||||
noJdk = false
|
||||
useOldBackend = false
|
||||
noStdlib = true
|
||||
noReflect = true
|
||||
useOldBackend = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user