diff options
Diffstat (limited to 'java/base.go')
-rw-r--r-- | java/base.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/java/base.go b/java/base.go index e551432e9..b55c93852 100644 --- a/java/base.go +++ b/java/base.go @@ -1336,6 +1336,12 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath kotlincFlags := j.properties.Kotlincflags CheckKotlincFlags(ctx, kotlincFlags) + // Available kotlin versions can be found at + // https://github.com/JetBrains/kotlin/blob/master/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt#L560 + // in the `LanguageVersion` class. + // For now, avoid targeting language versions directly, as we'd like to kee our source + // code version aligned as much as possible. Ideally, after defaulting to "2", we + // can remove the "1.9" option entirely, or at least make it emit a warning. kotlin_lang_version := proptools.StringDefault(j.properties.Kotlin_lang_version, "1.9") if kotlin_lang_version == "1.9" { kotlincFlags = append(kotlincFlags, "-language-version 1.9") @@ -1343,7 +1349,6 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath kotlincFlags = append(kotlincFlags, "-Xsuppress-version-warnings", "-Xconsistent-data-class-copy-visibility") } else { ctx.PropertyErrorf("kotlin_lang_version", "Must be one of `1.9` or `2`") - } // Workaround for KT-46512 @@ -1979,7 +1984,7 @@ func (j *Module) useCompose(ctx android.BaseModuleContext) bool { } func collectDepProguardSpecInfo(ctx android.ModuleContext) (transitiveProguardFlags, transitiveUnconditionalExportedFlags []depset.DepSet[android.Path]) { - ctx.VisitDirectDeps(func(m android.Module) { + ctx.VisitDirectDepsProxy(func(m android.ModuleProxy) { depProguardInfo, _ := android.OtherModuleProvider(ctx, m, ProguardSpecInfoProvider) depTag := ctx.OtherModuleDependencyTag(m) |