Recommend targeting older Kotlin bytecode
rocketraman opened this issue · 4 comments
The library currently targets Kotlin 1.9 metadata.
Unfortunately for those of us stuck on older versions of Kotlin, this means we cannot use this library. Can you set the Kotlin metadata target to 1.6 for the next version?
/home/raman/.gradle/caches/modules-2/files-2.1/io.exoquery/pprint-kotlin/1.0.0/ab5886a4464d33ab32995d9c4235a1d93bfed8e0/pprint-kotlin-1.0.0.jar!/META-INF/pprint-kotlin.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
I’ll try to push a couple of releases in 1.6. Maybe I should add the Kotlin version to the versioning scheme like 1.1.0-1.6.0 or something like that? Is there a way to build to multiple Kotlin versions in Gradle?
If the project is not using any language features > 1.6, you don't need to publish multiple versions of it -- you could just set the languageVersion to 1.6 and if compiled with Kotlin 1.9 it should work in any kotlin project using 1.6 or above, see https://kotlinlang.org/docs/kotlin-evolution.html#evolving-the-binary-format).
I'll try this out locally and submit a PR if it works.
@deusaquilus Tried it out locally and it works fine. Submitted a PR!