Disable automatic JVM target 1.8 detection in Android projects, KT-31027
This is a soft revert of the fix for KT-21030 (commit ffbd0e8a).
The logic introduced for KT-21030 should now only run when a property
flag is provided, kotlin.setJvmTargetFromAndroidCompileOptions.
We can't set the JVM target to 1.8 automatically until an Android Gradle
plugin version appears that can correctly desugar the bytecode produced
by the Kotlin compiler.
So we disable the logic introduced in the fix for KT-26432
with the plan to enable it back and apply it conditionally once there is
an Android Gradle plugin version that processes the calls correctly.
Issue #KT-31027 Fixed
This commit is contained in:
+7
-2
@@ -680,7 +680,7 @@ fun getSomething() = 10
|
||||
|
||||
val kotlinJvmTarget18Regex = Regex("Kotlin compiler args: .* -jvm-target 1.8")
|
||||
|
||||
build(":Lib:assemble") {
|
||||
build(":Lib:assembleDebug", "-Pkotlin.setJvmTargetFromAndroidCompileOptions=true") {
|
||||
assertSuccessful()
|
||||
assertNotContains(kotlinJvmTarget18Regex)
|
||||
}
|
||||
@@ -694,7 +694,12 @@ fun getSomething() = 10
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
build(":Lib:assemble") {
|
||||
build("clean", ":Lib:assembleDebug") {
|
||||
assertSuccessful()
|
||||
assertNotContains(kotlinJvmTarget18Regex)
|
||||
}
|
||||
|
||||
build(":Lib:assembleDebug", "-Pkotlin.setJvmTargetFromAndroidCompileOptions=true") {
|
||||
assertSuccessful()
|
||||
assertContainsRegex(kotlinJvmTarget18Regex)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user