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

Support io.github.goooler.shadow plugin #262

Merged
merged 4 commits into from Jan 17, 2024

Conversation

snazy
Copy link
Contributor

@snazy snazy commented Jan 3, 2024

The shadow-plugin (ID com.github.johnrengelman.shadow) is currently rather unmaintained (last change in March/April 2023 as of January 2024) and already has a bunch of issues, especially with newer Gradle versions (8.2+) and when the included classes are built for Java 21 or newer (class file version 65+). This is problematic when using Java 21 directly or including a recent version of jackson-core, which is a multi-release jar that contains Java 21 classes.

There is a fork of the shadow plugin (ID io.github.goooler.shadow) that works against newer Gradle versions and Java 21. That one however is not recognized by the jmh plugin, which only check against the "original" plugin ID.

This change adds support for the forked plugin, one line change in the production code, other changes are readme and tests.

@@ -9,6 +9,7 @@ project_vcs=https://github.com/melix/jmh-gradle-plugin.git
jacocoVersion = 0.8.10
jmhVersion = 1.37
shadowVersion = 7.1.2
shadowForkVersion = 8.1.2
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
shadowForkVersion = 8.1.2
shadowForkVersion = 8.1.3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, nice. 8.1.3 wasn't on Gradle Plugins when I opened the PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, cause I unified this group to io.github.goooler.shadow and published it to MavenCentral.

*/
plugins {
id 'java'
id 'io.github.goooler.shadow'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
id 'io.github.goooler.shadow'
id 'io.github.goooler.shadow'

Copy link
Owner

@melix melix left a comment

Choose a reason for hiding this comment

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

Thanks, I wasn't aware of this new plugin!

The shadow-plugin (ID `com.github.johnrengelman.shadow`) is currently rather unmaintained (last change in March/April 2023 as of January 2024) and already has a bunch of issues, especially with newer Gradle versions (8.2+) and when the included classes are built for Java 21 or newer (class file version 65+). This is problematic when using Java 21 directly or including a recent version of jackson-core, which is a multi-release jar that contains Java 21 classes.

There is a fork of the shadow plugin (ID `io.github.goooler.shadow`) that works against newer Gradle versions and Java 21. That one however is not recognized by the jmh plugin, which only check against the "original" plugin ID.

This change adds support for the forked plugin, one line change in the production code, other changes are readme and tests.
@snazy
Copy link
Contributor Author

snazy commented Jan 17, 2024

rebased + fixed CI

@melix melix merged commit 4c3cc4a into melix:master Jan 17, 2024
2 checks passed
@snazy snazy deleted the forked-shadow-plugin branch January 18, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants