[
https://issues.apache.org/jira/browse/GROOVY-12199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18099255#comment-18099255
]
ASF GitHub Bot commented on GROOVY-12199:
-----------------------------------------
github-actions[bot] commented on PR #2740:
URL: https://github.com/apache/groovy/pull/2740#issuecomment-5083241923
### JMH summary — classic (commit `4e1bee3`)
Speedup vs trailing 90-day baseline on gh-pages. Higher = faster.
`1.00` = in line with history. Per-benchmark ratio, geomean within group.
Time-per-op units inverted so direction is consistent. The *calibrated*
column divides out this runner's speed vs the baseline hardware, as
measured by Groovy-independent pure-Java ruler benchmarks.
| Group | Speedup | Calibrated | n |
|--------|---------|------------|---|
| bench | 1.072 × | 1.002 × | 92 |
| core | 1.047 × | 1.080 × | 77 |
| grails | 0.957 × | 0.909 × | 80 |
<sub>Runner calibration (this run vs baseline hardware): bench 1.07× (26
rulers) · core-ag 0.97× (3 rulers) · core-hz 0.97× (3 rulers) · grails-ad 0.97×
(3 rulers) · grails-ez 1.13× (3 rulers)</sub>
<sub>Baseline: <code>dev/bench/jmh/<part>/classic/data.js</code> on
gh-pages, trailing 90 days. <a
href="https://apache.github.io/groovy/dev/bench/jmh/summary.html">Daily
dashboard</a> · <a
href="https://apache.github.io/groovy/dev/bench/jmh/">Per-suite raw
data</a></sub>
<!
> Replace ant-jarjar with com.gradleup.shadow for package relocation
> ------------------------------------------------------------------
>
> Key: GROOVY-12199
> URL: https://issues.apache.org/jira/browse/GROOVY-12199
> Project: Groovy
> Issue Type: Improvement
> Reporter: Daniel Sun
> Priority: Major
>
> h2. Motivation
> Published Groovy jars shade ASM, the ANTLR runtime, and picocli into packages
> under the {{groovyjarjar}} prefix so those libraries do not clash with
> application-chosen versions on the classpath.
> Today that shading is driven by {{com.eed3si9n.jarjar:ant-jarjar}} through an
> Ant {{taskdef}} in {{{}JarJarTask{}}}. The tool is no longer the maintained
> mainstream for Gradle package relocation; {{com.gradleup.shadow}} is. This
> change swaps the engine while {*}keeping the published jar surface
> compatible{*}.
> h2. Goals
> * Replace ant-jarjar with {{com.gradleup.shadow}}
> ({{{}shadow-gradle-plugin{}}} 9.6.1) for package relocation.
> * Preserve published-artefact behaviour:
> ** {{groovyjarjar}} package prefixes (e.g. {{{}groovyjarjarasm{}}},
> {{{}groovyjarjarantlr4{}}}, {{{}groovyjarjarpicocli{}}})
> ** OSGi manifest generation (BND via the root {{osgi}} extension)
> ** {{META-INF/INDEX.LIST}} and fixed timestamps for reproducible builds
> ** {{untouchedFiles}} (e.g. {{CliBuilder}} classes that must not be
> relocated)
> * Rename build machinery so names match the tool and the existing
> {{repackagedDependencies}} DSL:
> ** {{JarJarTask}} → {{RepackageJarTask}}
> ** task {{jarjar}} → {{repackageJar}}
> * Drop the {{tools}} dependency on ant-jarjar and the {{jarjar}} entry in
> {{{}versions.properties{}}}; refresh {{{}gradle/verification-metadata.xml{}}}.
> h2. Non-goals / compatibility contract
> * *Do not* rename {{groovyjarjar}} packages — they are part of the published
> binary surface.
> * *Do not* rename distribution license/notice snippets such as
> {{LICENSE-JARJAR}} / {{NOTICE-JARJAR}} — those describe the *contents* of the
> shaded artefact, not the build engine.
> * Build-only rename: task and class names change; consumers of published
> jars are unaffected.
> h2. Approach
> * Introduce {{RepackageJarTask}} extending Shadow's {{{}ShadowJar{}}}.
> * Feed only the base jar ({{{}inputJar{}}}) plus explicitly selected
> {{{}repackagedLibraries{}}}; never pull the whole {{runtimeClasspath}} into
> the shade.
> * Keep compact relocation patterns at call sites (e.g. {{org.antlr}} →
> {{{}groovyjarjarantlr4{}}}) and convert them to Shadow prefix relocations
> inside the task.
> * Post-process the shaded jar: re-add {{{}untouchedFiles{}}}, write
> {{{}INDEX.LIST{}}}, optionally rewrite the OSGi manifest.
> * Update call sites: convention plugins,
> {{{}GroovyLibraryExtension.withGrooid{}}}, binary-compatibility, servlet
> {{{}javaxJar{}}}, jmx / concurrent-java / osgi-test / groovydoc wiring.
> * Document the new task name in {{ARCHITECTURE.md}} and
> {{{}COMPATIBILITY.md{}}}.
> h2. Implementation notes
> ||Before||After||
> |{{JarJarTask}} extends {{DefaultTask}} + Ant jarjar
> {{taskdef}}|{{RepackageJarTask}} extends {{ShadowJar}}|
> |Task name {{jarjar}}|Task name {{repackageJar}}|
> |{{tools}} dep on
> ant-jarjar|{{com.gradleup.shadow:shadow-gradle-plugin:9.6.1}} in
> {{build-logic}}|
> |{{versions.jarjar}}|removed|
> |{{from}} / {{outputFile}} / {{createManifest}} / …|{{inputJar}} /
> {{archiveFile}} / {{generateOsgiManifest}} / {{sourceExcludes}}|
> Overlapping shaded dependency entries (e.g. antlr4-runtime vs
> antlr4-annotations) use {{DuplicatesStrategy.EXCLUDE}} on
> {{RepackageJarTask}} so the shade is first-wins rather than WARN/duplicate.
> h2. Verification
> * {{./gradlew :repackageJar :groovy-json:repackageJar
> :groovy-servlet:javaxJar :grooidJar}} succeeds.
> * Shaded jars still contain {{groovyjarjar}} classes,
> {{{}META-INF/INDEX.LIST{}}}, and OSGi headers as before.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)