Skip to content

Rewrite Groovy into Java#882

Merged
vjovanov merged 15 commits intomasterfrom
vj/rewrite-java
Jan 7, 2026
Merged

Rewrite Groovy into Java#882
vjovanov merged 15 commits intomasterfrom
vj/rewrite-java

Conversation

@vjovanov
Copy link
Copy Markdown
Member

Fixes: #774

Copy link
Copy Markdown
Member

@jormundur00 jormundur00 left a comment

Choose a reason for hiding this comment

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

Changes look generally good to me (except for the version pattern that needs to be changed).

I see that all these files are still in the groovy sub-directory, which I assume is because the Utils and gradle files are still in written in Groovy. Are there plans to change them to Java too (either in this PR, or a follow-up), so we don't have a misleading groovy directory?

// Fall through to conventional layout resolution below.
}
// Fallback: conventional layout tests/src/<group>/<artifact>/<version>
Path conventional = testRoot().resolve(groupId).resolve(artifactId).resolve(version);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So previously we only matched using tests/src/index.json, and failed otherwise? These fallbacks will be useful once we get rid of that index.json.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We can add this when we need it. For now I have deleted the fallback.

* Pre-release identifiers (case-insensitive): alpha, beta, rc, cr, m<num>, ea, b<num>, preview, and pure numeric suffixes.
* Versions ending with ".Final" are treated as full releases of the base version.
*/
private static final Pattern VERSION_PATTERN = Pattern.compile("(?i)^(\\\\d+(?:\\\\.\\\\d+)*)"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This pattern is not correct. Please take a look at org.graalvm.internal.tck.TestedVersionUpdaterTask#VERSION_PATTERN for the Java equivalent of this Groovy pattern, and either copy it, or even better, reuse it (reference the other from whichever class is best).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed.

…onventional layout and metadata-version; tolerate missing tests index.json in TestInvocationTask
@vjovanov vjovanov merged commit 15207ff into master Jan 7, 2026
29 checks passed
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.

Feature: Use Java instead of Groovy in all the tasks in the repo

2 participants