summaryrefslogtreecommitdiff
path: root/java/config/kotlin.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-01-10 06:43:24 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-01-10 06:43:24 -0800
commit52181d5bd9df148e02fd86e166ea00e10852201b (patch)
treef018687c57024b57b592651e30915296b514eeb3 /java/config/kotlin.go
parenta2c3bec8d2177c27a6e4cc9fc3454c35a3e53a31 (diff)
parent1a7705d96ddaee5fc829c11bca0c43543b9b4155 (diff)
Merge "Add kotlin-lang flag." into main
Diffstat (limited to 'java/config/kotlin.go')
-rw-r--r--java/config/kotlin.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/config/kotlin.go b/java/config/kotlin.go
index bf4c886d1..ffb025d9c 100644
--- a/java/config/kotlin.go
+++ b/java/config/kotlin.go
@@ -21,6 +21,7 @@ var (
KotlincIllegalFlags = []string{
"-no-jdk",
"-no-stdlib",
+ "-language-version",
}
)
@@ -49,12 +50,12 @@ func init() {
"-J--add-opens=java.base/java.util=ALL-UNNAMED", // https://youtrack.jetbrains.com/issue/KT-43704
}, " "))
- pctx.StaticVariable("KotlincGlobalFlags", strings.Join([]string{"-language-version 1.9"}, " "))
+ pctx.StaticVariable("KotlincGlobalFlags", strings.Join([]string{}, " "))
// Use KotlincKytheGlobalFlags to prevent kotlinc version skew issues between android and
// g3 kythe indexers.
// This is necessary because there might be instances of kotlin code in android
// platform that are not fully compatible with the kotlinc used in g3 kythe indexers.
// e.g. uninitialized variables are a warning in 1.*, but an error in 2.*
// https://github.com/JetBrains/kotlin/blob/master/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt#L748
- pctx.StaticVariable("KotlincKytheGlobalFlags", strings.Join([]string{"-language-version 1.9"}, " "))
+ pctx.StaticVariable("KotlincKytheGlobalFlags", strings.Join([]string{}, " "))
}