summaryrefslogtreecommitdiff
path: root/java/kotlin.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2022-06-28 14:41:27 -0700
committer Cole Faust <colefaust@google.com> 2022-06-28 16:06:16 -0700
commitd96eebf3bc6903971828b5e93cf1143b60d7b0aa (patch)
treeafe576e5e3529d151b4a55796214cbad241bb18b /java/kotlin.go
parent2bce04f76fcefe9f211b8085188b1caf2b6c9e05 (diff)
Use the current java version for -jvm-target
This is a partial revert of aosp/541879. In that cl, the kotlin jvm version was always set to 1.8 because that's what the kotlin complier supported at the time, but now it supports more versions: $ ./external/kotlinc/bin/kotlinc -jvm-target foo error: unknown JVM target version: foo Supported versions: 1.6, 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17 Bug: 69160377 Bug: 236431222 Test: Treehugger Change-Id: I273e0b4d1f484013889e17c60bc1b299a3f975a1
Diffstat (limited to 'java/kotlin.go')
-rw-r--r--java/kotlin.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/java/kotlin.go b/java/kotlin.go
index 903c6249b..9bff5ea01 100644
--- a/java/kotlin.go
+++ b/java/kotlin.go
@@ -119,9 +119,8 @@ func kotlinCompile(ctx android.ModuleContext, outputFile, headerOutputFile andro
"srcJarDir": android.PathForModuleOut(ctx, "kotlinc", "srcJars").String(),
"kotlinBuildFile": android.PathForModuleOut(ctx, "kotlinc-build.xml").String(),
"emptyDir": android.PathForModuleOut(ctx, "kotlinc", "empty").String(),
- // http://b/69160377 kotlinc only supports -jvm-target 1.6 and 1.8
- "kotlinJvmTarget": "1.8",
- "name": kotlinName,
+ "kotlinJvmTarget": flags.javaVersion.StringForKotlinc(),
+ "name": kotlinName,
},
})
}