-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot compile with Kotlin 1.9.10 #1513
Comments
Yes, unfortunately, the supported bytecode settings are a bit of a mess right now. Currently, we are shipping the library with Java 8 bytecode, mostly for historical reasons. We could probably safely bump it to 11, but not everyone is at Java 17 yet. You can fix it by adding this to your
and if using kts files, it looks like this:
|
Hi, tried that before and it didn't work. |
We have removed an internal override of the Kotlin compile tasks target version in #1514. That could have an impact on this. The fix is already available in the |
Tried both 1.12.0-NEXTMAJORCORE-SNAPSHOT and 1.12.0-SNAPSHOT to no avail. Same error even with the block suggested above. However, this override worked even with stable version (build.gradle.kts): allprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "17"
}
}
}
|
Going over our gradle plugin we realized that we don't need to run KAPT anymore, so it has been removed, but we are still shipping our bytecode as a Java 8 target as that is the minimum Kotlin supports. But it should be possible to configure it using the |
any solution? `
BUILD FAILED in 19s` |
@keinar It seems that you are declaring a module as Java 17 and your project is Java 11. Please check what module is causing the incompatibility as the Gradle output does not show it. The latest Realm version is compatible with Java 11. You might consider bumping the Project Java version. |
//Your app level build.gradle must be matched like--
|
How frequently does the bug occur?
Always
Description
Used Android project with Kotlin v
1.8.22
and Realm-Kotlin v1.10.0
with no issues.When migrated to use Kotlin
1.9.x
, specifically1.9.10
, cannot compile due to this error:Tbe
build.gradle
in every Android Module contains:without reference to Module containing dependency:
io.realm.kotlin:library-base
, the project compiles.Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
1.11.1, 1.10.0
What Atlas App Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Android SDK 33
Build environment
Android Studio version: Android Studio Giraffe | 2022.3.1 Patch 1
Android Build Tools version: 33
Gradle version: 8.3
The text was updated successfully, but these errors were encountered: