diff --git a/AGENTS.md b/AGENTS.md index d670e9e7c37..f3a349600f9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,7 +55,6 @@ Always use the wrapper (`./gradlew`). Java 25 (Temurin) is required; Gradle will | `./gradlew sfinttest rsrdinttest srdinttest msrdinttest` | Per-game-mode integration test variants | | `./gradlew testCoverage` | Jacoco coverage report (build/reports/jacoco/testCoverage/html) | | `./gradlew allReports` | Checkstyle + PMD + SpotBugs reports | -| `./gradlew buildDist` | Assemble distribution zips (data/docs/program/libs + runtime) | | `./gradlew qbuild` | Quick dev binary to output/ | | `./gradlew run` | Run the app (JavaFX modules configured automatically) | | `./gradlew fullJpackage` | Create native app image/installer via jpackage | @@ -128,7 +127,6 @@ Conventions/gotchas observed: - Release tasks: - `prepareRelease` (build; version handling via `releaseUtils.groovy`) - `pcgenRelease` (prepareRelease + assembleArtifacts + checksum) - - `pcgenReleaseOfficial` (pcgenRelease + updateVersionRelease) - `updateVersionToNext` (Groovy helper in `releaseUtils.groovy` that bumps the trailing numeric segment by 1, zero-padded to two digits, and appends `-SNAPSHOT`; used by the manual release workflow's post-build bump step). - Artifacts collected into build/release; jpackage produces platform installers under build/jpackage. - Release CI builds on: ubuntu-latest (x64), ubuntu-24.04-arm, macos-latest, windows-latest. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 05bc8305779..00000000000 --- a/appveyor.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: 1.0.{build} - -pull_requests: - do_not_increment_build_number: true - -nuget: - disable_publish_on_pr: true - -install: - - cmd: | - choco install gradle nsis -build_script: - gradle build --info --no-daemon - -test_script: - gradle test compileSlowtest datatest pfinttest buildDist --info --no-daemon - -environment: - matrix: - - JAVA_HOME: C:\Program Files\Java\jdk11 - -artifacts: -- path: '**/release/*.exe' - name: PCGen Installer - -- path: '**/build/distributions/*.zip' - name: PCGen Zip Distribution - -- path: '**/build/distributions/*.tar' - name: PCGen Tar Distribution - -matrix: - fast_finish: true - -cache: - - C:\Users\appveyor\.gradle diff --git a/build.gradle b/build.gradle index 293fa82fc09..0dc3e4ea4ae 100644 --- a/build.gradle +++ b/build.gradle @@ -66,9 +66,8 @@ ext { // Full JavaFX patch version (e.g. 25.0.3). Major must match javaVersion above. javafxVersion = providers.gradleProperty('javafxVersion').get() - // Project version with -SNAPSHOT stripped. Shared between jpackage's - // appVersion (further sanitised below) and release.gradle's release-notes - // path so the two can't drift. + // Project version with -SNAPSHOT stripped, used to derive jpackage's + // appVersion (further sanitised below). plainVerNum = version.replaceAll('-SNAPSHOT', '') } @@ -507,10 +506,10 @@ tasks.register("copyToLibs", Copy) { from configurations.runtimeClasspath } -// distZip/distTar are unused: CI publishes the custom buildDist zips -// (see code/gradle/distribution.gradle) and the jpackage native installers, -// not the built-in distribution-plugin archives. Disable them so they don't -// materialize ~150 runtime JARs into build/distributions/ on every build. +// distZip/distTar would materialize ~150 runtime JARs into +// build/distributions/ on every build. CI publishes jpackage native +// installers and the portable zip instead, not the application +// plugin's archives, so disable them. tasks.named("distZip") { enabled = false } tasks.named("distTar") { enabled = false } // jlink's prepareMergedJarsDir reads from build/libs, which copyToLibs populates. @@ -854,7 +853,6 @@ tasks.named("wrapper") { // Bring in the rest of the gradle build config apply from: 'code/gradle/distribution.gradle' -apply from: 'code/gradle/autobuild.gradle' // depends on distribution.gradle apply from: 'code/gradle/reporting.gradle' apply from: 'code/gradle/release.gradle' apply from: 'code/gradle/plugins.gradle' diff --git a/code/gradle/autobuild.gradle b/code/gradle/autobuild.gradle deleted file mode 100644 index c2b48496b07..00000000000 --- a/code/gradle/autobuild.gradle +++ /dev/null @@ -1,48 +0,0 @@ -/* - * PCGen autobuild generation tasks. This file specifies the way in which the - * autobuild site is generated and the outputs from other tasks that are to be - * deployed with the site. - * - * Usage: ./gradlew deployAutobuild - * - * Note: buildTimestamp is defined in distribution.gradle (applied first). - */ -ext { - if (System.env.BUILD_NUMBER) { - destAutobuildDir = file('/home/pcgen1/public_html/autobuilds/') - } else { - destAutobuildDir = layout.buildDirectory.dir("autobuilds").get() - } -} - -tasks.register("copyDocs", Sync) { - from 'docs' - into destAutobuildDir.dir("pcgen-docs/") -} - -tasks.register("copyDist", Sync) { - dependsOn buildDist - from layout.buildDirectory.dir("distributions") - into destAutobuildDir.dir("downloads") -} - -tasks.register("copySite", Copy) { - // Ensure this always runs - we don't want an incorrect date - outputs.upToDateWhen { false } - from layout.projectDirectory.dir("code/gradle/site") - into destAutobuildDir - expand(copyright: Calendar.instance.get(Calendar.YEAR), version: version, timestamp: buildTimestamp, - simpleVersion: version.replaceAll('-SNAPSHOT', '').replaceAll(/\./, '')) -} - -tasks.register("copyInstaller", Copy) { - // Ensure this always runs - we don't want an outdated installer - outputs.upToDateWhen { false } - from "${releaseDir}" - into destAutobuildDir.dir("downloads") -} - -// The Main Task -tasks.register("deployAutobuild") { - dependsOn copyDocs, copyDist, copySite, copyInstaller -} diff --git a/code/gradle/autobuild.template b/code/gradle/autobuild.template deleted file mode 100644 index 64645eb7e99..00000000000 --- a/code/gradle/autobuild.template +++ /dev/null @@ -1,3 +0,0 @@ -# Properties specified by the autobuild -BuildTime=${timestamp} -BuildNumber=${buildnumber} \ No newline at end of file diff --git a/code/gradle/config.ini b/code/gradle/config.ini deleted file mode 100644 index 08f917aaed9..00000000000 --- a/code/gradle/config.ini +++ /dev/null @@ -1,5 +0,0 @@ -# -# config.ini -- location of other .ini files set in pcgen -# Do not edit this file manually. - -settingsPath=user \ No newline at end of file diff --git a/code/gradle/distribution.gradle b/code/gradle/distribution.gradle index 19a4fc6a6ee..e01d883259d 100644 --- a/code/gradle/distribution.gradle +++ b/code/gradle/distribution.gradle @@ -1,27 +1,15 @@ import java.time.LocalDateTime /* - * PCGen distributable generation tasks. This file specifies the - * archives included in the PCGen autobuild and PCGen releases. It - * is called from the main build.gradle file. + * PCGen distributable generation tasks. Contributes copy specs that + * the application plugin's installDist consumes; jpackage then turns + * the install image into native installers (see release.gradle). * - * Usage: ./gradlew builddist + * Called from the main build.gradle file. */ ext { - zipRootFolder = "pcgen" - buildTimestamp = LocalDateTime.now(Clock.systemUTC()) - autobuildSpec = copySpec{} - - if (System.env.BUILD_NUMBER) { - autobuildSpec = copySpec { - from('code/gradle/autobuild.template') - rename('.+','autobuild.properties') - expand(buildnumber: System.env.BUILD_NUMBER, version: version, timestamp: buildTimestamp) - } - } - dataDistsImage = copySpec { from('.') { include 'data/**' @@ -51,13 +39,6 @@ ext { } } - libsDistsImage = copySpec { - from(layout.buildDirectory.dir("libs")) { - into 'libs' - exclude 'pcgen-*.jar' - } - } - charactersImage = copySpec { from('.') { include 'characters/*.pcg' @@ -72,7 +53,6 @@ application { applicationDistribution.with(dataDistsImage) applicationDistribution.with(docsDistsImage) - applicationDistribution.with(autobuildSpec) applicationDistribution.with(charactersImage) applicationDistribution.with(programScriptImage) } @@ -107,43 +87,3 @@ tasks.named("installDist") { } } } - -tasks.register("dataZip", Zip) { - dependsOn copyMasterSheets - archiveClassifier.set('data') - into(zipRootFolder) { - with dataDistsImage - with autobuildSpec - } -} - -tasks.register("docsZip", Zip) { - archiveClassifier.set('docs') - into(zipRootFolder) { - with docsDistsImage - with autobuildSpec - } -} - -tasks.register("programZip", Zip) { - dependsOn converterJar - archiveClassifier.set('program') - into(zipRootFolder) { - with programScriptImage - with autobuildSpec - } -} - -tasks.register("libsZip", Zip) { - dependsOn copyToLibs - archiveClassifier.set('libs') - into(zipRootFolder) { - with libsDistsImage - with autobuildSpec - } -} - -tasks.register("buildDist") { - dependsOn dataZip, docsZip, programZip, libsZip, jlinkZip - description = "Build the five zip files (docs, data, program, libs and full) which comprise the autobuild distribution." -} diff --git a/code/gradle/release.gradle b/code/gradle/release.gradle index b2f4d01069b..e96630d923e 100644 --- a/code/gradle/release.gradle +++ b/code/gradle/release.gradle @@ -7,28 +7,20 @@ * * Release script * 1. gradle prepareRelease slowtest - * a. Update version - remove snapshot - * b. Commit new version - * c. Clean, Build and check + * a. Update version - remove snapshot + * b. Commit new version + * c. Clean, Build and check * d. Run slow tests * 2. Manual testing using product of gradle fullZip * 3. gradle pcgenRelease - * a. Build - * b. Assemble distributables - * c. Update version - increment version and add snapshot - * d. Commit new version + * a. Build + * b. Assemble distributables + * c. Update version - increment version and add snapshot + * d. Commit new version */ apply from: "code/gradle/releaseUtils.groovy" -ext { - // Work out the path to the release notes for our current version. - // plainVerNum is defined in the root build.gradle so jpackage's appVersion - // and the release-notes filename derive from the same base. - shortVerNum = plainVerNum.replaceAll(/\./, '') - releaseNotes = "${projectDir}/installers/release-notes/pcgen-release-notes-${shortVerNum}.html" -} - tasks.register("sourcesJar", Jar) { dependsOn classes, copyToOutput, startScripts duplicatesStrategy = DuplicatesStrategy.INCLUDE @@ -67,18 +59,6 @@ tasks.register("pcgenRelease") { // Installer is placed in outputDir } -// Update the PCGen version to indicate a release. Commit the change manually. -tasks.register("updateVersionRelease") { - doLast { - unSnapshotVersion() - } -} - -tasks.register("pcgenReleaseOfficial") { - dependsOn pcgenRelease, updateVersionRelease - description = "Release a new official version of PCGen." -} - // Update the PCGen version for development of the next release. Commit the change manually. tasks.register("updateVersionToNext") { doLast { diff --git a/code/gradle/releaseUtils.groovy b/code/gradle/releaseUtils.groovy index c6ebe0e468c..16f17930d70 100644 --- a/code/gradle/releaseUtils.groovy +++ b/code/gradle/releaseUtils.groovy @@ -1,21 +1,5 @@ import java.util.regex.Matcher -void unSnapshotVersion() { - def version = project.version.toString() - def origVersion = version - - if (version.contains('-SNAPSHOT')) { - project.ext.set('usesSnapshot', true) - project.ext.set('snapshotVersion', version) - version -= '-SNAPSHOT' - updateVersionProperty(version) - } else { - project.ext.set('usesSnapshot', false) - } - println "Updated version from ${origVersion} to ${version}" -} - - void updateVersion() { def version = project.version.toString() String pattern = /(\d+)([^\d]*$)/ diff --git a/code/gradle/site/download.html b/code/gradle/site/download.html deleted file mode 100644 index c51147f1055..00000000000 --- a/code/gradle/site/download.html +++ /dev/null @@ -1,28 +0,0 @@ - -
-- The download is split into two parts, either a full distribution with everything needed to run PCGen - (apart from Java 8) or the program patch which can be applied to an - existing autobuild install to update it. Generally you can just patch your existing full distribution for each - autobuild and only grab the full distribution if a missing library is reported. -
-- For details on the changes in this autobuild, see Nightly Build Changelog -
Built at ${timestamp} for PCGen Version ${version}.
- - diff --git a/code/gradle/site/index.html b/code/gradle/site/index.html deleted file mode 100644 index 0e0be3a19bb..00000000000 --- a/code/gradle/site/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - -PCGen is a character generator for role-playing games. Its goal is - supporting as many RPGs as is humanly possible. The project's current focus is on - OGL games (OGL is Wizards of the Coast's Open Gaming License). -
-PCGen is a Java based open source project. It runs on Windows, Mac OS X and Unix/Linux. - All datafiles are ASCII so they can be modified by users.
--
- - - diff --git a/code/src/java/pcgen/gui3/dialog/AboutDialogController.java b/code/src/java/pcgen/gui3/dialog/AboutDialogController.java index 9095c139aa5..32c48e55972 100644 --- a/code/src/java/pcgen/gui3/dialog/AboutDialogController.java +++ b/code/src/java/pcgen/gui3/dialog/AboutDialogController.java @@ -34,7 +34,6 @@ import javafx.scene.control.Labeled; import javafx.scene.control.TextArea; import javafx.scene.text.Text; -import org.apache.commons.lang3.StringUtils; /** * Controller for about panel. @@ -133,19 +132,8 @@ private void initText() String s = LanguageBundle.getString("in_abt_lib_apache"); //$NON-NLS-1$ librariesArea.setText(s); - String releaseDateStr = PCGenPropBundle.getReleaseDate(); - if (StringUtils.isNotBlank(PCGenPropBundle.getAutobuildDate())) - { - releaseDateStr = PCGenPropBundle.getAutobuildDate(); - } - releaseDate.setText(releaseDateStr); - - String versionNum = PCGenPropBundle.getVersionNumber(); - if (StringUtils.isNotBlank(PCGenPropBundle.getAutobuildNumber())) - { - versionNum += " autobuild #" + PCGenPropBundle.getAutobuildNumber(); - } - pcgenVersion.setText(versionNum); + releaseDate.setText(PCGenPropBundle.getReleaseDate()); + pcgenVersion.setText(PCGenPropBundle.getVersionNumber()); } diff --git a/code/src/java/pcgen/system/Main.java b/code/src/java/pcgen/system/Main.java index 1afef38363a..0adcbbffeae 100644 --- a/code/src/java/pcgen/system/Main.java +++ b/code/src/java/pcgen/system/Main.java @@ -102,8 +102,7 @@ private static void logSystemProps() */ public static void main(String... args) { - Logging.log(Level.INFO, "Starting PCGen v" + PCGenPropBundle.getVersionNumber() //$NON-NLS-1$ - + PCGenPropBundle.getAutobuildString()); + Logging.log(Level.INFO, "Starting PCGen v" + PCGenPropBundle.getVersionNumber()); //$NON-NLS-1$ Thread.setDefaultUncaughtExceptionHandler(new LoggingUncaughtExceptionHandler()); DeadlockDetectorTask deadlockDetectorTask = new DeadlockDetectorTask(new PCGenLoggingDeadlockHandler()); diff --git a/code/src/java/pcgen/system/PCGenPropBundle.java b/code/src/java/pcgen/system/PCGenPropBundle.java index e5283533952..dcbd32df4fd 100644 --- a/code/src/java/pcgen/system/PCGenPropBundle.java +++ b/code/src/java/pcgen/system/PCGenPropBundle.java @@ -18,11 +18,7 @@ */ package pcgen.system; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; import java.util.MissingResourceException; -import java.util.PropertyResourceBundle; import java.util.ResourceBundle; import pcgen.io.ExportUtilities; @@ -41,7 +37,6 @@ public final class PCGenPropBundle { private static ResourceBundle d_properties; - private static ResourceBundle autobuildProperties = null; /* * This static initializer loads the resources from the PCGenProp resource bundle. @@ -50,25 +45,6 @@ public final class PCGenPropBundle { d_properties = ResourceBundle.getBundle("pcgen.system.prop.PCGenProp"); - try - { - File autobuildProps = new File("autobuild.properties"); - if (autobuildProps.isFile() && autobuildProps.canRead()) - { - FileInputStream fis = new FileInputStream(autobuildProps); - autobuildProperties = new PropertyResourceBundle(fis); - } - } - catch (MissingResourceException mre) - { - Logging.errorPrint("Failed to load autobuild.properties", mre); - autobuildProperties = null; - } - catch (IOException e) - { - Logging.errorPrint("autobuildProperties. failed", e); - } - //Safe as d_properties was constructed earlier in this block try { @@ -209,48 +185,4 @@ private static String getPropValue(String propName, String fallback) return result; } - /** - * Retrieve the build number of the autobuild in which this PCGen instance - * was built. - * @return The build number, or blank if unknown. - */ - public static String getAutobuildNumber() - { - final String buildNumKey = "BuildNumber"; - if (autobuildProperties != null && autobuildProperties.containsKey(buildNumKey)) - { - return autobuildProperties.getString(buildNumKey); - } - return ""; - } - - /** - * Retrieve the date of the autobuild in which this PCGen instance was - * built. - * @return The build date, or blank if unknown. - */ - public static String getAutobuildDate() - { - final String buildTimeKey = "BuildTime"; - if (autobuildProperties != null && autobuildProperties.containsKey(buildTimeKey)) - { - return autobuildProperties.getString(buildTimeKey); - } - return ""; - } - - /** - * @return A display formatted version of the autobuild details, or blank if unknown. - */ - static String getAutobuildString() - { - String autobuildNumber = getAutobuildNumber(); - String autobuildDate = getAutobuildDate(); - if (StringUtils.isNotBlank(autobuildNumber)) - { - return " autobuild #" + autobuildNumber + " built on " + autobuildDate; - } - return ""; - } - } diff --git a/docs/faqpages/faqcommunity.md b/docs/faqpages/faqcommunity.md index 7e5689d0fa7..3c0a814b759 100644 --- a/docs/faqpages/faqcommunity.md +++ b/docs/faqpages/faqcommunity.md @@ -16,7 +16,7 @@ The main website for PCGen is at [pcgen.org](http://pcgen.org). You are currently reading the documentation. -The documentation is updated frequently. In case you are reading an old version of the documentation, you can find the latest documentation at the [SourceForge `autobuild`](http://pcgen.sourceforge.net/autobuilds/pcgen-docs/index.html). +The documentation is updated frequently. In case you are reading an old version of the documentation, the latest sources live in the [GitHub repository](https://github.com/PCGen/pcgen/tree/master/docs). If you see any errors in the documentation, please [file a bug report](./faqsubmittingabugreport.html). If you would like to improve the documentation yourself, [GitHub pull requests](https://github.com/PCGen/pcgen) are welcome.