Error out if JDKs are not configured #99
Merged
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.
Before this PR
If you do not configure a JDK distribution/version for a particular java major version, the default behaviour of baseline-java-versions comes into effect, which is to fall back to the Gradle toolchain auto-provisioning. baseline-java-versions needs to do this, because it's previous behaviour was to use the Gradle auto-provisioning. However, with this new plugin we explicitly want to avoid using the Gradle's auto-provisioning - a project accidentally not configuring JDKs is a bug.
After this PR
==COMMIT_MSG==
If a JDK for a particular Java major version is not configured, error out instead of falling back to the Gradle auto-provisioning behaviour.
==COMMIT_MSG==
Possible downsides?
If builds are incorrectly configured, they may start to error. IMO this is actually a good thing as we want to find these cases and stop them.