-
Notifications
You must be signed in to change notification settings - Fork 135
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
baseline-java-versions allows opting in to --enable-preview
#2322
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
bfce386
Simplify the baseline-enable-preview-flag plugin
iamdanfox 18679f5
--amend
iamdanfox cb2f6d1
Add a bunch of new properties
iamdanfox 133c882
Configure all the relevant tasks
iamdanfox 210733e
Stop relying on BaselineEnablePreviewFLag
iamdanfox 6641855
One test to exercise preview compilation
iamdanfox 6efb465
README
iamdanfox 314be58
Fix typo!
iamdanfox 14b556a
Add generated changelog entries
svc-changelog b219866
Still working
iamdanfox ee26658
bump CI to java 17
iamdanfox d974e52
Consolidate to a single class
iamdanfox 5b595ac
one more test
iamdanfox 3fad105
Also make assertions about minor bytecode
iamdanfox a7b3139
Extra validation to make sure folks get the runtime & distribution ve…
iamdanfox 5386b91
Programmatically disable tests locally
iamdanfox 6ee504c
Delete more enable-preview-flag stuff
iamdanfox a23611f
Plumb through the Baseline-Enable-Preview jar attribute
iamdanfox 22f43c4
README
iamdanfox aa04289
Merge remote-tracking branch 'origin/develop' into dfox/enable-preview2
iamdanfox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env bash | ||
export CIRCLECI_TEMPLATE=java-library-oss | ||
export JDK=11 | ||
export JDK=17 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type: feature | ||
feature: | ||
description: Users of the `com.palantir.baseline-java-versions` plugin can now set | ||
`javaVersions { distributionTarget = '17_PREVIEW' }` to opt-in to Java's `--enable-preview` | ||
flag at compile time. | ||
links: | ||
- https://github.com/palantir/gradle-baseline/pull/2322 |
This file contains 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
This file contains 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
97 changes: 0 additions & 97 deletions
97
...aseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineEnablePreviewFlag.java
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a crucial change for Intellij usability - previously it would say something like
JDK_17
, but now it knows how to sayJDK_17_PREVIEW
.I found this by committing all my intellij-related generated files (which are normally gitignored),
then writing some new code:
then hitting the button

then seeing what changed in my git diff:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you probably want to delete this module and ban running
./gradlew idea
just like gradle/gradle does. There's too many things that go wrong when you're not using gradle integration in intellij these daysThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robert3005 I agree the
open *.ipr
thing seems to have got more fragile (I haven't personally used it in a while)... but with this PR I was specifically trying to make the IntelliJ gradle integration work out of the box!When I accepted IntelliJ's prompt to enable preview, it added two lines of seemingly non-functional gradle!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the JavaVersion class... I don't understand how the
JavaVersion.VERSION_17_PREVIEW
thing is supposed to work!