Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure java 6 compatable #815

Merged
merged 3 commits into from Oct 25, 2023
Merged

Conversation

johnjaylward
Copy link
Contributor

@johnjaylward johnjaylward commented Oct 23, 2023

What problem does this code solve?

Adds back in the build/jar for java6 to help ensure binary source compatibility. This leaves the actual deployment to Maven Central as a Java 8 compatibility.

Sample build run: https://github.com/johnjaylward/JSON-java/actions/runs/6617867256

As part of the java6 build, I made sure to output the current version of the java compiler:

image

This PR also adds support for auto-uploading the JARs built during the "Deployment Workflow" to the GitHib release. See https://github.com/johnjaylward/JSON-java/releases/tag/20231023-SNAP-01 as an example of what the release would look like.

image

Does the code still compile with Java6?

Yes, that's what this PR is made to ensure.

Risks

To compile Java 1.6 on GitHub, it requires using the deprecated action "setup-java@v1". v2 and greater of the action do not support java6. It's unknown when GitHub will end support for this action completely. Once they do, builds will break and we will need to "cross compile" from a newer version of the JDK down to 1.6, which is not guaranteed to ensure full 1.6 compatibility.

Changes to the API?

No

Will this require a new release?

No

Should the documentation be updated?

No

Does it break the unit tests?

No. However, no testing is done against JDK 6. Only compilation of src/main and packing is performed. The JDK-1.6 jar that is uploaded to the build artifacts is also not compatible with JDK 9+ as no module information is provided

Was any code refactored in this commit?

No

Review status
APPROVED

Starting 3-day comment window

@stleary
Copy link
Owner

stleary commented Oct 23, 2023

@johnjaylward Looks good, thanks!

@johnjaylward
Copy link
Contributor Author

you removed the approved label but didn't merge. Was that intentional?

@stleary
Copy link
Owner

stleary commented Oct 25, 2023

@johnjaylward My bad, it was still in the 3-day window. Going ahead and merging now.

@stleary stleary merged commit b5b9f63 into stleary:master Oct 25, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants