cdevents / sdk-java

Java SDK for CDEvents
Apache License 2.0
5 stars 6 forks source link

Fix #77 codebase remains Java 8 compatible #79

Closed aalmiray closed 6 months ago

aalmiray commented 7 months ago

Fixes #77

aalmiray commented 7 months ago
$ jarviz bytecode show --file sdk/target/cdevents-sdk-java-0.3.1-SNAPSHOT.jar 
subject: cdevents-sdk-java-0.3.1-SNAPSHOT.jar
Unversioned classes. Bytecode version: 52 (Java 8) total: 341
Versioned classes 9. Bytecode version: 53 (Java 9) total: 1

The single Java9 class is module-info.class as expected.

afrittoli commented 6 months ago

@rjalander would you like to review this?

rjalander commented 6 months ago

One quick question, Considering Spinnaker is with Java 11, (https://cdeliveryfdn.slack.com/archives/C030SKZ0F4K/p1707936366892439?thread_ts=1707859639.494349&cid=C030SKZ0F4K),

Do we need this PR still to make Java 8 compatible?

aalmiray commented 6 months ago

Well, as much as I'd love for everyone to move to recent versions of Java, not everyone has the luxury to do so. With Java 8 having commercial support til 2030 there are still people holding up migration.

rjalander commented 6 months ago

Ok, so good to have a minimum supported version.

I think we need an update here https://github.com/cdevents/sdk-java/blob/main/DEVELOPMENT.md#install-tools for Java version. If needed, can we have this change in the same PR?

aalmiray commented 6 months ago

There is no need for updating the Java version. Java 9 is still the minimum required because ModiTect needs it.

The nice thing about the setup is that the produced bytecode is Java 8 compatible even though the build requires Java 9+

cdevents-bot commented 6 months ago

🎉 This issue has been resolved in v0.3.1 (Release Notes)