Uploaded image for project: 'Realm Kotlin'
  1. Realm Kotlin
  2. RKOTLIN-562

Realm incompatible with Kotlin projects compiled against a Java version newer than 8

      Cause: https://github.com/realm/realm-kotlin/blob/0198f3a408c1f34fe27fc1d82b75df80e6e7de49/packages/gradle-plugin/src/main/kotlin/io/realm/kotlin/gradle/RealmPlugin.kt#L92

      Because of this, Realm is incompatible with other Kotlin libraries which have been built targetting a newer JVM version - since it is impossible to inline functions from these libraries then.

      I don't think the Realm Gradle plugin should force all compilations to target JVM 1.8, right?

      The temporary workaround to overwrite what the Realm Gradle plugin set here is the following:

      Unable to find source-code formatter for language: kt. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      project.afterEvaluate {
          kotlin.target.compilations.all { // use targets if this is a Multiplatform project
              kotlinOptions.jvmTarget = "17"
          }
      }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: