Ashampoo / kim

Image metadata manipulation library for Kotlin Multiplatform
https://ashampoo.github.io/kim/
Apache License 2.0
163 stars 8 forks source link

Support lower JDK versions #81

Closed mgroth0 closed 5 months ago

mgroth0 commented 5 months ago

This library looks really useful! Unfortunately, I got this error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/ashampoo/kim/Kim has been compiled by a more recent version of the Java Runtime (class file version 62.0), this version of the Java Runtime only recognizes class file versions up to 61.0

Class file version 62.0 corresponds to Java version 18. Why support 18 but not 17, given that 17 is LTS?

I will eventually one day upgrade my JDK version, so I am unsure if it would be worth it to support lower versions of JDK just for me for the time being. But on the other hand, I cannot imagine I am the only one still using JDK 17?

mgroth0 commented 5 months ago

I think that 17 is still the bundled runtime version for IntelliJ, so if I understand correctly, this library cannot be used as a dependency of a normal IntelliJ plugin. It is possible to use a higher than 17 version for the IntelliJ runtime, but this is not yet fully supported.

StefanOltmann commented 5 months ago

Thanks for reaching out! :)

Why support 18 but not 17, given that 17 is LTS?

21 is also LTS. ;) The lowest LTS version still supported is 8.

This library targets Java 18 because this was the target for Ashampoo Photos at the time we stripped out the logic to release it as a separate lib.

There is no particular reason to not go as low as possible. :)

StefanOltmann commented 5 months ago

I tried to go down to Java 8 or Java 11, but it turns out that the Android support for current versions forces me to require Java 17 as a minimum:

https://developer.android.com/build/releases/gradle-plugin#compatibility

If I go lower it won't compile.

StefanOltmann commented 5 months ago

@mgroth0 v0.16.3 was build with JDK 17 and is now available on Maven Central. :)

And thank you for your GitHub star. 👍

mgroth0 commented 5 months ago

Thank you for accommodating me and for sharing this library. It will be really helpful! I tested the latest version and it works perfectly :)

StefanOltmann commented 5 months ago

@mgroth0, I'm glad I could assist and am pleased to hear that what I've created is beneficial to fellow developers. Please inform me of where you've implemented it. Maybe one day, if more people use it, I could compile a list of applications utilizing this library.

Feel free to report any issues you encounter while using it; don't hesitate to reach out.

mgroth0 commented 5 months ago

Thank you @StefanOltmann :) Not a full-fledged application but rather a data processing pipeline for research that is using images. Our team annotated images using metadata and this tool helped to automate!