refactoring gradle.build: Use gradle's task parallelization and caching to speedup builds#7556
Merged
Merged
Conversation
Bumps [org.springframework:spring-core](https://github.com/spring-projects/spring-framework) from 6.0.10 to 6.0.11. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](spring-projects/spring-framework@v6.0.10...v6.0.11) --- updated-dependencies: - dependency-name: org.springframework:spring-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Goldielocks has incorrect value displayed for darkvision in the ability. * NEWSOURCE-424 Starfinder Near Space request
* Goldielocks has incorrect value displayed for darkvision in the ability. * NEWSOURCE-435 Request for Vanguard (Path of Iron - Ascension Games)
…en#6902) Bumps [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) from 5.9.3 to 5.10.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.9.3...r5.10.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…CGen#6906) Bumps [org.junit.platform:junit-platform-runner](https://github.com/junit-team/junit5) from 1.9.3 to 1.10.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-runner dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…6905) Bumps [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5) from 5.9.3 to 5.10.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.9.3...r5.10.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…en#6903) Bumps [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.9.3 to 5.10.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.9.3...r5.10.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…CGen#6904) Bumps [org.junit.platform:junit-platform-launcher](https://github.com/junit-team/junit5) from 1.9.3 to 1.10.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-launcher dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps org.apache.commons:commons-lang3 from 3.12.0 to 3.13.0. --- updated-dependencies: - dependency-name: org.apache.commons:commons-lang3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps edu.sc.seis.launch4j from 3.0.3 to 3.0.4. --- updated-dependencies: - dependency-name: edu.sc.seis.launch4j dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps com.github.spotbugs from 5.0.14 to 5.1.0. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps com.github.spotbugs from 5.1.0 to 5.1.1. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.github.spotbugs from 5.1.1 to 5.1.2. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps com.github.spotbugs from 5.1.2 to 5.1.3. --- updated-dependencies: - dependency-name: com.github.spotbugs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps org.apache.xmlgraphics:fop from 2.8 to 2.9. --- updated-dependencies: - dependency-name: org.apache.xmlgraphics:fop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Vest <Vest@users.noreply.github.com>
# Conflicts: # .github/workflows/gradle-release.yml # AGENTS.md # build.gradle # code/src/utest/pcgen/persistence/lst/URIFactoryTest.java # gradle.properties
Signed-off-by: Vest <Vest@users.noreply.github.com>
…-compilation The previous downloadJRE/downloadJavaFXModules tasks used imperative doLast logic incompatible with the configuration cache, and extractJDKs was broken (ran checks at configuration time, always reported NO-SOURCE). Replace with declarative per-platform Download and Copy tasks that run in parallel, support proper up-to-date checks, and are configuration-cache compatible. The runtime plugin now references jdks/ instead of jre/. Removed default task - build. Signed-off-by: Vest <Vest@users.noreply.github.com>
# Conflicts: # gradlew.bat
Vest
commented
May 11, 2026
Contributor
Author
There was a problem hiding this comment.
I have updated Gradle to 9.5.0
Xalan 2.x is effectively unmaintained and causes module-system friction in jlink builds. Saxon-HE 12.7 is the modern replacement and registers the same javax.xml.transform.TransformerFactory SPI. - Remove xalan:xalan and xalan:serializer dependencies; exclude them from FOP's transitive graph so they cannot re-enter - Add net.sf.saxon:Saxon-HE:12.7 - Explicitly name Saxon's TransformerFactoryImpl in FopTask rather than relying on classpath SPI ordering - Replace org.apache.xml.utils.XMLChar.isValid() in AbstractToken with an inline XML 1.0 §2.2 character validity check, eliminating the last direct reference to the Xalan serializer jar - Update jlink forceMerge and drop the now-unnecessary excludeProvides for org.apache.xalan.extensions.bsf.BSFManager - Replace xalan:nodeset() with exsl:node-set() and update namespace declarations across 171 output sheet XSLT files for Saxon compatibility
…tion
The badass-jlink-plugin (org.beryx.jlink) replaces org.beryx.runtime
which is incompatible with Gradle 9's configuration cache. These
supporting changes complete the migration:
- Add module-info.java declaring the pcgen module with its requires,
exports, and opens directives for JPMS compliance
- Update distribution.gradle: replace runtimeZip with jlinkZip, fix
installDist to avoid config-cache-unsafe delete{} block
- Update release.gradle: replace runtimeZip with jlinkZip, reference
fullJpackage task for Mac/Linux artifact assembly
Fixes 'Expression should be of type number' warnings by making the string-to-number conversion explicit in all outputsheet XSL files.
- MacDirLauncher: cd to Contents/app so PCGen finds data/plugins/preview/ outputsheets, invoke PcGen binary via absolute path - module-info.java: open pcgen.gui3.* packages for JavaFX FXML reflection - assembleJpackageImage: always re-copy since jpackageImage wipes the output directory on rebuild
IntelliJ enforces module boundaries strictly unlike the Gradle build which uses --patch-module to merge dependencies into the pcgen module.
Fixes stale task names, plugin versions, and tool versions that drifted as build.gradle evolved (cleanJre→cleanJdks, JUnit 5→6, Checkstyle 12→13, SpotBugs plugin 6.4→6.5, PMD version added, jpackage→fullJpackage, download task names corrected, jlink plugin version noted).
jdk.jsobject was deprecated for removal in Java 22 (JEP 471). JavaFX 22+ bundles its own JSObject support in javafx.web, so the explicit JDK module dependency is no longer needed.
Move classes out of packages shared with PCGen-base/PCGen-Formula jars
so that those jars can live on --module-path as proper modules instead
of being merged via --patch-module:
- pcgen.base.util.{NamedFormula,ProxyUtilities,RandomUtil,WeightedCollection} → pcgen.util
- pcgen.base.format.HandedManager → pcgen.format
This eliminates the split-package violation that prevented javac from
seeing PCGen.base and PCGen.Formula as separate modules during
compilation, allowing the requires directives in module-info.java to
work with both Gradle and IntelliJ.
- Remove fat jar: dependencies are now separate jars handled by jlink's forceMerge rather than bundled into pcgen.jar - Add xmlresolver to forceMerge to resolve package export conflict - Replace --patch-module with --module-path for compileJava: all dependencies are now visible as proper modules - Add requires directives for all runtime dependencies in module-info.java so the compiler can resolve them on the module-path
- Remove --patch-module hack from compileJava, place all dependencies on --module-path so IntelliJ and Gradle use the same module resolution - Add requires directives to module-info.java for all runtime deps (commons-lang3, commons-io, fop-core, fop-events, xmlgraphics-commons, spring, freemarker, jdom2, argparse4j, controlsfx, xmlunit, Saxon, jep) - Open additional packages to Spring for reflective bean instantiation - Add sourceSets.test.output to itest/slowtest compile classpaths so IntelliJ maps the test module dependency at Compile scope, not Runtime
The plugin was causing configuration cache warnings (SourceSetContainer serialization). JavaFX modules are already managed manually via downloadJavaFXLocal/extractJavaFXLocal tasks and explicit --module-path args. The jlink task now depends on downloadJavaFXMods directly to get JavaFX jmods into the target JDK.
Without the javafxplugin, IntelliJ can't find javafx.controls etc. Adding the local mods/lib jars as implementation dependencies makes them visible to the IDE while Gradle still uses --module-path.
…issues - Exclude module-info.java from Checkstyle (it uses syntax Checkstyle can't parse) - Remove redundant same-package import in RandomUtil.java - Fix incorrect @param tag in AbstractToken.isValidXMLChar()
Contributor
Author
|
Unfortunately several hundreds XSLT files were modified, because I have removed xalan from dependencies: 54f893d It doesn't bring much into the project, but adds a legacy headache. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Migrates the PCGen build to JPMS, replaces the Xalan XSLT processor with Saxon-HE, swaps the runtime/jpackage plugin to
org.beryx.jlink, rewrites the JDK download/extract for cross-platform parallel builds, and enables Gradle's configuration cache.Java Platform Module System (JPMS) migration
code/src/java/module-info.javadeclaring thepcgenmodule with explicitrequires(java.desktop, java.xml, javafx.*, PCGen.base, PCGen.Formula, Saxon.HE, FOP, Spring, etc.)jdk.jsobjectmodule requirement.XSLT processor: Xalan → Saxon-HE
xalan:xalanandxalan:serializerfrom the FOP exclude block; addsnet.sf.saxon:Saxon-HE:12.9..xsltfiles inoutputsheets/: replaces the Xalan-specific namespacexmlns:xalan="http://xml.apache.org/xalan"with the portable EXSLT namespacexmlns:exsl="http://exslt.org/common".substring-before(...)innumber(...)where the result is used in arithmetic — Saxon is stricter than Xalan about string-to-number coercion in XSLT 1.0.Runtime image: org.beryx.runtime → org.beryx.jlink
org.beryx.runtimeplugin to drive jpackage. This branch swaps toorg.beryx.jlink, which is the maintained successor and integrates with JPMS module graphs.MacDirLauncherscript swap, gui3 packages opened for reflection.Cross-platform JDK download
The old
downloadJRE/downloadJavaFXModulesused imperativedoLastblocks that were incompatible with the configuration cache, andextractJDKswas effectively broken (its checks ran at configuration time and always reportedNO-SOURCE). The replacement is declarativeDownload+Copytasks per platform with proper up-to-date checks.jre/→jdks/to reflect that we now pull full JDKs (jlink and jpackage needjavacand thejmodsdirectory, not a stripped JRE).targetPlatform(...)registration now host-aware: only registers the current host's platform unlessPCGEN_ALL_PLATFORMS=trueis set (CI uses platform-specific runners and sets this on each).JavaFX dependency wiring
org.openjfx.javafxpluginbecause it duplicated the manual setup.Gradle configuration cache
org.gradle.configuration-cacheflipped fromfalsetotrue(parallel, warn-on-problem mode).Misc
AGENTS.mdupdated to reflect the new build script structure.module-info.javaexcluded from checks (the syntax isn't recognized by the project's checkstyle config);defaultTasksdeclaration.