Upgrade Gradle to 9.6.1, conform card-game to composite-build standard, prep for Gradle 10#19
Merged
Merged
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 byrunning the
wrappertask twice under the target Gradle, matching the canonicalwrapper form used by the
xvmrepo. Verified./gradlew --versionreports 9.6.1and the whole build configures cleanly.
(The second wrapper that used to live under
CardGame/— stuck at 9.4.0 — isremoved entirely rather than upgraded; see below.)
2. Make card-game conform to the composite-build standard
CardGamewas self-merged (#12) as a standalone build dropped into the reporoot: its own Gradle wrapper,
settings.gradle.kts,gradle.propertiesandversion 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):CardGame→card-game(kebab-case, matchingchess-game).gradlew,gradlew.bat,gradle/wrapper/*,settings.gradle.kts,gradle.propertiesandgradle/libs.versions.toml. It now shares the root wrapper, rootgradle.propertiesand the root version catalog. The repo again has exactlyone Gradle wrapper (at the root), as a composite build should.
build-logic:build.gradle.ktsappliesid("xtc-conventions")instead of the raw
alias(libs.plugins.xtc)+ manualxdkDistribution.include(":card-game")insettings.gradle.ktsand
xtcModule(projects.cardGame)in the rootbuild.gradle.kts— asubproject with a type-safe project accessor, like the other single-module
examples (not an included build like the multi-module
chess-game).Dockerfilecopies thecard-gamebuild file + sources; theCardGame/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 rootbuild.gradle.ktsand thewebapp-conventionsbuild-logic plugin to the named/register APIs (tasks.register<T>("x"),tasks.named(...)) — matching xtclang/xvm#494.Verification
./gradlew :card-game:build— compilescardGame.xtcand its xunit testspass (through the shared
xtc-conventionsplugin, withfailOnTestFailure=true)../gradlew installDist— succeeds;cardGame.xtcis aggregated intobuild/install/examples/lib/alongside the other example modules../gradlew build installDist --warning-mode all— BUILD SUCCESSFUL with no Gradle 10 deprecation warnings; no delegated accessors remain.