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

Cannot compile with Kotlin 1.9.10

      How frequently does the bug occur?

      Always

      Description

      Used Android project with Kotlin v{{1.8.22}} and Realm-Kotlin v{{1.10.0}} with no issues.

      When migrated to use Kotlin 1.9.x, specifically 1.9.10, cannot compile due to this error:

      'compileDebugJavaWithJavac' task (current target is 17) and 'kaptGenerateStubsDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
        Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
      

      Tbe build.gradle in every Android Module contains:

      android {
          compileOptions {
              sourceCompatibility JavaVersion.VERSION_17
              targetCompatibility JavaVersion.VERSION_17
          }
          kotlinOptions {
              jvmTarget = '17'
          }
      }
      

      without reference to Module containing dependency: io.realm.kotlin:library-base, the project compiles.

      Stacktrace & log output

      Unable to find source-code formatter for language: shell. 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
      Execution failed for task ':database:kaptGenerateStubsDebugKotlin'.
      > 'compileDebugJavaWithJavac' task (current target is 17) and 'kaptGenerateStubsDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
        Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
      

      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

            Assignee:
            christian.melchior@mongodb.com Christian Melchior (Inactive)
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: