Skip to content

Commit b2600fc

Browse files
[sourcegen] Update common files for branch master (#2)
* Update common files * Bump build script --------- Co-authored-by: Denis Stepanov <[email protected]>
1 parent ed94e3a commit b2600fc

11 files changed

+36
-45
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ end_of_line = lf
1212
[{*.bat,*.cmd}]
1313
end_of_line = crlf
1414

15+
[{*.mustache,*.ftl}]
16+
insert_final_newline = false
17+
1518
[*.java]
1619
indent_size = 4
1720
tab_width = 4

.github/workflows/central-sync.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
with:
2020
ref: v${{ github.event.inputs.release_version }}
2121
- uses: gradle/wrapper-validation-action@v1

.github/workflows/graalvm-dev.yml

+2-2
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@v3
21+
- uses: actions/checkout@v4
2222
- name: Build Matrix
2323
uses: micronaut-projects/github-actions/graalvm/build-matrix@master
2424
id: build-matrix
@@ -34,7 +34,7 @@ jobs:
3434
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
3535
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
3636
steps:
37-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
3838
- name: Pre-Build Steps
3939
uses: micronaut-projects/github-actions/graalvm/pre-build@master
4040
id: pre-build

.github/workflows/graalvm-latest.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
outputs:
2525
matrix: ${{ steps.build-matrix.outputs.matrix }}
2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2828
- name: Build Matrix
2929
uses: micronaut-projects/github-actions/graalvm/build-matrix@master
3030
id: build-matrix
@@ -34,19 +34,21 @@ jobs:
3434
runs-on: ubuntu-latest
3535
strategy:
3636
max-parallel: 6
37-
matrix: ${{ fromJson(needs.build_matrix.outputs.matrix) }}
37+
matrix:
38+
java: ['17', '21']
39+
native_test_task: ${{ fromJson(needs.build_matrix.outputs.matrix).native_test_task }}
3840
env:
3941
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
4042
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
4143
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
4244
steps:
43-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4446
- name: Pre-Build Steps
4547
uses: micronaut-projects/github-actions/graalvm/pre-build@master
4648
id: pre-build
4749
with:
48-
distribution: 'graalvm-community'
49-
java: '17'
50+
distribution: 'graalvm'
51+
java: ${{ matrix.java }}
5052
- name: Build Steps
5153
uses: micronaut-projects/github-actions/graalvm/build@master
5254
id: build
@@ -60,4 +62,4 @@ jobs:
6062
uses: micronaut-projects/github-actions/graalvm/post-build@master
6163
id: post-build
6264
with:
63-
java: '17'
65+
java: ${{ matrix.java }}

.github/workflows/gradle.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
java: ['17']
22+
java: ['17', '21']
2323
env:
2424
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
2525
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
@@ -40,14 +40,14 @@ jobs:
4040
df -h
4141
4242
- name: "📥 Checkout repository"
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444
with:
4545
fetch-depth: 0
4646

4747
- name: "🔧 Setup GraalVM CE"
48-
uses: graalvm/[email protected].1
48+
uses: graalvm/[email protected].4
4949
with:
50-
distribution: 'graalvm-community'
50+
distribution: 'graalvm'
5151
java-version: ${{ matrix.java }}
5252
github-token: ${{ secrets.GITHUB_TOKEN }}
5353

@@ -64,13 +64,13 @@ jobs:
6464
./gradlew check --no-daemon --continue
6565
6666
- name: "🔎 Run static analysis"
67-
if: env.SONAR_TOKEN != ''
67+
if: env.SONAR_TOKEN != '' && matrix.java == '17'
6868
run: |
6969
./gradlew sonar
7070
7171
- name: "📊 Publish Test Report"
7272
if: always()
73-
uses: mikepenz/action-junit-report@v3
73+
uses: mikepenz/action-junit-report@v4
7474
with:
7575
check_name: Java CI / Test Report (${{ matrix.java }})
7676
report_paths: '**/build/test-results/test/TEST-*.xml'

.github/workflows/publish-snapshot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
if: github.repository != 'micronaut-projects/micronaut-project-template'
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- uses: actions/cache@v3
1515
with:
1616
path: ~/.gradle/caches

.github/workflows/release.yml

+4-19
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818
with:
1919
token: ${{ secrets.GH_TOKEN }}
2020
- uses: gradle/wrapper-validation-action@v1
@@ -91,7 +91,7 @@ jobs:
9191
if: success()
9292
uses: micronaut-projects/github-pages-deploy-action@master
9393
env:
94-
BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
94+
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') }}
9595
GH_TOKEN: ${{ secrets.GH_TOKEN }}
9696
BRANCH: gh-pages
9797
FOLDER: build/docs
@@ -100,21 +100,6 @@ jobs:
100100
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
101101
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
102102
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
103-
- name: Checkout micronaut-core
104-
uses: actions/checkout@v3
105-
with:
106-
token: ${{ secrets.GH_TOKEN }}
107-
repository: micronaut-projects/micronaut-core
108-
ref: ${{ env.githubCoreBranch }}
109-
path: micronaut-core # Must be micronaut-core
110-
continue-on-error: true
111-
- name: Update BOM
112-
uses: micronaut-projects/github-actions/update-bom@master
113-
env:
114-
MICRONAUT_BUILD_EMAIL: ${{ secrets.MICRONAUT_BUILD_EMAIL }}
115-
with:
116-
token: ${{ secrets.GH_TOKEN }}
117-
continue-on-error: true
118103
- name: Run post-release
119104
if: success()
120105
uses: micronaut-projects/github-actions/post-release@master
@@ -149,7 +134,7 @@ jobs:
149134
actions: read # To read the workflow path.
150135
id-token: write # To sign the provenance.
151136
contents: write # To add assets to a release.
152-
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.7.0
137+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.9.0
153138
with:
154139
base64-subjects: "${{ needs.provenance-subject.outputs.artifacts-sha256 }}"
155140
upload-assets: true # Upload to a new release.
@@ -161,7 +146,7 @@ jobs:
161146
if: startsWith(github.ref, 'refs/tags/')
162147
steps:
163148
- name: Checkout repository
164-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
149+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
165150
- name: Download artifacts
166151
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
167152
with:

gradle/wrapper/gradle-wrapper.jar

346 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

+9-8
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -201,11 +202,11 @@ fi
201202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203204

204-
# Collect all arguments for the java command;
205-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
206-
# shell script including quotes and variable substitutions, so put them in
207-
# double quotes to make sure that they get re-expanded; and
208-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
209210

210211
set -- \
211212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

settings.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pluginManagement {
66
}
77

88
plugins {
9-
id("io.micronaut.build.shared.settings") version "6.5.3"
9+
id("io.micronaut.build.shared.settings") version "6.5.7"
1010
}
1111

1212
rootProject.name = "sourcegen-parent"

0 commit comments

Comments
 (0)