Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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

# The Codename One test runner in tests/javase starts the JavaSE port, which needs a display.
- name: Build and test
run: xvfb-run -a mvn -B install
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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: >
xvfb-run -a mvn -B deploy
-DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
Expand Down
21 changes: 17 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
</scm>

<properties>
<cn1.plugin.version>8.0-SNAPSHOT</cn1.plugin.version>
<cn1.version>8.0-SNAPSHOT</cn1.version>
<cn1.plugin.version>7.0.273</cn1.plugin.version>
<cn1.version>7.0.273</cn1.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<java.version>1.8</java.version>
Expand Down Expand Up @@ -203,11 +203,24 @@
</build>


<!-- Codename One releases are published here rather than to Maven Central. -->
<repositories>

<repository>
<id>codenameone</id>
<url>https://repo.codenameone.com/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>

<pluginRepository>
<id>codenameone-plugins</id>
<url>https://repo.codenameone.com/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>


Expand Down
2 changes: 0 additions & 2 deletions tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
</distributionManagement>-->

<properties>
<cn1.version>7.0.22</cn1.version>
<cn1.plugin.version>7.0.22</cn1.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<java.version>1.8</java.version>
Expand Down
Loading