Update flags passed to kotlinc
- Remove -Xuse-ir as it is default in Kotlin 1.5
- Add -Xsam-conversions=class for KT-46512
Change-Id: Ie351bb9ad5ec51ef7b7346d0076868d04cfe9811
diff --git a/java/base.go b/java/base.go
index 03652be..ef8c563 100644
--- a/java/base.go
+++ b/java/base.go
@@ -895,8 +895,8 @@
kotlincFlags := j.properties.Kotlincflags
CheckKotlincFlags(ctx, kotlincFlags)
- // Dogfood the JVM_IR backend.
- kotlincFlags = append(kotlincFlags, "-Xuse-ir")
+ // Workaround for KT-46512
+ kotlincFlags = append(kotlincFlags, "-Xsam-conversions=class")
// If there are kotlin files, compile them first but pass all the kotlin and java files
// kotlinc will use the java files to resolve types referenced by the kotlin files, but