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

Disable --release flag when --add-exports is used #1542

Merged
merged 6 commits into from
Nov 12, 2020

Conversation

fawind
Copy link
Contributor

@fawind fawind commented Nov 12, 2020

Before this PR

To bring the palantir-java-formatter to java14+ we need to export the now internal com.sun.tools.javac api using --add-exports. However, on newer jdks it is not allowed to use --add-exports in combination with --release (ref).

After this PR

Add a gradle property to disable the com.palantir.baseline-release-compatibility plugin when set. This is not intended to be used generally but only in the very few places where we need full control over the provided compiler args.

Updated PR:

Don't set the --release flag if --add-exports flags are used.

==COMMIT_MSG==
Disable --release flag when --add-exports is used
==COMMIT_MSG==

Possible downsides

It's a bit hidden so users might get confused if their --release flag disappears.

@changelog-app
Copy link

changelog-app bot commented Nov 12, 2020

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Disable --release flag when --add-exports is used

Check the box to generate changelog(s)

  • Generate changelog entry

@fawind fawind changed the title Add property to disable release compatibility Disable --release flag when --add-exports is used Nov 12, 2020
Copy link
Contributor

@iamdanfox iamdanfox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks neat, and not too much of a blast radius

@bulldozer-bot bulldozer-bot bot merged commit 06f16e6 into develop Nov 12, 2020
@bulldozer-bot bulldozer-bot bot deleted the fw/disable-release-compat branch November 12, 2020 15:39
@svc-autorelease
Copy link
Collaborator

Released 3.50.0

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.

3 participants