Skip to content

Build/test cleanup: drop duplicated test JVM args, refresh stale Javadoc#7587

Merged
karianna merged 1 commit into
PCGen:masterfrom
Vest:cleanup_easy_todo_bundle
Jun 6, 2026
Merged

Build/test cleanup: drop duplicated test JVM args, refresh stale Javadoc#7587
karianna merged 1 commit into
PCGen:masterfrom
Vest:cleanup_easy_todo_bundle

Conversation

@Vest

@Vest Vest commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • build.gradle: drop six duplicated JVM args from the tasks.named("test", Test) block — they are already applied to every Test by the tasks.withType(Test).configureEach block (-Dtestfx.robot=glass, -Dtestfx.headless=true, -Dprism.order=sw, --add-exports for javafx.graphics/com.sun.javafx.util and javafx.base/com.sun.javafx.logging, --add-opens javafx.graphics/com.sun.glass.ui). Each was landing on the test JVM command line twice. Kept --add-opens javafx.graphics/com.sun.javafx.application because withType has --add-exports (not --add-opens) for that package, and TestFX's @AfterEach cleanup uses setAccessible(true) deep reflection on ParametersImpl.
  • PluginBuildTest.java: refresh stale class Javadoc — it still referenced the deleted Ant pluginbuild.xml. Updated to describe what the test actually does (every plugin/<category>/ source file is packaged into the matching <category>plugins.jar).

Test plan

  • ./gradlew help — build script parses
  • ./gradlew compileTestJava — clean compile
  • ./gradlew :test --tests pcgen.gui3.dialog.AboutDialogTest — TestFX test still passes (confirms the kept --add-opens is sufficient for ParametersImpl deep reflection)

* build.gradle: drop duplicated test-task JVM args

  tasks.named("test", Test) re-added six args that
  tasks.withType(Test).configureEach already applies to every Test:
  -Dtestfx.robot=glass, -Dtestfx.headless=true, -Dprism.order=sw,
  --add-exports for javafx.graphics/com.sun.javafx.util and
  javafx.base/com.sun.javafx.logging, and --add-opens for
  javafx.graphics/com.sun.glass.ui. Each was landing on the test JVM
  command line twice.

  Kept --add-opens javafx.graphics/com.sun.javafx.application: withType
  has --add-exports (not --add-opens) for that package, and TestFX's
  @AfterEach cleanup uses setAccessible(true) on a private field of
  ParametersImpl, which exports alone don't satisfy. Verified by running
  pcgen.gui3.dialog.AboutDialogTest after the cleanup.

* PluginBuildTest: refresh stale class Javadoc

  The class Javadoc still referenced the deleted Ant pluginbuild.xml.
  Now describes what the test actually does today: every plugin source
  file under code/src/java/plugin/<category>/ is packaged into the
  matching <category>plugins.jar produced by code/gradle/plugins.gradle.
@karianna karianna merged commit 4fa2b89 into PCGen:master Jun 6, 2026
3 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.

2 participants