From 6a4b5468f96d771f0d9da0f1f797285dcd4f77b1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 26 Sep 2026 01:49:05 +0000 Subject: [PATCH 1/4] Add GitHub Actions build and GitHub Packages release - build.yml: mvn install on JDK 8, 17 and 21 for pushes to master and PRs. - release.yml: on a v* tag (as created by update-version.sh), check the tag matches the project version and deploy to GitHub Packages via -DaltDeploymentRepository. distributionManagement is left as is for a later Maven Central setup. - Build against the released Codename One 7.0.273 instead of 8.0-SNAPSHOT, which only exists in a local Codename One build, and add repo.codenameone.com where Codename One releases are published, so a clean runner can resolve it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01U1nqukudLDu9Qix74WZruV --- .github/workflows/build.yml | 31 ++++++++++++++++++++++++++ .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ pom.xml | 21 ++++++++++++++---- 3 files changed, 89 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..2d02f7e1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build + +on: + push: + branches: [master] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # 8 is the release JDK; 17 and 21 catch annotation-processor and javac regressions. + java: ['8', '17', '21'] + name: build (JDK ${{ matrix.java }}) + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{ matrix.java }} + cache: maven + + - name: Build and test + run: mvn -B -Djava.awt.headless=true install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..af389c5f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release + +# Publishes to GitHub Packages when a version tag is pushed. update-version.sh creates the tag: +# bash update-version.sh 2.0.7 && git push origin master v2.0.7 +on: + push: + tags: ['v*'] + +permissions: + contents: read + packages: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '8' + cache: maven + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN + + - name: Check the tag matches the project version + run: | + version=$(mvn -B -q help:evaluate -Dexpression=project.version -DforceStdout) + if [ "v${version}" != "${GITHUB_REF_NAME}" ]; then + echo "::error::Tag ${GITHUB_REF_NAME} does not match project version ${version}" + exit 1 + fi + + - name: Publish to GitHub Packages + run: > + mvn -B -Djava.awt.headless=true deploy + -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/pom.xml b/pom.xml index e8ebb0b0..417ff3c6 100644 --- a/pom.xml +++ b/pom.xml @@ -35,8 +35,8 @@ - 8.0-SNAPSHOT - 8.0-SNAPSHOT + 7.0.273 + 7.0.273 UTF-8 1.8 @@ -203,11 +203,24 @@ + - + + codenameone + https://repo.codenameone.com/maven2 + + false + + - + + codenameone-plugins + https://repo.codenameone.com/maven2 + + false + + From a89ee7e336350b4316b968cfee97cf209a1c1279 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 26 Sep 2026 01:53:36 +0000 Subject: [PATCH 2/4] Run the CI build under xvfb-run The Codename One test runner in tests/javase starts the JavaSE port, which needs a display; with java.awt.headless it fails before any test runs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01U1nqukudLDu9Qix74WZruV --- .github/workflows/build.yml | 3 ++- .github/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d02f7e1..c608239d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,5 +27,6 @@ jobs: java-version: ${{ matrix.java }} cache: maven + # The Codename One test runner in tests/javase starts the JavaSE port, which needs a display. - name: Build and test - run: mvn -B -Djava.awt.headless=true install + run: xvfb-run -a mvn -B install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af389c5f..e1885fc6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: - name: Publish to GitHub Packages run: > - mvn -B -Djava.awt.headless=true deploy + xvfb-run -a mvn -B deploy -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From dde325bb1c21abd4fb56def088e95e84e883202d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 26 Sep 2026 01:56:38 +0000 Subject: [PATCH 3/4] Compile coderad-annotations for Java 8 and fix the deploy repository format - annotations targeted Java 1.7, which JDK 21's javac no longer supports; every other module already targets 8. - Use the id::layout::url form of -DaltDeploymentRepository: annotations and the processor pin maven-deploy-plugin 2.8.2, which only accepts that form (3.x accepts it too). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01U1nqukudLDu9Qix74WZruV --- .github/workflows/release.yml | 2 +- annotations/pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1885fc6..52c377a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,6 @@ jobs: - name: Publish to GitHub Packages run: > xvfb-run -a mvn -B deploy - -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }} + -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${{ github.repository }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/annotations/pom.xml b/annotations/pom.xml index 608fe8e4..7a8997c8 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -18,8 +18,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 From 05c8902340a6c8ca41b6377e75df053602b99e6c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 26 Sep 2026 02:04:16 +0000 Subject: [PATCH 4/4] Build the test modules against the parent's Codename One version tests/pom.xml pinned codenameone-maven-plugin 7.0.22, whose compliance-check needs ~/.codenameone/CodeNameOneBuildClient.jar to already exist, so it failed on a fresh CI runner. Inheriting 7.0.273 from the parent removes that requirement. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01U1nqukudLDu9Qix74WZruV --- tests/pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/pom.xml b/tests/pom.xml index a0c73da3..b99d1a54 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -45,8 +45,6 @@ --> - 7.0.22 - 7.0.22 UTF-8 1.8