Revert "Add -Xjvm-defaults=all to kotlin compilations"

This reverts commit 7ce6837979.

Reason for revert: b/238405276

Change-Id: Ifcd1c02a3d4505af090cc1cd187730aa959fc463
This commit is contained in:
Jordan Demeulenaere
2022-07-11 09:29:57 +00:00
parent 7ce6837979
commit b0ef8b16d5

View File

@@ -1072,13 +1072,6 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) {
kotlincFlags := j.properties.Kotlincflags
CheckKotlincFlags(ctx, kotlincFlags)
// This is needed for code that depends on libraries that use @JvmDefault
// -Xjvm-default=all will be the default in a future version of kotlin
// according to https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces/
if flags.javaVersion >= JAVA_VERSION_8 {
kotlincFlags = append(kotlincFlags, "-Xjvm-default=all")
}
// Workaround for KT-46512
kotlincFlags = append(kotlincFlags, "-Xsam-conversions=class")