jillesvangurp / kt-search

Multi platform kotlin client for Elasticsearch & Opensearch with easily extendable Kotlin DSLs for queries, mappings, bulk, and more.
MIT License
95 stars 23 forks source link

[FEAT] Support JVM 11 #75

Closed gueletk-affirm closed 11 months ago

gueletk-affirm commented 1 year ago

Describe the enhancement

Would it be possible to configure the library to create a Java 11 release as well?

Why is this needed?

Our use case: The code that's using the KtSearch library is currently at Java 11 and updating would involve a lot of cascading updates to other internal packages.

We were previously using 1.99.16, but are being forced to update because we're seeing this issue that was fixed. We're also having trouble updating to v1.99.17 because of the old jitpack issues. The issues are not specific to the version because the jvmTarget was changed in the the same commit as the jitpack issues were fixed.

How do you think it should be done?

Will you be able to help with a pull request?

I don't have a lot of experience with Gradle/Kotlin multiplatform, but I can try to help.

cc @gillianchesnais @sajandrews

jillesvangurp commented 1 year ago

Easiest is to just try to fork and build with Java 11. You will need to downgrade the min java version in the kotlin plugin. This library does not actually use a lot of of stuff from the standard Java library. There are probably a few libraries that may require 17 or higher. 11 is no longer supported by Oracle I think. You may have to fork those as well. To get that fixed.

If you get it working, feel free to create a pull request. Otherwise, I recommend you just fork and create your own release. Also, you should in any case update to one of the more recent 2.x versions. There are some bug fixes in there that you probably want and lots of overall improvements.

I suspect the upcoming Kotlin 2.0 may in any case remove support for older jvms. This library will keep tracking stable releases of Kotlin. I'm not planning to put time in supporting older jvms.

Honestly, update your JVM unless you have a really good reason not to. That should just work. And if it doesn't you are better off knowing about it so you can plan to address whatever is blocking that. Give it a try. It might be better than sinking time in trying to not update. Which is what you are doing right now.

jillesvangurp commented 11 months ago

wontfix for now