InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
8.76k stars 695 forks source link

Koin 3.5.4 and onwards is no longer Java 1.8 compatible #1887

Open antonurankar-moloco opened 1 month ago

antonurankar-moloco commented 1 month ago

Describe the bug

With the release of Koin 3.5.4, its transitive dependency stately has been upgraded to version 2.0.6, which is no longer Java 1.8 compatible.

 Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform stately-concurrent-collections-jvm-2.0.6.jar (co.touchlab:stately-concurrent-collections-jvm:2.0.6) to match attributes {artifactType=android-java-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
      > Execution failed for JetifyTransform: /Users/tomi/.gradle_console/caches/modules-2/files-2.1/co.touchlab/stately-concurrent-collections-jvm/2.0.6/fb80df9c69dd0e154c346ee5510601e2d148e23d/stately-concurrent-collections-jvm-2.0.6.jar.
         > Failed to transform '/Users/tomi/.gradle_console/caches/modules-2/files-2.1/co.touchlab/stately-concurrent-collections-jvm/2.0.6/fb80df9c69dd0e154c346ee5510601e2d148e23d/stately-concurrent-collections-jvm-2.0.6.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 61. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
   > Failed to transform stately-concurrency-jvm-2.0.6.jar (co.touchlab:stately-concurrency-jvm:2.0.6) to match attributes {artifactType=android-java-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
      > Execution failed for JetifyTransform: /Users/tomi/.gradle_console/caches/modules-2/files-2.1/co.touchlab/stately-concurrency-jvm/2.0.6/14dcbce3fc3d80a5a07f9df33dd2dc54e437e8d0/stately-concurrency-jvm-2.0.6.jar.
         > Failed to transform '/Users/tomi/.gradle_console/caches/modules-2/files-2.1/co.touchlab/stately-concurrency-jvm/2.0.6/14dcbce3fc3d80a5a07f9df33dd2dc54e437e8d0/stately-concurrency-jvm-2.0.6.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 61. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
   > Failed to transform stately-strict-jvm-2.0.6.jar (co.touchlab:stately-strict-jvm:2.0.6) to match attributes {artifactType=android-java-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
      > Execution failed for JetifyTransform: /Users/tomi/.gradle_console/caches/modules-2/files-2.1/co.touchlab/stately-strict-jvm/2.0.6/fdbcb1fc1c9219aa5a5f2b1c9084a4ed8b2a8f8b/stately-strict-jvm-2.0.6.jar.
         > Failed to transform '/Users/tomi/.gradle_console/caches/modules-2/files-2.1/co.touchlab/stately-strict-jvm/2.0.6/fdbcb1fc1c9219aa5a5f2b1c9084a4ed8b2a8f8b/stately-strict-jvm-2.0.6.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 61. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

To Reproduce

Compile Koin 3.5.4+ with Gradle version 6.x and build will fail with error: Unsupported class file major version 61

Expected behavior

Koin should still support Java 1.8. Otherwise mention in the documentation that the support has been dropped.

Koin module and version: koin-core:3.5.4+ koin-android:3.5.4+