Skip to content

GROOVY-11995 groovyc ant task could support passing through system properties or jvmargs#2516

Merged
paulk-asert merged 1 commit into
apache:masterfrom
paulk-asert:groovy11995
May 5, 2026
Merged

GROOVY-11995 groovyc ant task could support passing through system properties or jvmargs#2516
paulk-asert merged 1 commit into
apache:masterfrom
paulk-asert:groovy11995

Conversation

@paulk-asert
Copy link
Copy Markdown
Contributor

@paulk-asert paulk-asert commented May 4, 2026

This currently combines a modified GROOVY-11994 which I was using for testing. I'll split out before merging.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 4, 2026

Codecov Report

❌ Patch coverage is 82.35294% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.7906%. Comparing base (36870fa) to head (7b80cc5).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
...src/main/java/org/codehaus/groovy/ant/Groovyc.java 82.3529% 4 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##               master      #2516        +/-   ##
==================================================
+ Coverage     67.3329%   67.7906%   +0.4576%     
+ Complexity      32276      32256        -20     
==================================================
  Files            1490       1489         -1     
  Lines          125080     123886      -1194     
  Branches        22525      22243       -282     
==================================================
- Hits            84220      83983       -237     
+ Misses          33535      32626       -909     
+ Partials         7325       7277        -48     
Files with missing lines Coverage Δ
...src/main/java/org/codehaus/groovy/ant/Groovyc.java 50.1027% <82.3529%> (+2.4206%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@testlens-app
Copy link
Copy Markdown

testlens-app Bot commented May 4, 2026

✅ All tests passed ✅

🏷️ Commit: 7c174dd
▶️ Tests: 97254 executed
⚪️ Checks: 24/24 completed


Learn more about TestLens at testlens.app.

@paulk-asert paulk-asert changed the title GROOVY-11994: GEP-16: Missing groovy.val.enabled flag GROOVY-11995 groovyc ant task could support passing through system properties or jvmargs May 5, 2026
@paulk-asert paulk-asert marked this pull request as draft May 5, 2026 04:47
@paulk-asert paulk-asert requested a review from Copilot May 5, 2026 13:31
@paulk-asert paulk-asert marked this pull request as ready for review May 5, 2026 13:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for passing JVM arguments and system properties through the groovyc Ant task when running in fork="true" mode, aligning the task more closely with Ant’s <java> task capabilities.

Changes:

  • Add nested <jvmarg>, <sysproperty>, and <syspropertyset> support for forked groovyc invocations.
  • Add inheritAll to optionally pass all parent Ant project properties as -D system properties to the forked compiler JVM.
  • Add tests and documentation covering the new forked JVM argument/property wiring and precedence rules.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java Implements forked JVM arg / sysproperty propagation and inheritAll behavior in the forked command line builder.
subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java Adds tests verifying JVM args, sysproperties, syspropertysets, and precedence when building the forked command line.
subprojects/groovy-ant/src/spec/doc/groovyc-ant-task.adoc Documents new inheritAll attribute and the new nested elements for forked compiler configuration.

Comment thread subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java Outdated
Comment thread subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java Outdated
@paulk-asert paulk-asert merged commit 5f5bf92 into apache:master May 5, 2026
23 of 24 checks passed
@paulk-asert paulk-asert deleted the groovy11995 branch May 5, 2026 14:04
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.

3 participants