Restore Gradle composite build with XTC plugin#11
Open
Conversation
…yout The composite build infrastructure was accidentally lost when PR #3 merged the chess-game wrapper removal but not the re-add. This commit restores and modernizes the build setup: - Gradle wrapper at 9.4.0 with version catalog (XTC 0.4.4-SNAPSHOT) - Root composite build including all 4 examples (welcome, banking, counter, chess-game) - build-logic with webapp-conventions and static-webapp-conventions plugins - Source layout standardized to src/main/x/ (XTC plugin convention) - Test modules moved to src/test/x/ (BankTest.x, welcomeTest.x rewritten) - Root installDist task collects all .xtc modules to build/install/examples/lib/ - Per-project xtcRun configuration (welcome runs welcomeTest standalone) - Chess-game standalone gradle wrapper removed (uses root wrapper) - README rewritten with build/run/Docker instructions using modern xtc CLI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Combine static-webapp-conventions and webapp-conventions into one plugin that conditionally applies Node/npm when webapp/package.json exists - Clean up mavenLocal comments with explanation - Remove redundant root xdkDistribution dependency Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace string-based tasks.named() with typed tasks.existing delegates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Multi-stage build: compiles all examples in eclipse-temurin:25-jdk, then copies the .xtc modules to a slim JRE image. No JDK, Gradle, or Node.js required on the host — only Docker. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- @disabled the 3 @databasetest(PerTest) test classes in BankTest.x with detailed explanation: xunit_db PerTest lifecycle bug where ExecutionContext is not registered as an injectable resource (Shared lifecycle works fine) - Dockerfile: 3-stage build using gradle:jdk25, ghcr.io/xtclang/xvm:latest, and eclipse-temurin:25-jre — runs welcomeTest as build-time verification - Upgrade Gradle wrapper to 9.4.1 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The kotlin-dsl plugin generates accessor code in an internal project that inherits the build-logic version. Without an explicit version, Gradle emits: "Project 'gradle-kotlin-dsl-accessors' has unspecified version." Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
thegridman
approved these changes
Mar 25, 2026
Contributor
thegridman
left a comment
There was a problem hiding this comment.
This looks ok. You can merge and I can look at the XUnit issue in a separate PR
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.
Summary
xccExec taskssrc/main/x/(XTC plugin convention), move tests tosrc/test/x/build-logic/with a unifiedwebapp-conventionsplugin that conditionally applies Node/npm whenwebapp/package.jsonexistsinstallDisttask that collects all 11.xtcmodules intobuild/install/examples/lib/xtcRunforwelcomeTest— the only standalone-runnable module (the rest are@WebAppmodules that need the platform)welcomeTest.x(was referencingschema.countwhich was renamed toschema.countersin 2024)@Disabledthree@DatabaseTest(PerTest)test classes in BankTest.x due to upstream xunit_db bug (PerTest lifecycle doesn't register ExecutionContext as injectable — Shared lifecycle works fine)Dockerfile: builds withgradle:jdk25, bundles XVM fromghcr.io/xtclang/xvm:latest, runswelcomeTestas build-time verificationxtc build/xtc runCLITest plan
./gradlew build— all 4 examples compile, 25/25 enabled tests pass./gradlew installDist— all 11.xtcmodules collected./gradlew :welcome:runXtc— runs welcomeTest, counter increments across runsdocker build -t xtc-examples .— multi-stage build succeeds, welcomeTest runs during builddocker run --rm xtc-examples— runs welcomeTest from the image🤖 Generated with Claude Code