Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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.
Expand Down
36 changes: 0 additions & 36 deletions appveyor.yml

This file was deleted.

14 changes: 6 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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', '')
}

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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'
Expand Down
48 changes: 0 additions & 48 deletions code/gradle/autobuild.gradle

This file was deleted.

3 changes: 0 additions & 3 deletions code/gradle/autobuild.template

This file was deleted.

5 changes: 0 additions & 5 deletions code/gradle/config.ini

This file was deleted.

68 changes: 4 additions & 64 deletions code/gradle/distribution.gradle
Original file line number Diff line number Diff line change
@@ -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/**'
Expand Down Expand Up @@ -51,13 +39,6 @@ ext {
}
}

libsDistsImage = copySpec {
from(layout.buildDirectory.dir("libs")) {
into 'libs'
exclude 'pcgen-*.jar'
}
}

charactersImage = copySpec {
from('.') {
include 'characters/*.pcg'
Expand All @@ -72,7 +53,6 @@ application {

applicationDistribution.with(dataDistsImage)
applicationDistribution.with(docsDistsImage)
applicationDistribution.with(autobuildSpec)
applicationDistribution.with(charactersImage)
applicationDistribution.with(programScriptImage)
}
Expand Down Expand Up @@ -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."
}
34 changes: 7 additions & 27 deletions code/gradle/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
16 changes: 0 additions & 16 deletions code/gradle/releaseUtils.groovy
Original file line number Diff line number Diff line change
@@ -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]*$)/
Expand Down
28 changes: 0 additions & 28 deletions code/gradle/site/download.html

This file was deleted.

23 changes: 0 additions & 23 deletions code/gradle/site/index.html

This file was deleted.

Loading
Loading