Skip to content
Closed
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
4213a98
Added initial GH action support
Vest Nov 22, 2024
4d6772e
Upgraded gradle wrapper to 8.11.1.
Vest Nov 22, 2024
89188be
Added testing to gh-action.
Vest Nov 22, 2024
3d1400a
First attempt to log data in test. It failed in GH actions.
Vest Nov 22, 2024
2cf3d44
Added the logging to all tests.
Vest Nov 22, 2024
0f6b522
Added gradle cache to a github action setup-java.
Vest Nov 22, 2024
3e474f9
Disabled logging, but added the test results upload.
Vest Nov 22, 2024
44a4cd7
Enabled "write" permissions for test results
Vest Nov 22, 2024
ccf45fd
Refactored TestHelper.java
Vest Nov 22, 2024
78968a1
Updated cache-dependency-path.
Vest Nov 25, 2024
797b24f
First attempt to cache build/classes and build/jre
Vest Nov 25, 2024
4b2d667
Corrected a typo in gradle.yml
Vest Nov 25, 2024
38eab4b
Try to clear the cache and fill it with values.
Vest Nov 25, 2024
2af5e06
Merge branch 'master' into gh_build
Vest Dec 20, 2024
5b85e17
First step to remove NSIS from the distro;
Vest Dec 22, 2024
ea32a3a
Performance optimization: the debugPrint (when called frequently) use…
Vest Dec 22, 2024
4effb4f
Refactored Logging.java.
Vest Dec 22, 2024
c8495ca
Upgraded gradle-wrapper from 8.11.1 to 8.12
Vest Dec 24, 2024
505d668
Remove .run/ from git repository, because it tracked by mistake in #7056
Vest Dec 24, 2024
5dfc7e0
Refactored several classes. The main goal was adding the Optional to …
Vest Dec 24, 2024
efd9bd9
Merge pull request #2 from PCGen/master
Vest Dec 24, 2024
e049370
Corrected pf_Cleric test;
Vest Dec 27, 2024
e29ad64
Remove "public" and "abstract" for several interfaces (redundant)
Vest Dec 27, 2024
f6466bf
Merge branch 'master' into gh_build
Vest Jan 5, 2025
01b97b5
Added more logging to PcgenFtlTestCase.java (it will help to determin…
Vest Jan 11, 2025
373f2b1
Trimmed different *.xml inputs.
Vest Jan 11, 2025
acd1482
Updated build.gradle - disable security manager for all Test Gradle "…
Vest Jan 11, 2025
ec70b26
Added JavaDoc to Exit* and GracefulExit classes.
Vest Jan 11, 2025
623933e
Resolved warnings for Gradle 8.12: "Space-assignment syntax in Groovy…
Vest Jan 12, 2025
66cebf9
Moved GracefulExit from test to main (util).
Vest Jan 12, 2025
0717621
Refactored CommandLineArguments.java to avoid hidden System.exit calls.
Vest Jan 12, 2025
4b1146e
Corrected failed int (slow) tests
Vest Jan 12, 2025
113a305
Corrected a wrong assertion message
Vest Jan 12, 2025
59833c5
Removed SystemExitInterceptor.java, because it was deprecated;
Vest Jan 13, 2025
857ba4b
Merge branch 'master' into gh_build
Vest Jan 13, 2025
beb34d2
Added a checkstyle rule that prevents the project from System.exit us…
Vest Jan 13, 2025
98e865c
Use the latest version of Freemarker template engine.
Vest Jan 13, 2025
d299d04
Resolved warnings from Gradle.
Vest Jan 13, 2025
8b14c4d
Resolved comments from Github PR.
Vest Jan 14, 2025
198ca33
Merge pull request #3 from Vest/master
Vest Jan 15, 2025
e06d5b4
JaCoCo was added to github actions - now it shows the high-level code…
Vest Jan 31, 2025
05bc739
Merge branch 'master' into gh_build
Vest Jan 31, 2025
a03e8da
Create a jpackage build.
Vest Feb 1, 2025
cbe681d
First attempt to build releases for all OSes.
Vest Feb 1, 2025
095b1ed
Changed the event to build a release conditionally.
Vest Feb 1, 2025
1f6a122
Update gradle-release.yml
Vest Feb 1, 2025
21c2248
Corrected the artifact name
Vest Feb 1, 2025
24b463c
Attempt to create releases
Vest Feb 1, 2025
aebc6a4
Attempt to create releases (v2)
Vest Feb 1, 2025
995136a
Corrected the artifact creation.
Vest Feb 1, 2025
00f09c1
Attempt to create one more release
Vest Feb 1, 2025
592f9e6
Updated JDK from 21.0.5 to 21.0.6
Vest Feb 2, 2025
9febf0c
Corrected a build for Windows (at least).
Vest Feb 5, 2025
40e5157
Added ubuntu-24-arm
Vest Feb 10, 2025
09f54e6
Merge branch 'master' into gh_build
Vest Feb 10, 2025
3175c23
Added a hotfix to repair linux-arm build.
Vest Feb 10, 2025
3244d91
Merge branch 'refs/heads/master' into gh_build
Vest Mar 1, 2025
e77a2d1
Merge branch 'refs/heads/master' into gh_build
Vest Apr 2, 2025
2bb2f77
Update Gradle wrapper to version 8.13 and fix output formatting in gr…
Vest Apr 2, 2025
f47ed9d
Merge branch 'refs/heads/master' into gh_build
Vest May 4, 2025
10599f5
Update Gradle wrapper to version 8.14
Vest May 4, 2025
2bd9d44
Removed jar-export-plugins from pluginbuild.xml
Vest May 6, 2025
dbb8d2d
Update Appveyor config to adjust Gradle commands and formatting
Vest May 6, 2025
489afac
Remove Ant-based build files for Gradle-only build system
Vest May 6, 2025
3228591
Update properties and refine Gradle plugin Jar tasks
Vest May 6, 2025
4bf5e6d
Refactor code style by removing unnecessary whitespace and updating m…
Vest May 9, 2025
bf30f79
Refactored and changed files that didn't pass ```gradle checkstyleMai…
Vest May 9, 2025
7a8cd9e
Refactored and changed files that didn't pass ```gradle checkstyleMai…
Vest May 9, 2025
beb35db
Refactor PluginClassLoader
Vest May 10, 2025
b35be04
Add plugins.gradle to Gradle configuration for release and test workf…
Vest May 10, 2025
f7ee009
Merge branch 'master' into gh_build
Vest Aug 4, 2025
3d482c1
Update Gradle wrapper to version 9.0.0 and fix classpath configuratio…
Vest Aug 4, 2025
ce371bc
Update JavaFX version to 21.0.8 and improve URIFactory error handling…
Vest Aug 4, 2025
db579b8
Improve README formatting and grammar for clarity and consistency
Vest Aug 4, 2025
8d4df31
Refactor test task configurations to use correct directory paths for …
Vest Aug 4, 2025
2c84e66
Changed PluginBuildTest, because the new plugins are built from corre…
Vest Oct 16, 2025
5b64be3
Merge branch 'master' into gh_build
Vest Oct 16, 2025
f18e0e6
Updated Java to 21.0.8 (mac aarch64)
Vest Oct 16, 2025
68cfb1d
Merge branch 'master' into gh_build
Vest Nov 5, 2025
61ed417
Update Gradle wrapper to version 9.2.0 and refactor dependency declar…
Vest Nov 5, 2025
246ab50
Update Java&JavaFX to 25.0.1 and JaCoCo to 0.8.14 versions in build.g…
Vest Nov 5, 2025
7d9d599
Add native access flags for JavaFX modules in distribution.gradle
Vest Nov 9, 2025
b8384d4
Refactor JavaFX resource loading by introducing PanelFromResource uti…
Vest Nov 10, 2025
810228d
Reverted a part of #7462, that broke DescriptionTest.
Vest Nov 15, 2025
1910d4b
Update FXML files to use JavaFX 25.0.1 namespace
Vest Nov 15, 2025
8181e05
Merge branch 'master' into gh_build
Vest Nov 25, 2025
3f5c96f
Corrected checkstyle findings
Vest Nov 25, 2025
31954ae
Updated PMD to 7.17
Vest Dec 1, 2025
2555af3
Merge branch 'master' into gh_build
Vest Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 62 additions & 11 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,70 @@
name: Java CI
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

on: [push]
name: Build PCGen with Gradle

on:
push:
branches: [ "gh_build" ] # use the current branch for testing purposes only
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write

steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Build with Gradle
run: ./gradlew build
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
cache-dependency-path: |
build.gradle
code/gradle/autobuild.gradle
code/gradle/distribution.gradle
code/gradle/release.gradle
code/gradle/reporting.gradle

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-disabled: false
cache-read-only: false
cache-overwrite-existing: true

- uses: actions/cache@v4
with:
path: |
build/classes
build/jre
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Build with Gradle Wrapper
run: ./gradlew build test slowtest

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
build/test-results/**/*.xml
build/test-results/**/*.trx
build/test-results/**/*.json

# - name: Upload build artifacts
# uses: actions/upload-artifact@v4
# with:
# name: Package
# path: build/libs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ code/build.eclipse/

# IntelliJ IDE
.idea/
.run/
out/
pcgendev.iml
pcgen.iml
Expand Down
11 changes: 0 additions & 11 deletions .run/Main.run.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">

<suppressions>
<suppress checks=".*" files=".*pcgen.base.formula.parse.*"/>
</suppressions>

11 changes: 4 additions & 7 deletions PCGen-Formula/code/standards/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
Expand Down Expand Up @@ -83,12 +84,8 @@
</module>
<module name="NewlineAtEndOfFile"/>
<module name="Translation"/>


<module name="SuppressWarningsFilter"/>

<module name="SuppressionFilter">
<property name="file" value="${suppressionFile}" default="suppressions.xml"/>
<property name="file" value="${suppressionFile}" default="checkstyle-suppressions.xml"/>
</module>

</module>
4 changes: 2 additions & 2 deletions PCGen-Formula/code/standards/spotbugs_ignore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<Bug pattern="SE_NO_SERIALVERSIONID,SE_COMPARATOR_SHOULD_BE_SERIALIZABLE,SE_BAD_FIELD" />
</Match>
<Match>
<!-- not relevent to pcgen -->
<Bug pattern="IJU_SETUP_NO_SUPER,DP_DO_INSIDE_DO_PRIVILEGED,DM_EXIT" />
<!-- not relevant to pcgen -->
<Bug pattern="IJU_SETUP_NO_SUPER,DP_DO_INSIDE_DO_PRIVILEGED" />
</Match>
<Match>
<!-- we have other tools for code style -->
Expand Down
2 changes: 1 addition & 1 deletion PCGen-Formula/gradle/reporting.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

checkstyle {
configFile = new File('code/standards/checkstyle.xml')
configProperties = [ "suppressionFile" : project(':').file('code/standards/suppressions.xml')]
configProperties = [ "suppressionFile" : project(':').file('code/standards/checkstyle-suppressions.xml')]
ignoreFailures = true
showViolations = false
sourceSets = []
Expand Down
5 changes: 3 additions & 2 deletions PCGen-base/code/standards/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
Expand Down
4 changes: 2 additions & 2 deletions PCGen-base/code/standards/spotbugs_ignore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<Bug pattern="SE_NO_SERIALVERSIONID,SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
</Match>
<Match>
<!-- not relevent to pcgen -->
<Bug pattern="IJU_SETUP_NO_SUPER,DP_DO_INSIDE_DO_PRIVILEGED,DM_EXIT" />
<!-- not relevant to pcgen -->
<Bug pattern="IJU_SETUP_NO_SUPER,DP_DO_INSIDE_DO_PRIVILEGED" />
</Match>
<Match>
<!-- we have other tools for code style -->
Expand Down
39 changes: 23 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ repositories {
//}
ivy {
// TODO Enable HTTPS (e.g., add letsencrypt) for that location
name "fileRepo"
url 'http://pc-gen.org/librepo/'
name = 'fileRepo'
url = 'http://pc-gen.org/librepo/'
allowInsecureProtocol = true
}
// Use Maven plugin to reference freehep (https://java.freehep.org/) artifact repository
Expand All @@ -125,7 +125,7 @@ repositories {
// TODO Which libs do we pull from here?
maven {
name = 'jboss'
url "https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/"
url = 'https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/'
}
}

Expand Down Expand Up @@ -414,7 +414,9 @@ tasks.named("jpackageImage") {
copy {
from layout.projectDirectory.dir("installers/mac-installer")
include "MacDirLauncher"
fileMode 0755
filePermissions {
unix(0755)
}
into layout.buildDirectory.dir("jpackage/PcGen.app/Contents/MacOS")
}
ant.replace(file: layout.buildDirectory.file("jpackage/PcGen.app/Contents/Info.plist").get(),
Expand Down Expand Up @@ -570,7 +572,7 @@ tasks.register("downloadJRE") {
return
} else if (jreDir.exists()) {
println "Delete the previously downloaded JDK at ${jreDir} as outdated. JavaFX modules will be deleted from jdkDir/jmods."
project.delete(jreDir)
delete(jreDir)
}

println("Downloading Java ${major} ${arch} for ${os} from ${url}")
Expand Down Expand Up @@ -602,7 +604,7 @@ tasks.register("downloadJRE") {
}
}

project.delete(archFile)
delete(archFile)
}

file("${projectDir}/jre/${os}/jre_${arch}").list().each { f ->
Expand Down Expand Up @@ -748,6 +750,10 @@ tasks.named("jre") {
dependsOn downloadJRE, downloadJavaFXModules
}

tasks.withType(Test) {
testLogging.showStandardStreams = false
}

tasks.named("test", Test) {
exclude 'pcgen/testsupport/**'
useJUnitPlatform()
Expand Down Expand Up @@ -848,6 +854,7 @@ allprojects {
'-Dprism.order=sw',
'-Dprism.verbose=true',
'-Djavafx.macosx.embedded=true',
'-Djava.security.manager=disallow',

"--module-path", layout.projectDirectory.dir("mods/lib"),
"--add-modules", "javafx.controls,javafx.web,javafx.swing,javafx.fxml,javafx.graphics",
Expand Down Expand Up @@ -951,7 +958,7 @@ apply from: 'code/gradle/reporting.gradle'
apply from: 'code/gradle/release.gradle'

tasks.register("allTasks") {
dependsOn build, slowtest, javadoc, buildNsis, allReports
dependsOn build, slowtest, javadoc, allReports
description = "Runs tasks build, slowtest, javadoc, buildNsis and allReports"
}

Expand All @@ -964,17 +971,17 @@ tasks.named("clean") {

doLast {
// Delete a file generated by pluginbuild.xml
project.delete(layout.projectDirectory.file("code/manifest"))
delete(layout.projectDirectory.file("code/manifest"))

// Delete plugin folders
project.delete(
layout.projectDirectory.dir("plugins/bonusplugins"),
layout.projectDirectory.dir("plugins/converterplugins"),
layout.projectDirectory.dir("plugins/jepplugins"),
layout.projectDirectory.dir("plugins/lstplugins"),
layout.projectDirectory.dir("plugins/outputplugins"),
layout.projectDirectory.dir("plugins/preplugins"),
layout.projectDirectory.dir("plugins/systemlstplugins")
delete(
layout.projectDirectory.dir("plugins/bonusplugins"),
layout.projectDirectory.dir("plugins/converterplugins"),
layout.projectDirectory.dir("plugins/jepplugins"),
layout.projectDirectory.dir("plugins/lstplugins"),
layout.projectDirectory.dir("plugins/outputplugins"),
layout.projectDirectory.dir("plugins/preplugins"),
layout.projectDirectory.dir("plugins/systemlstplugins")
)
}
}
7 changes: 2 additions & 5 deletions code/gradle/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,14 @@ tasks.register("cleanNsis", Delete) {

tasks.register("sourcesJar", Jar) {
dependsOn classes, copyToOutput, createExe, distTar, distZip, layoutNsisBase, startScripts
duplicatesStrategy DuplicatesStrategy.INCLUDE
duplicatesStrategy = DuplicatesStrategy.INCLUDE
description = "build source jar file"
archiveClassifier.set('sources')
from sourceSets.main.allSource
}

tasks.register("assembleArtifacts", Copy) {
dependsOn build, runtimeZip, sourcesJar, buildNsis
dependsOn build, runtimeZip, sourcesJar

if (Os.isFamily(Os.FAMILY_MAC) || Os.isFamily(Os.FAMILY_UNIX))
{
Expand All @@ -431,9 +431,6 @@ tasks.register("assembleArtifacts", Copy) {
into releaseDir
// buildNsis puts the exe into the release folder directly

from(layout.buildDirectory.dir("nsisRelease")){
include '*.exe'
}
from(layout.buildDirectory.dir("libs")){
include 'pcgen*-sources.jar'
}
Expand Down
6 changes: 3 additions & 3 deletions code/gradle/reporting.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ checkstyle {
configFile = new File('code/standards/checkstyle.xml')
configProperties = [samedir: "${rootDir}/code/standards"]
showViolations = true
toolVersion = '10.20.1'
toolVersion = '10.21.1'
sourceSets = []
}

Expand All @@ -19,7 +19,7 @@ pmd {
ruleSetFiles = files('code/standards/ruleset.xml')
consoleOutput = true
sourceSets = []
toolVersion = "7.7.0"
toolVersion = "7.9.0"
incrementalAnalysis = true
}

Expand All @@ -39,7 +39,7 @@ spotbugsMain {
reports {
xml.required = false
html.required = true
html.stylesheet resources.text.fromFile('code/standards/fancy-hist.xsl')
html.stylesheet = resources.text.fromFile('code/standards/fancy-hist.xsl')
}
}

Expand Down
3 changes: 1 addition & 2 deletions code/src/java/pcgen/cdom/base/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
@SuppressWarnings("PMD.ConstantsInInterface")
public interface Constants
{

/********************************************************************
* Static definitions of Equipment location strings
********************************************************************/
Expand Down Expand Up @@ -111,7 +110,7 @@ public interface Constants
String INTERNAL_WEAPON_PROF = "PCGENi_WEAPON_PROFICIENCY"; //$NON-NLS-1$

/** Line Separator. */
String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
String LINE_SEPARATOR = System.lineSeparator(); //$NON-NLS-1$

/** The constant string "None". */
String NONE = "None"; //$NON-NLS-1$
Expand Down
12 changes: 6 additions & 6 deletions code/src/java/pcgen/core/Globals.java
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ public static void clearCampaignsForRefresh()

/**
* Check if enough data has been loaded to support character creation.
* Will also report to the log the number of items of each of the
* necessary types that are currently loaded.
* Will also report to the log the number of items of each of the
* necessary types that are currently loaded.
* @return true or false
*/
public static boolean displayListsHappy()
Expand Down Expand Up @@ -722,7 +722,7 @@ public static boolean selectPaper(final String paperName)
}

/**
* Apply the user's preferences to the initial state of the Globals.
* Apply the user's preferences to the initial state of the Globals.
*/
public static void initPreferences()
{
Expand Down Expand Up @@ -789,8 +789,8 @@ static List<? extends CDOMObject> sortPObjectList(final List<? extends CDOMObjec

/**
* Sort Pcgen Object list by name
* @param <T>
*
* @param <T>
*
* @param aList
* @return Sorted list of Pcgen Objects
*/
Expand Down Expand Up @@ -1033,7 +1033,7 @@ else if (fType.equals("mac_user"))

private static int bonusParsing(final String l, final int level, int num, final PlayerCharacter aPC)
{
// should be in format levelnum,rangenum[,numchoices]
// should be in format levelnum,rangenum[,numchoices]
final StringTokenizer aTok = new StringTokenizer(l, "|", false);
final int startLevel = Integer.parseInt(aTok.nextToken());
final String rangeLevelFormula = aTok.nextToken();
Expand Down
Loading