diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8bfaa55..6a444b6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,13 @@ on: branches: [main] pull_request: workflow_dispatch: + # The release workflow runs these checks before it releases. + workflow_call: concurrency: - group: ci-${{ github.ref }} + # Called from the release workflow, github.workflow is that workflow's name, so a + # push to main cannot cancel a release's checks. + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..559c1468 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,270 @@ +# Releases the -SNAPSHOT version on main. Only ever started by hand: `./gradlew releaseDist`, +# or "Run workflow" on the Actions tab. With rylween.version X.Y.Z-SNAPSHOT in gradle.properties it +# 1. fails unless the version is a snapshot whose release is not tagged yet, +# 2. runs the CI checks, +# 3. commits X.Y.Z as "Release X.Y.Z" and tags that commit vX.Y.Z, +# 4. builds the terminal game zip and the bitmap web image from it, and smoke-tests both, +# 5. pushes ghcr.io//rylween:X.Y.Z and :latest, for linux/amd64 and linux/arm64, +# 6. commits X.Y.(Z+1)-SNAPSHOT as "Start X.Y.(Z+1)-SNAPSHOT", and pushes both commits to +# main together with the tag, +# 7. publishes the GitHub release vX.Y.Z with the zip and a compose.yaml that runs the image. +# A dry run, which works from any branch, does all of that but push and publish, and keeps the +# zip and compose.yaml as workflow artifacts instead. +# +# main takes only pull requests, so the release pushes over SSH with a deploy key, kept in the +# RELEASE_DEPLOY_KEY secret, that the "Require PRs and CI on main" ruleset lets bypass that. +name: Release + +on: + workflow_dispatch: + inputs: + dry-run: + description: Build and smoke-test everything, but push and publish nothing. + type: boolean + default: false + +# One release at a time, and never cancelled halfway. +concurrency: + group: release + cancel-in-progress: false + +permissions: + contents: read + +jobs: + version: + runs-on: ubuntu-latest + timeout-minutes: 15 + outputs: + release: ${{ steps.version.outputs.release }} + steps: + - name: Refuse to release from a branch other than main + if: ${{ !inputs.dry-run && github.ref != 'refs/heads/main' }} + run: | + echo "::error::Releases come from main, not $GITHUB_REF_NAME. A dry run works from any branch." + exit 1 + + - name: Require the deploy key that pushes to main + if: ${{ !inputs.dry-run }} + env: + RELEASE_DEPLOY_KEY: ${{ secrets.RELEASE_DEPLOY_KEY }} + run: | + if [ -z "$RELEASE_DEPLOY_KEY" ]; then + echo "::error::Without the RELEASE_DEPLOY_KEY secret the release cannot push to main." + exit 1 + fi + + - uses: actions/checkout@v7 + + - uses: actions/setup-java@v6 + with: + distribution: temurin + java-version: "25" + + - uses: gradle/actions/setup-gradle@v6 + + # setReleaseVersion fails unless rylween.version is a snapshot. + - name: Work out the release version + id: version + env: + DRY_RUN: ${{ inputs.dry-run }} + run: | + ./gradlew --console=plain setReleaseVersion + release="$(sed -n 's/^rylween\.version=//p' gradle.properties)" + if git ls-remote --exit-code --tags origin "refs/tags/v$release" > /dev/null; then + echo "::error::v$release is tagged already, so main should be past $release-SNAPSHOT." + exit 1 + fi + echo "release=$release" >> "$GITHUB_OUTPUT" + dry_run_note="" + [ "$DRY_RUN" = true ] && dry_run_note=" (dry run)" + echo "Releasing $release from ${GITHUB_SHA::8}$dry_run_note." >> "$GITHUB_STEP_SUMMARY" + + check: + needs: version + permissions: + contents: read + uses: ./.github/workflows/ci.yml + + release: + needs: [version, check] + runs-on: ubuntu-latest + timeout-minutes: 45 + permissions: + contents: write # the tag and the GitHub release + packages: write # the image on ghcr.io + env: + RELEASE: ${{ needs.version.outputs.release }} + IMAGE: ghcr.io/${{ github.repository }} + # The downloads attached to the release. Inside build/, so the image build ignores them. + DIST: build/release + steps: + # With the deploy key, git pushes over SSH as that key. Without it (a dry run) the checkout + # uses the workflow's token, and nothing is pushed. + - uses: actions/checkout@v7 + with: + ssh-key: ${{ secrets.RELEASE_DEPLOY_KEY }} + + - uses: actions/setup-java@v6 + with: + distribution: temurin + java-version: "25" + + - uses: gradle/actions/setup-gradle@v6 + + - name: Commit and tag the release version + id: commit + run: | + git config user.name "github-actions[bot]" + git config user.email "41898283+github-actions[bot]@users.noreply.github.com" + ./gradlew --console=plain setReleaseVersion + git commit --message "Release $RELEASE" -- gradle.properties + git tag --annotate "v$RELEASE" --message "Adventurers of Rylween $RELEASE" + echo "revision=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" + + - name: Build the terminal game zip + run: | + ./gradlew --console=plain :runtime:terminalDistZip + mkdir -p "$DIST" + cp "runtimes/runtime/build/distributions/rylween-terminal-$RELEASE.zip" "$DIST/" + + # Unpacks the zip and leaves from its title menu, which must show the release version. + - name: Smoke-test the terminal game zip + run: | + work="$(mktemp -d)" + unzip -q "$DIST/rylween-terminal-$RELEASE.zip" -d "$work" + HOME="$work" "$work/rylween-terminal-$RELEASE/bin/rylween" --script X > "$work/screen.txt" + if ! grep -q "v$RELEASE" "$work/screen.txt" || grep -q SNAPSHOT "$work/screen.txt"; then + cat "$work/screen.txt" + echo "::error::The zip's title menu does not show v$RELEASE." + exit 1 + fi + + - uses: docker/setup-buildx-action@v4 + + - name: Build the image for the smoke test + uses: docker/build-push-action@v7 + with: + context: . + file: deploy/docker/Dockerfile.bitmap-production + platforms: linux/amd64 + load: true + tags: rylween:smoke + + # Waits for the server to answer, as deploy.sh does (/api/status answers 401 without a + # login), and checks the version in the server log's first line. + - name: Smoke-test the image + run: | + docker run --detach --name rylween-smoke --publish 127.0.0.1:8081:8081 rylween:smoke + up=false + for _ in $(seq 60); do + if curl --silent --output /dev/null --max-time 2 http://127.0.0.1:8081/api/status; then + up=true + break + fi + sleep 1 + done + docker logs rylween-smoke > "$RUNNER_TEMP/smoke.log" 2>&1 + docker rm --force rylween-smoke > /dev/null + cat "$RUNNER_TEMP/smoke.log" + if [ "$up" != true ]; then + echo "::error::The image's server did not answer within a minute." + exit 1 + fi + if ! grep -q "log.open .*version=$RELEASE" "$RUNNER_TEMP/smoke.log" || grep -q SNAPSHOT "$RUNNER_TEMP/smoke.log"; then + echo "::error::The image's server does not log version $RELEASE." + exit 1 + fi + + - name: Log in to the GitHub container registry + if: ${{ !inputs.dry-run }} + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + + # Reuses the smoke test's amd64 build. The arm64 image needs no emulation: its stage only + # copies the builder's platform-independent output onto the arm64 JRE. + - name: Build the image for both platforms, and push it + uses: docker/build-push-action@v7 + with: + context: . + file: deploy/docker/Dockerfile.bitmap-production + platforms: linux/amd64,linux/arm64 + push: ${{ !inputs.dry-run }} + tags: | + ${{ env.IMAGE }}:${{ env.RELEASE }} + ${{ env.IMAGE }}:latest + labels: | + org.opencontainers.image.title=Adventurers of Rylween + org.opencontainers.image.version=${{ env.RELEASE }} + org.opencontainers.image.revision=${{ steps.commit.outputs.revision }} + org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + org.opencontainers.image.licenses=Apache-2.0 + + - name: Commit the next snapshot version + run: | + ./gradlew --console=plain setNextSnapshotVersion + next="$(sed -n 's/^rylween\.version=//p' gradle.properties)" + git commit --message "Start $next" -- gradle.properties + echo "main moves on to $next." >> "$GITHUB_STEP_SUMMARY" + + # All or nothing. When main has moved on since the release started, nothing is pushed, and + # running the release again rebuilds the same version and pushes its image over this one. + - name: Push both commits to main, and the tag + if: ${{ !inputs.dry-run }} + run: git push --atomic origin HEAD:refs/heads/main "refs/tags/v$RELEASE" + + # The checked-in compose.yaml builds the image from a checkout. The release's copy pulls + # this release's image instead. + - name: Write the release's compose.yaml + run: | + { + echo "# Adventurers of Rylween $RELEASE. \`docker compose up -d\` next to this file pulls" + echo "# $IMAGE:$RELEASE; the notes below on --build and deploy.sh are for a source checkout." + echo "#" + yq --indent 4 \ + '.services.rylween.image = strenv(IMAGE) + ":" + strenv(RELEASE) | del(.services.rylween.build)' \ + deploy/compose.yaml + } > "$DIST/compose.yaml" + + - name: Publish the GitHub release + if: ${{ !inputs.dry-run }} + env: + GH_TOKEN: ${{ github.token }} + run: | + cat > "$RUNNER_TEMP/notes.md" <&2 + exit 2 + fi (cd "$ROOT_DIR" && ./gradlew :tools:emitExternalCompiledBundle :runtime:installRuntime --console=plain) fi @@ -219,6 +233,11 @@ if [[ "$title_seen" == false ]]; then args=("--title" "${args[@]}") fi +# A release download is never rebuilt, so it runs in place. +if [[ "$distribution" == true ]]; then + exec "$LAUNCHER" "${args[@]}" +fi + RUN_PARENT="$(mktemp -d "${TMPDIR:-/tmp}/rylween-run.XXXXXX")" cleanup() { rm -rf "$RUN_PARENT" diff --git a/build-logic/src/main/kotlin/rylween.release-conventions.gradle.kts b/build-logic/src/main/kotlin/rylween.release-conventions.gradle.kts new file mode 100644 index 00000000..b534cafb --- /dev/null +++ b/build-logic/src/main/kotlin/rylween.release-conventions.gradle.kts @@ -0,0 +1,33 @@ +// Registers the release tasks on the root project. releaseDist starts the release workflow, which moves +// rylween.version with setReleaseVersion and setNextSnapshotVersion; see rylween/gradle/RylweenReleaseTasks.kt. +import rylween.gradle.RYLWEEN_VERSION_PROPERTY +import rylween.gradle.RylweenVersionStep +import rylween.gradle.SetRylweenVersionTask +import rylween.gradle.StartReleaseWorkflowTask + +val versionFile: RegularFile = layout.projectDirectory.file("gradle.properties") + +tasks.register("setReleaseVersion") { + group = "release" + description = "Moves rylween.version in gradle.properties from X.Y.Z-SNAPSHOT to X.Y.Z. The release workflow runs it." + propertiesFile.set(versionFile) + step.set(RylweenVersionStep.Release) +} + +tasks.register("setNextSnapshotVersion") { + group = "release" + description = "Moves rylween.version in gradle.properties from X.Y.Z to X.Y.(Z+1)-SNAPSHOT. The release workflow runs it." + propertiesFile.set(versionFile) + step.set(RylweenVersionStep.NextSnapshot) +} + +tasks.register("releaseDist") { + group = "release" + description = + "Starts the release workflow on main, which releases its X.Y.Z-SNAPSHOT as X.Y.Z and moves main to " + + "X.Y.(Z+1)-SNAPSHOT. -Prylween.release.dryRun=true builds and smoke-tests everything but publishes nothing." + localVersion.set(providers.gradleProperty(RYLWEEN_VERSION_PROPERTY)) + workflow.set("release.yml") + branch.set("main") + dryRun.set(providers.gradleProperty("rylween.release.dryRun").map(String::toBoolean).orElse(false)) +} diff --git a/build-logic/src/main/kotlin/rylween/gradle/RylweenReleaseTasks.kt b/build-logic/src/main/kotlin/rylween/gradle/RylweenReleaseTasks.kt new file mode 100644 index 00000000..1295388c --- /dev/null +++ b/build-logic/src/main/kotlin/rylween/gradle/RylweenReleaseTasks.kt @@ -0,0 +1,153 @@ +/** + * Release versioning. `rylween.version` in gradle.properties is the one place the version is set. Between releases it + * is the snapshot of the next patch release, `X.Y.Z-SNAPSHOT`. Releasing it publishes `X.Y.Z` and moves on to + * `X.Y.(Z+1)-SNAPSHOT`. The release workflow (.github/workflows/release.yml) makes both moves with + * [SetRylweenVersionTask], and `./gradlew releaseDist` starts that workflow with [StartReleaseWorkflowTask]. + */ + +package rylween.gradle + +import org.gradle.api.DefaultTask +import org.gradle.api.GradleException +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.TaskAction +import org.gradle.process.ExecOperations +import javax.inject.Inject + +/** The gradle.properties key that sets the version. */ +const val RYLWEEN_VERSION_PROPERTY = "rylween.version" + +/** A `major.minor.patch` release, or the `-SNAPSHOT` that leads up to it. */ +data class RylweenVersion( + val major: Int, + val minor: Int, + val patch: Int, + val snapshot: Boolean, +) { + /** The release this snapshot leads up to. Fails for a version that is already a release. */ + fun release(): RylweenVersion { + check(snapshot) { "$this is a release version, but releases are cut from $SNAPSHOT_SUFFIX versions" } + return copy(snapshot = false) + } + + /** The snapshot of the patch release after this one. Fails for a snapshot. */ + fun nextSnapshot(): RylweenVersion { + check(!snapshot) { "$this is already a snapshot; only a release moves on to the next snapshot" } + return copy(patch = patch + 1, snapshot = true) + } + + override fun toString(): String = "$major.$minor.$patch" + if (snapshot) SNAPSHOT_SUFFIX else "" + + companion object { + const val SNAPSHOT_SUFFIX = "-SNAPSHOT" + + // Numbers without leading zeros, so every version prints back exactly as it was written. + private val format = Regex("""(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)($SNAPSHOT_SUFFIX)?""") + + /** Parses `X.Y.Z` or `X.Y.Z-SNAPSHOT`, and fails for anything else. */ + fun parse(text: String): RylweenVersion = + format + .matchEntire(text) + ?.destructured + ?.let { (major, minor, patch, suffix) -> + RylweenVersion(major.toInt(), minor.toInt(), patch.toInt(), snapshot = suffix.isNotEmpty()) + } + ?: throw IllegalArgumentException("version \"$text\" is neither X.Y.Z nor X.Y.Z$SNAPSHOT_SUFFIX") + } +} + +/** One step of the release cycle, from one version to the next. */ +enum class RylweenVersionStep( + private val move: (RylweenVersion) -> RylweenVersion, +) { + /** From `X.Y.Z-SNAPSHOT` to `X.Y.Z`. */ + Release(RylweenVersion::release), + + /** From `X.Y.Z` to `X.Y.(Z+1)-SNAPSHOT`. */ + NextSnapshot(RylweenVersion::nextSnapshot), + ; + + fun from(version: RylweenVersion): RylweenVersion = move(version) +} + +/** + * Moves `rylween.version` in [propertiesFile] one [step], rewriting only that line. The build that runs this has + * already read the old version, so anything that should see the new one runs in a later Gradle invocation. + */ +abstract class SetRylweenVersionTask : DefaultTask() { + /** gradle.properties, read and rewritten in place: neither an input nor an output, so the task always runs. */ + @get:Internal + abstract val propertiesFile: RegularFileProperty + + @get:Input + abstract val step: Property + + @TaskAction + fun moveVersion() { + val file = propertiesFile.get().asFile + val prefix = "$RYLWEEN_VERSION_PROPERTY=" + val lines = file.readLines() + val current = + lines + .singleOrNull { line -> line.startsWith(prefix) } + ?.let { line -> RylweenVersion.parse(line.removePrefix(prefix)) } + ?: throw GradleException("${file.path} must set $RYLWEEN_VERSION_PROPERTY exactly once") + val next = step.get().from(current) + file.writeText( + lines.joinToString(separator = "\n", postfix = "\n") { line -> + if (line.startsWith(prefix)) "$prefix$next" else line + }, + ) + logger.lifecycle("$RYLWEEN_VERSION_PROPERTY: $current -> $next") + } +} + +/** + * Starts the release [workflow] on [branch] with the GitHub CLI, `gh`, which must be installed and logged in. It fails + * first when [localVersion] is not a snapshot, so a mistake shows up here rather than minutes into the workflow. The + * workflow checks the branch's own version again, and makes every version move itself. + */ +abstract class StartReleaseWorkflowTask + @Inject + constructor( + private val execOperations: ExecOperations, + ) : DefaultTask() { + /** `rylween.version` in this checkout. */ + @get:Input + abstract val localVersion: Property + + /** The workflow file name under .github/workflows. */ + @get:Input + abstract val workflow: Property + + @get:Input + abstract val branch: Property + + /** Builds and smoke-tests everything but pushes and publishes nothing. */ + @get:Input + abstract val dryRun: Property + + @TaskAction + fun start() { + val release = RylweenVersion.parse(localVersion.get()).release() + execOperations.exec { + commandLine( + "gh", + "workflow", + "run", + workflow.get(), + "--ref", + branch.get(), + "--raw-field", + "dry-run=${dryRun.get()}", + ) + } + logger.lifecycle( + "Started ${if (dryRun.get()) "a dry run of " else ""}the release of $release from ${branch.get()}. " + + "Follow it with `gh run watch`.", + ) + } + } diff --git a/build.gradle.kts b/build.gradle.kts index 5716d840..3d3468c3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,16 +1,20 @@ -// Root build aggregation for shared versioning, verification wiring, and cleanup. +// Root build aggregation for shared versioning, verification wiring, release tasks, and cleanup. +import rylween.gradle.RYLWEEN_VERSION_PROPERTY +import rylween.gradle.RylweenVersion + plugins { base + id("rylween.release-conventions") alias(libs.plugins.kotlin.jvm) apply false alias(libs.plugins.gradle.versions) alias(libs.plugins.version.catalog.update) } group = "org.rylween" -version = - providers - .gradleProperty("rylween.version") - .get() + +// rylween.version in gradle.properties is the one place the version is set, and anything but X.Y.Z or +// X.Y.Z-SNAPSHOT fails the build here. The subprojects take it from this project. +version = RylweenVersion.parse(providers.gradleProperty(RYLWEEN_VERSION_PROPERTY).get()).toString() versionCatalogUpdate { // jdk, nodejs and ktlint are read as plain versions rather than through a library or diff --git a/deploy/docker/Dockerfile.bitmap-production b/deploy/docker/Dockerfile.bitmap-production index 076c966f..e1126f6a 100644 --- a/deploy/docker/Dockerfile.bitmap-production +++ b/deploy/docker/Dockerfile.bitmap-production @@ -14,7 +14,16 @@ # -v rylween-data:/data \ # rylween-bitmap-prod -FROM eclipse-temurin:25-jdk AS builder +# The builder runs on the build machine's own platform even when the image is for +# another: Gradle's output is platform-independent jars and JavaScript, so a +# multi-platform build compiles once, and only the JRE stage below differs. +FROM --platform=$BUILDPLATFORM eclipse-temurin:25-jdk AS builder + +# The Node.js that Gradle downloads to compile the TypeScript client (nodejs in +# gradle/libs.versions.toml) needs libatomic, which the JDK image leaves out. +RUN apt-get update \ + && apt-get install --yes --no-install-recommends libatomic1 \ + && rm -rf /var/lib/apt/lists/* WORKDIR /src diff --git a/deploy/docker/README.md b/deploy/docker/README.md index 653766ce..0cc22c27 100644 --- a/deploy/docker/README.md +++ b/deploy/docker/README.md @@ -6,7 +6,9 @@ `bin/run-server.sh --build`. - `Dockerfile.production` builds the production-oriented ANSI web runtime image. - `Dockerfile.bitmap-production` builds the production-oriented bitmap web - runtime image. + runtime image. Each release publishes it as `ghcr.io/lagergren/rylween:X.Y.Z` + and `:latest`, for linux/amd64 and linux/arm64; see Releasing in the root + README. `Dockerfile` and `Dockerfile.production` serve the ANSI web runtime on port 8080; `Dockerfile.bitmap-production` serves the bitmap runtime on port 8081. All diff --git a/gradle.properties b/gradle.properties index 44e2580d..789225cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,4 +7,6 @@ org.gradle.caching=true # warns about on every run; allow it quietly. The Kotlin daemon inherits these arguments. Needs JDK 23+. org.gradle.jvmargs=-Dfile.encoding=UTF-8 --sun-misc-unsafe-memory-access=allow -rylween.version=0.9.1 +# The one place the version is set. Between releases it is the snapshot of the next patch release, X.Y.Z-SNAPSHOT; +# the release workflow (./gradlew releaseDist) releases it as X.Y.Z and moves it on to X.Y.(Z+1)-SNAPSHOT. +rylween.version=0.9.2-SNAPSHOT diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 92cab7b0..3d9001a2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,12 +10,12 @@ # and keeps each comment with the entry below it, so keep the entries sorted here too. [versions] # ben-manes versions plugin: `dependencyUpdates`, run by `checkDependencyUpdates`. -gradle-versions = "0.66.0" +gradle-versions = "0.67.0" # Java toolchain for every Kotlin/JVM module (`kotlin { jvmToolchain(...) }`). Kept on the # current LTS release; foojay downloads it when no local JDK matches. jdk = "25" # Terminal I/O for the interactive ANSI runtime (:terminal). -jline = "4.4.8" +jline = "4.5.0" # Kotlin compiler, standard library, and the Kotlin JVM Gradle plugin for all modules. kotlin = "2.4.21" # ktlint linter engine that the ktlint Gradle plugin runs (rylween.qa-conventions). @@ -26,14 +26,14 @@ ktlint-gradle = "14.2.0" node-gradle = "7.1.0" # Node.js release that node-gradle downloads to run npm and compile the bitmap web # TypeScript client (:runtime-bitmap-web). Kept on the current Node LTS line. -nodejs = "24.21.0" +nodejs = "26.13.0" # Browser automation for the bitmap web browser smoke check (checkBitmapBrowserSmoke). -playwright = "1.63.0" +playwright = "1.64.0" # PMD, used for its CPD duplicate-code detector (`cpdCheck` in rylween.qa-conventions). -pmd = "7.28.0" +pmd = "7.29.0" # littlerobots version catalog update plugin: `versionCatalogUpdate`, run by # `updateDependencyCatalog`. -version-catalog-update = "1.1.1" +version-catalog-update = "1.1.2" [libraries] # See the matching [versions] entries above for what each library is used for. diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 9fa7f288..51cbd2a6 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2e7bb9fd..94c356a0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/runtimes/runtime-bitmap-web/README.md b/runtimes/runtime-bitmap-web/README.md index 824b2c6d..b90c14b5 100644 --- a/runtimes/runtime-bitmap-web/README.md +++ b/runtimes/runtime-bitmap-web/README.md @@ -52,7 +52,7 @@ Run bare, the server plays the game built into its jar unless `--bundle` or ## Play Page -The title bar reads "Adventurers of Rylween (v0.9.1)", with the version from +The title bar reads "Adventurers of Rylween (vX.Y.Z)", with the version from `/api/status`, which the Status panel also lists; the title menu shows the version in its bottom-right corner. diff --git a/runtimes/runtime-bitmap-web/package-lock.json b/runtimes/runtime-bitmap-web/package-lock.json index b1696414..20f1be41 100644 --- a/runtimes/runtime-bitmap-web/package-lock.json +++ b/runtimes/runtime-bitmap-web/package-lock.json @@ -5,21 +5,382 @@ "packages": { "": { "devDependencies": { - "typescript": "5.9.3" + "typescript": "7.0.2" + } + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" } }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", "dev": true, "license": "Apache-2.0", "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "tsc": "bin/tsc" }, "engines": { - "node": ">=14.17" + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" } } } diff --git a/runtimes/runtime-bitmap-web/package.json b/runtimes/runtime-bitmap-web/package.json index 7a8d1ab7..172eea0e 100644 --- a/runtimes/runtime-bitmap-web/package.json +++ b/runtimes/runtime-bitmap-web/package.json @@ -4,6 +4,6 @@ "build": "tsc --project tsconfig.json" }, "devDependencies": { - "typescript": "5.9.3" + "typescript": "7.0.2" } } diff --git a/runtimes/runtime-bitmap-web/src/main/resources/bitmap-web/client.ts b/runtimes/runtime-bitmap-web/src/main/resources/bitmap-web/client.ts index 95b63dec..279375ef 100644 --- a/runtimes/runtime-bitmap-web/src/main/resources/bitmap-web/client.ts +++ b/runtimes/runtime-bitmap-web/src/main/resources/bitmap-web/client.ts @@ -1838,7 +1838,7 @@ commandToggle.addEventListener("click", () => { }); preferencesToggle.addEventListener("click", () => { - const opening = preferencesPopover.hidden; + const opening = Boolean(preferencesPopover.hidden); closeCommandPalette(); closeServerInfoPopover(); setPreferencesOpen(opening); @@ -1846,7 +1846,7 @@ preferencesToggle.addEventListener("click", () => { }); serverInfoToggle.addEventListener("click", () => { - const opening = serverInfoPopover.hidden; + const opening = Boolean(serverInfoPopover.hidden); closeCommandPalette(); closePreferencesPopover(); setServerInfoOpen(opening); @@ -1896,7 +1896,7 @@ function renderCommandPalette(commands: BitmapCommand[]): void { function toggleCommandPalette(): void { if (currentCommands.length === 0) return; - const opening = commandPopover.hidden; + const opening = Boolean(commandPopover.hidden); closePreferencesPopover(); closeServerInfoPopover(); setCommandPaletteOpen(opening); diff --git a/runtimes/runtime-bitmap-web/tsconfig.json b/runtimes/runtime-bitmap-web/tsconfig.json index 1f49d7e5..018b734d 100644 --- a/runtimes/runtime-bitmap-web/tsconfig.json +++ b/runtimes/runtime-bitmap-web/tsconfig.json @@ -2,10 +2,11 @@ "compilerOptions": { "target": "ES2020", "lib": ["DOM", "ES2020"], - "module": "none", + "module": "es2020", "strict": true, "noEmitOnError": true, "removeComments": false, + "rootDir": "src/main/resources/bitmap-web", "outDir": "build/generated/resources/bitmapWeb/bitmap-web" }, "files": [ diff --git a/runtimes/runtime/README.md b/runtimes/runtime/README.md index 69a18104..afa9bfc5 100644 --- a/runtimes/runtime/README.md +++ b/runtimes/runtime/README.md @@ -14,11 +14,12 @@ It contains: - The installed `rylween` launcher (`:runtime:installRuntime`, under `runtimes/runtime/build/install/rylween`) used by `bin/run.sh`, the scripted `checkRuntime*` checks, the runtime tests, and the bitmap browser smoke's seed - step. + step. It, and the terminal game's release zip, run with a copy of `:game`'s + jar without the bitmap paintings, which the terminal never shows. The build stamps `rylween.version` from `gradle.properties` into the runtime. -The title menu shows it (for example `v0.9.1`), and every runtime log opens with -`log.open path=... version=0.9.1`. +The title menu shows it as `vX.Y.Z` (`vX.Y.Z-SNAPSHOT` between releases), and +every runtime log opens with `log.open path=... version=X.Y.Z`. The bitmap and browser ANSI servers reuse this backend. Keep game mechanics and input-command semantics here when they should behave identically across views. diff --git a/runtimes/runtime/build.gradle.kts b/runtimes/runtime/build.gradle.kts index e4a81c70..5699139d 100644 --- a/runtimes/runtime/build.gradle.kts +++ b/runtimes/runtime/build.gradle.kts @@ -53,6 +53,36 @@ val runtimeClasspathConfig: Configuration = configurations.runtimeClasspath.get( val runtimeJars: FileCollection = runtimeClasspathConfig.filter { file -> file.isFile && file.extension == "jar" } +/** Gives build-script providers a configuration-cache-safe way to open jars. */ +interface InjectedArchives { + @get:Inject + val archives: ArchiveOperations +} + +// The terminal game never shows the bitmap paintings that make up most of :game's jar, so its launcher, installed and +// in the release zip, runs with a copy of that jar without them. +val gameJars: FileCollection = + runtimeClasspathConfig.incoming + .artifactView { + componentFilter { id -> id is ProjectComponentIdentifier && id.projectPath == ":game" } + }.files +val terminalGameJar: TaskProvider = + tasks.register("terminalGameJar") { + group = "build" + description = "Copies :game's jar without the bitmap paintings, which the terminal game never shows." + + // A local, so the lambda below captures only the service and not this build script. + val archives = objects.newInstance().archives + archiveBaseName.set("rylween-game-terminal") + destinationDirectory.set(layout.buildDirectory.dir("terminal-game")) + from(gameJars.elements.map { jars -> jars.map { jar -> archives.zipTree(jar.asFile) } }) { + // The copy gets a manifest of its own. + exclude("META-INF/MANIFEST.MF") + exclude("bitmap/**") + } + } +val launcherJars: FileCollection = files(runtimeJarFile, terminalGameJar) + (runtimeJars - gameJars) + tasks.processResources { // Stamps rylween.version into the runtime, which shows it on the title menu and in every log. val rylweenVersion = project.version.toString() @@ -127,7 +157,7 @@ val runtimeStartScripts: TaskProvider = .dir("scripts/runtimeApp") .get() .asFile - classpath = files(runtimeJarFile) + runtimeJars + classpath = launcherJars } val installRuntime: TaskProvider = @@ -143,11 +173,46 @@ val installRuntime: TaskProvider = unix("rwxr-xr-x") } } - from(files(runtimeJarFile) + runtimeJars) { + from(launcherJars) { into("lib") } } +// The terminal game as a release download. Its bin/rylween is bin/run.sh, which finds the runtime's own start script, +// renamed bin/rylween-runtime, and the compiled bundle beside it, and keeps saves and logs under ~/.rylween/data. +val terminalDistZip: TaskProvider = + tasks.register("terminalDistZip") { + group = "distribution" + description = "Packages the terminal game, its launcher, and the compiled bundle as the release download." + + dependsOn(":tools:emitExternalCompiledBundle") + val distributionName = "rylween-terminal-${project.version}" + archiveFileName.set("$distributionName.zip") + destinationDirectory.set(layout.buildDirectory.dir("distributions")) + into(distributionName) { + from(rootProject.layout.projectDirectory.file("bin/run.sh")) { + into("bin") + rename { "rylween" } + filePermissions { + unix("rwxr-xr-x") + } + } + from(runtimeStartScripts) { + into("bin") + include("rylween") + rename { "rylween-runtime" } + filePermissions { + unix("rwxr-xr-x") + } + } + from(launcherJars) { + into("lib") + } + from(externalBundleArtifact) + from(rootProject.layout.projectDirectory.files("LICENSE", "NOTICE")) + } + } + tasks.withType().configureEach { dependsOn(":tools:emitExternalCompiledBundle") executableFile.set(runtimeExecutable) diff --git a/runtimes/runtime/src/main/kotlin/rylween/runtime/RuntimeVersion.kt b/runtimes/runtime/src/main/kotlin/rylween/runtime/RuntimeVersion.kt index d7484cbc..e75f8440 100644 --- a/runtimes/runtime/src/main/kotlin/rylween/runtime/RuntimeVersion.kt +++ b/runtimes/runtime/src/main/kotlin/rylween/runtime/RuntimeVersion.kt @@ -1,11 +1,11 @@ -/** Release version the build stamps into the runtime from `rylween.version` in gradle.properties. */ +/** The version the build stamps into the runtime from `rylween.version` in gradle.properties. */ package rylween.runtime private const val VERSION_RESOURCE = "rylween/runtime/version.txt" -/** The release version, e.g. `0.9`. */ +/** The version: `X.Y.Z` in a release, `X.Y.Z-SNAPSHOT` between releases. */ val rylweenVersion: String = runtimeResourceText(VERSION_RESOURCE).trim() -/** The release version as players see it, e.g. `v0.9`. */ +/** The version as players see it, `v` and [rylweenVersion]. */ val rylweenVersionLabel: String = "v$rylweenVersion" diff --git a/support/web-common/src/main/kotlin/rylween/webcommon/WebServerStatus.kt b/support/web-common/src/main/kotlin/rylween/webcommon/WebServerStatus.kt index d9305f94..858c8192 100644 --- a/support/web-common/src/main/kotlin/rylween/webcommon/WebServerStatus.kt +++ b/support/web-common/src/main/kotlin/rylween/webcommon/WebServerStatus.kt @@ -4,7 +4,7 @@ package rylween.webcommon data class WebServerStatus( val serverType: String, - /** The release version, such as `0.9.1`, which the bitmap page shows next to the game's name. */ + /** The game's version, `rylween.version` from gradle.properties, which the bitmap page shows next to its name. */ val version: String, val authRequired: Boolean, val currentUser: String?,