Split JDK min version from enforcer min version#106
Closed
TobiX wants to merge 1 commit intoSonarSource:masterfrom
Inform-Software:enforcer-min-version-workaround
Closed
Split JDK min version from enforcer min version#106TobiX wants to merge 1 commit intoSonarSource:masterfrom Inform-Software:enforcer-min-version-workaround
TobiX wants to merge 1 commit intoSonarSource:masterfrom
Inform-Software:enforcer-min-version-workaround
Conversation
|
Hi @TobiX Thank you very much for your contribution it is very appreciated. I will do my best at my humble level to ensure such PRs do not take so long to be reviewed. As Java11 is now the baseline, this PR is no longer required. Best, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a "works in most cases" to fix a build error when trying to still preserve Java 8 compatibility.
Context: I'm the maintainer of the sonar-groovy plugin, which still uses this parent. I currently want to keep Java 8 compatibility, while updating the build infrastructure. (See Inform-Software/sonar-groovy#170)
The problem is now this:
1.8.0-352or11.0.17So using
1.8asjdk.min.versionbreaks the compiler on Java 11 and using8asjdk.min.versionmakes the enforcer plugin throw an error on Java 8 (since8>1.8).Splitting this into two properties (with one deriving from the other by default) serves two purposes:
jdk.min.versionto11creates a versionenforcer.jdk.min.versionof1.11, which is still bigger then1.8and smaller then11(and we are pretty sure nobody uses anything in-between)This can probably be dropped some months after the next LTS release, when Java 11 is the baseline for all projects based on this.