Skip to content

Upgrade Gradle to 9.6.1, conform card-game to composite-build standard, prep for Gradle 10#19

Merged
lagergren merged 3 commits into
masterfrom
gradle-upgrade-9.6.1
Jul 9, 2026
Merged

Upgrade Gradle to 9.6.1, conform card-game to composite-build standard, prep for Gradle 10#19
lagergren merged 3 commits into
masterfrom
gradle-upgrade-9.6.1

Conversation

@lagergren

@lagergren lagergren commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This PR does three things.

1. Upgrade Gradle to 9.6.1

Upgrades the composite build's wrapper from 9.5.0 to 9.6.1. Wrapper artifacts
(gradle-wrapper.properties, gradlew, gradlew.bat, jar) were regenerated by
running the wrapper task twice under the target Gradle, matching the canonical
wrapper form used by the xvm repo. Verified ./gradlew --version reports 9.6.1
and the whole build configures cleanly.

(The second wrapper that used to live under CardGame/ — stuck at 9.4.0 — is
removed entirely rather than upgraded; see below.)

2. Make card-game conform to the composite-build standard

CardGame was self-merged (#12) as a standalone build dropped into the repo
root
: its own Gradle wrapper, settings.gradle.kts, gradle.properties and
version catalog, PascalCase-named, and never actually wired into the root
composite build. It ignored the conventions every other example follows.

Brought it in line with the other single-module examples (welcome / banking
/ counter):

  • Renamed CardGamecard-game (kebab-case, matching chess-game).
  • Deleted the redundant standalone infra: gradlew, gradlew.bat,
    gradle/wrapper/*, settings.gradle.kts, gradle.properties and
    gradle/libs.versions.toml. It now shares the root wrapper, root
    gradle.properties and the root version catalog. The repo again has exactly
    one Gradle wrapper (at the root)
    , as a composite build should.
  • Reuses build-logic: build.gradle.kts applies id("xtc-conventions")
    instead of the raw alias(libs.plugins.xtc) + manual xdkDistribution.
  • Wired into the root build: include(":card-game") in settings.gradle.kts
    and xtcModule(projects.cardGame) in the root build.gradle.kts — a
    subproject with a type-safe project accessor, like the other single-module
    examples (not an included build like the multi-module chess-game).
  • Docker/CI: Dockerfile copies the card-game build file + sources; the
    CardGame/ exclusion is dropped from .dockerignore.

The compiled module is still named cardGame (source unchanged).

3. Prepare build scripts for Gradle 10

Gradle 9.6.1 deprecates the Kotlin DSL delegated accessors (val x by tasks.registering/existing), scheduled for removal in Gradle 10. Switched the root build.gradle.kts and the webapp-conventions build-logic plugin to the named/register APIs (tasks.register<T>("x"), tasks.named(...)) — matching xtclang/xvm#494.

Verification

  • ./gradlew :card-game:build — compiles cardGame.xtc and its xunit tests
    pass (through the shared xtc-conventions plugin, with failOnTestFailure=true).
  • ./gradlew installDist — succeeds; cardGame.xtc is aggregated into
    build/install/examples/lib/ alongside the other example modules.
  • Exactly one Gradle wrapper remains in the tree (the root), at 9.6.1.
  • ./gradlew build installDist --warning-mode all — BUILD SUCCESSFUL with no Gradle 10 deprecation warnings; no delegated accessors remain.

@lagergren lagergren enabled auto-merge (squash) July 6, 2026 12:07
CardGame landed via a self-merged PR (#12) as a standalone build in the repo
root: its own Gradle wrapper, settings.gradle.kts, gradle.properties and
version catalog, PascalCase-named, and never wired into the root composite
build. Convert it to match the other single-module examples
(welcome/banking/counter):

- Rename CardGame -> card-game (kebab-case, like chess-game).
- Delete the redundant wrapper (gradlew, gradlew.bat, gradle/wrapper/*),
  settings.gradle.kts, gradle.properties and gradle/libs.versions.toml; it now
  shares the root wrapper, properties and version catalog.
- Reuse build-logic: build.gradle.kts applies id("xtc-conventions") instead of
  the raw XTC plugin alias.
- Wire into the root build: include(":card-game") in settings and
  xtcModule(projects.cardGame) in the root build.
- Dockerfile copies the card-game build file and sources; drop the CardGame/
  exclusion from .dockerignore.

The compiled module is still cardGame; installDist now aggregates cardGame.xtc
alongside the other example modules.
@lagergren lagergren changed the title Upgrade Gradle to 9.6.1 Upgrade Gradle to 9.6.1 and conform card-game to the composite-build standard Jul 6, 2026
Gradle 9.6.1 deprecates the `val x by tasks.registering/existing` property-
delegate syntax, scheduled for removal in Gradle 10. Switch the root build and
the webapp-conventions build-logic plugin to the named/register APIs
(`tasks.register<T>("x")`, `tasks.named(...)`), matching xtclang/xvm#494.

Verified: `./gradlew build installDist --warning-mode all` is BUILD SUCCESSFUL
with no deprecation warnings, and no delegated accessors remain.
@lagergren lagergren changed the title Upgrade Gradle to 9.6.1 and conform card-game to the composite-build standard Upgrade Gradle to 9.6.1, conform card-game to composite-build standard, prep for Gradle 10 Jul 6, 2026
@lagergren lagergren requested a review from ezekielelvis July 6, 2026 13:41
@lagergren lagergren merged commit f0fb220 into master Jul 9, 2026
2 checks passed
@lagergren lagergren deleted the gradle-upgrade-9.6.1 branch July 9, 2026 20:17
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.

1 participant