Skip to content

Commit b39a51c

Browse files
Update common files
1 parent b167060 commit b39a51c

File tree

12 files changed

+73
-26
lines changed

12 files changed

+73
-26
lines changed

.clineignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ build/
66
*/build/
77
!build/docs/
88
!build/docs/**
9+
!build/generated/
10+
!build/generated/**
911

1012
# === Dependency/Cache directories ===
1113
.gradle/

.clinerules/coding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The root project MUST NOT contain any code: it is a parent project which coordin
4141

4242
You SHOULD prefer modern Java idioms: records, pattern matching, sealed interfaces/classes, `var` for local variables.
4343
You MUST NOT use fully qualified class names unless there is a conflict between 2 class names in different packages.
44-
You MUST annotate the code with nullability annotations (`io.micronaut.core.annotation.Nullable`, `io.micronaut.core.annotation.NonNull`).
44+
You MUST annotate the code with nullability annotations (`org.jspecify.annotations.Nullable`, `org.jspecify.annotations.NonNull`).
4545
You MUST NOT use reflection: Micronaut is a reflection-free framework tailored for integration with GraalVM.
4646
You MUST use `jakarta.inject` for dependency injection, NOT `javax.inject`.
4747

.github/instructions/coding.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The root project MUST NOT contain any code: it is a parent project which coordin
4141

4242
You SHOULD prefer modern Java idioms: records, pattern matching, sealed interfaces/classes, `var` for local variables.
4343
You MUST NOT use fully qualified class names unless there is a conflict between 2 class names in different packages.
44-
You MUST annotate the code with nullability annotations (`io.micronaut.core.annotation.Nullable`, `io.micronaut.core.annotation.NonNull`).
44+
You MUST annotate the code with nullability annotations (`org.jspecify.annotations.Nullable`, `org.jspecify.annotations.NonNull`).
4545
You MUST NOT use reflection: Micronaut is a reflection-free framework tailored for integration with GraalVM.
4646
You MUST use `jakarta.inject` for dependency injection, NOT `javax.inject`.
4747

.github/workflows/central-sync.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ jobs:
1414
central-sync:
1515
runs-on: ubuntu-latest
1616
steps:
17+
- name: Remove system JDKs
18+
run: |
19+
sudo rm -rf /usr/lib/jvm/*
20+
unset JAVA_HOME
21+
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v '/usr/lib/jvm' | paste -sd:)
1722
- name: Checkout repository
18-
uses: actions/checkout@v5
23+
uses: actions/checkout@v6
1924
with:
2025
ref: v${{ github.event.inputs.release_version }}
21-
- uses: gradle/actions/wrapper-validation@v4
26+
- uses: gradle/actions/wrapper-validation@v5
2227
- name: Set up JDK
2328
uses: actions/setup-java@v5
2429
with:

.github/workflows/graalvm-dev.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
outputs:
1919
matrix: ${{ steps.build-matrix.outputs.matrix }}
2020
steps:
21-
- uses: actions/checkout@v5
21+
- uses: actions/checkout@v6
2222
- name: Build Matrix
2323
uses: micronaut-projects/github-actions/graalvm/build-matrix@master
2424
id: build-matrix
@@ -42,13 +42,19 @@ jobs:
4242
DEVELOCITY_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
4343
DEVELOCITY_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
4444
steps:
45-
- uses: actions/checkout@v5
45+
- name: Remove system JDKs
46+
run: |
47+
sudo rm -rf /usr/lib/jvm/*
48+
unset JAVA_HOME
49+
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v '/usr/lib/jvm' | paste -sd:)
50+
- uses: actions/checkout@v6
4651
- name: Pre-Build Steps
4752
uses: micronaut-projects/github-actions/graalvm/pre-build@master
4853
id: pre-build
4954
with:
5055
java: ${{ matrix.java }}
5156
distribution: ${{ matrix.distribution }}
57+
nativeTestTask: ${{ matrix.native_test_task }}
5258
- name: Build Steps
5359
uses: micronaut-projects/github-actions/graalvm/build@master
5460
id: build

.github/workflows/graalvm-latest.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,40 @@ jobs:
2424
outputs:
2525
matrix: ${{ steps.build-matrix.outputs.matrix }}
2626
steps:
27-
- uses: actions/checkout@v5
27+
- uses: actions/checkout@v6
2828
- name: Build Matrix
2929
uses: micronaut-projects/github-actions/graalvm/build-matrix@master
3030
id: build-matrix
31+
with:
32+
java-version: '21'
3133
build:
3234
needs: build_matrix
3335
if: github.repository != 'micronaut-projects/micronaut-project-template'
3436
runs-on: ubuntu-latest
3537
strategy:
3638
max-parallel: 6
3739
matrix:
38-
java: ['21', '25']
40+
java: ['21']
3941
native_test_task: ${{ fromJson(needs.build_matrix.outputs.matrix).native_test_task }}
4042
env:
4143
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
4244
DEVELOCITY_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
4345
DEVELOCITY_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
4446
steps:
45-
- uses: actions/checkout@v5
47+
- name: Remove system JDKs
48+
run: |
49+
sudo rm -rf /usr/lib/jvm/*
50+
unset JAVA_HOME
51+
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v '/usr/lib/jvm' | paste -sd:)
52+
- uses: actions/checkout@v6
4653
- name: Pre-Build Steps
4754
uses: micronaut-projects/github-actions/graalvm/pre-build@master
4855
id: pre-build
4956
with:
5057
distribution: 'graalvm'
58+
gradle-java: '21'
5159
java: ${{ matrix.java }}
60+
nativeTestTask: ${{ matrix.native_test_task }}
5261
- name: Build Steps
5362
uses: micronaut-projects/github-actions/graalvm/build@master
5463
id: build

.github/workflows/gradle.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
OSS_INDEX_PASSWORD: ${{ secrets.OSS_INDEX_PASSWORD }}
3535
steps:
3636
# https://github.com/actions/virtual-environments/issues/709
37+
- name: Remove system JDKs
38+
run: |
39+
sudo rm -rf /usr/lib/jvm/*
40+
unset JAVA_HOME
41+
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v '/usr/lib/jvm' | paste -sd:)
3742
- name: "🗑 Free disk space"
3843
run: |
3944
sudo rm -rf "/usr/local/share/boost"
@@ -42,19 +47,19 @@ jobs:
4247
df -h
4348
4449
- name: "📥 Checkout repository"
45-
uses: actions/checkout@v5
50+
uses: actions/checkout@v6
4651
with:
4752
fetch-depth: 0
4853

4954
- name: "🔧 Setup GraalVM CE"
50-
uses: graalvm/[email protected].1
55+
uses: graalvm/[email protected].3
5156
with:
5257
distribution: 'graalvm'
5358
java-version: ${{ matrix.java }}
5459
github-token: ${{ secrets.GITHUB_TOKEN }}
5560

5661
- name: "🔧 Setup Gradle"
57-
uses: gradle/actions/setup-gradle@v4
62+
uses: gradle/actions/setup-gradle@v5
5863

5964
- name: "❓ Optional setup step"
6065
run: |
@@ -69,7 +74,7 @@ jobs:
6974
- name: "🛠 Build with Gradle"
7075
id: gradle
7176
run: |
72-
./gradlew jacocoReport check --no-daemon --continue
77+
./gradlew check jacocoReport --no-daemon --continue
7378
7479
- name: "🔎 Run static analysis"
7580
if: env.SONAR_TOKEN != '' && matrix.java == '21'
@@ -78,15 +83,15 @@ jobs:
7883
7984
- name: "📊 Publish Test Report"
8085
if: always()
81-
uses: mikepenz/action-junit-report@v5
86+
uses: mikepenz/action-junit-report@v6
8287
with:
8388
check_name: Java CI / Test Report (${{ matrix.java }})
8489
report_paths: '**/build/test-results/test/TEST-*.xml'
8590
check_retries: 'true'
8691

8792
- name: "📜 Upload binary compatibility check results"
8893
if: matrix.java == '21'
89-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
94+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
9095
with:
9196
name: binary-compatibility-reports
9297
path: "**/build/reports/binary-compatibility-*.html"
@@ -114,3 +119,7 @@ jobs:
114119
GH_TOKEN: ${{ secrets.GH_TOKEN }}
115120
BRANCH: gh-pages
116121
FOLDER: build/docs
122+
123+
- name: "❓ Optional cleanup step"
124+
run: |
125+
[ -f ./cleanup.sh ] && ./cleanup.sh || [ ! -f ./cleanup.sh ]

.github/workflows/publish-snapshot.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ jobs:
1010
if: github.repository != 'micronaut-projects/micronaut-project-template'
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v5
13+
- name: Remove system JDKs
14+
run: |
15+
sudo rm -rf /usr/lib/jvm/*
16+
unset JAVA_HOME
17+
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v '/usr/lib/jvm' | paste -sd:)
18+
- uses: actions/checkout@v6
1419
- uses: actions/cache@v4
1520
with:
1621
path: ~/.gradle/caches

.github/workflows/release.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ jobs:
1313
artifacts-sha256: ${{ steps.hash.outputs.artifacts-sha256 }} # Computed hashes for build artifacts.
1414
runs-on: ubuntu-latest
1515
steps:
16+
- name: Remove system JDKs
17+
run: |
18+
sudo rm -rf /usr/lib/jvm/*
19+
unset JAVA_HOME
20+
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v '/usr/lib/jvm' | paste -sd:)
1621
- name: Checkout repository
17-
uses: actions/checkout@v5
22+
uses: actions/checkout@v6
1823
with:
1924
token: ${{ secrets.GH_TOKEN }}
20-
- uses: gradle/actions/wrapper-validation@v4
25+
- uses: gradle/actions/wrapper-validation@v5
2126
- name: Set up JDK
2227
uses: actions/setup-java@v5
2328
with:
@@ -68,13 +73,13 @@ jobs:
6873
# Store the hash in a file, which is uploaded as a workflow artifact.
6974
sha256sum $ARTIFACTS | base64 -w0 > artifacts-sha256
7075
- name: Upload build artifacts
71-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
76+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
7277
with:
7378
name: gradle-build-outputs
7479
path: build/repo/${{ steps.publish.outputs.group }}/*/${{ steps.publish.outputs.version }}/*
7580
retention-days: 5
7681
- name: Upload artifacts-sha256
77-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
82+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
7883
with:
7984
name: artifacts-sha256
8085
path: artifacts-sha256
@@ -89,11 +94,14 @@ jobs:
8994
GH_USERNAME: ${{ secrets.GH_USERNAME }}
9095
- name: Export Gradle Properties
9196
uses: micronaut-projects/github-actions/export-gradle-properties@master
97+
- name: LATEST_TAG
98+
run: |
99+
echo "LATEST_TAG=$(curl -s -L -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2022-11-28' https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name')" >> $GITHUB_ENV
92100
- name: Publish to Github Pages
93101
if: success()
94102
uses: micronaut-projects/github-pages-deploy-action@master
95103
env:
96-
BETA: ${{ !(github.event.release.target_commitish == github.event.repository.default_branch) || contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
104+
BETA: ${{ !(github.event.release.tag_name == env.LATEST_TAG) || github.event.release.draft || github.event.release.prerelease || contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
97105
GH_TOKEN: ${{ secrets.GH_TOKEN }}
98106
BRANCH: gh-pages
99107
FOLDER: build/docs
@@ -117,7 +125,7 @@ jobs:
117125
artifacts-sha256: ${{ steps.set-hash.outputs.artifacts-sha256 }}
118126
steps:
119127
- name: Download artifacts-sha256
120-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
128+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
121129
with:
122130
name: artifacts-sha256
123131
# The SLSA provenance generator expects the hash digest of artifacts to be passed as a job
@@ -148,9 +156,9 @@ jobs:
148156
if: startsWith(github.ref, 'refs/tags/')
149157
steps:
150158
- name: Checkout repository
151-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
159+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
152160
- name: Download artifacts
153-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
161+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
154162
with:
155163
name: gradle-build-outputs
156164
path: build/repo
@@ -162,6 +170,6 @@ jobs:
162170
- name: Upload assets
163171
# Upload the artifacts to the existing release. Note that the SLSA provenance will
164172
# attest to each artifact file and not the aggregated ZIP file.
165-
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
173+
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
166174
with:
167175
files: artifacts.zip

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ src/main/docs/resources/img/micronaut-logo-white.svg
3434

3535
# Ignore files generated by test-resources
3636
**/.micronaut/test-resources/
37+
38+
# Ignore gradle.properties generated by micronaut-build
39+
/buildSrc/gradle.properties

0 commit comments

Comments
 (0)