-
Couldn't load subscription status.
- Fork 173
update build to work with gradle 9.1 and Java 25 #962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ jobs: | |
| run: echo "The selected java versions are ${{ steps.set-matrix.outputs.version_matrix }}" | ||
| outputs: | ||
| version_matrix: ${{ steps.set-matrix.outputs.version_matrix }} | ||
| build: | ||
| test-jvm: | ||
| needs: build-jvm-matrix | ||
| strategy: | ||
| fail-fast: false | ||
|
|
@@ -49,7 +49,9 @@ jobs: | |
| - name: set up JDK | ||
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | ||
| with: | ||
| java-version: ${{ matrix.java_version }} | ||
| java-version: | | ||
| ${{ matrix.java_version }} | ||
| 21 | ||
| distribution: 'zulu' | ||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | ||
|
|
@@ -66,7 +68,7 @@ jobs: | |
| ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}- | ||
| ${{ runner.os }}-gradle-wrapper- | ||
| - name: Test Plugin | ||
| run: ./plugin/gradlew -p ./plugin check --no-daemon | ||
| run: ./plugin/gradlew -p ./plugin test${{ matrix.java_version }} --no-daemon | ||
| - name: Upload test results | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| if: failure() | ||
|
|
@@ -83,6 +85,45 @@ jobs: | |
| replay_pid* | ||
| plugin/hs_err_pid* | ||
| plugin/replay_pid* | ||
|
|
||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Harden the runner (Audit all outbound calls) | ||
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | ||
| with: | ||
| egress-policy: audit | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - name: set up JDK | ||
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | ||
| with: | ||
| java-version: 21 | ||
| cache: 'gradle' | ||
| distribution: 'zulu' | ||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 | ||
| with: | ||
| cache-overwrite-existing: true | ||
| - name: Restore TestKit cache | ||
| # Inspired by https://github.com/actions/cache/issues/432#issuecomment-740376179 | ||
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 | ||
| with: | ||
| path: | | ||
| plugin/.gradle-test-kit/caches/modules-2 | ||
| plugin/.gradle-test-kit/caches/files-2.1 | ||
| plugin/.gradle-test-kit/caches/metadata-2.96 | ||
| key: gradle-wrapper-${{ hashFiles('**/gradlew') }}-${{ github.sha }} | ||
| restore-keys: | | ||
| gradle-wrapper-${{ hashFiles('**/gradlew') }}- | ||
| gradle-wrapper- | ||
|
Comment on lines
+107
to
+118
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did this get dropped during some of my refactors accidentally? Whoops 😬 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no this is copy-pasted from another spot, b/c i had to make a separate task |
||
| - name: Check Plugin | ||
| run: ./plugin/gradlew -p ./plugin build --no-daemon | ||
| - name: Upload test results | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| if: failure() | ||
| with: | ||
| name: test-results | ||
| path: plugin/build/reports/tests/test/ | ||
| - name: Check plugin codestyle | ||
| run: ./plugin/gradlew -p ./plugin ktlintCheck --no-daemon | ||
|
|
||
|
|
@@ -124,15 +165,15 @@ jobs: | |
| with: | ||
| egress-policy: audit | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - name: set up JDK 11 | ||
| - name: set up JDK 21 | ||
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | ||
| with: | ||
| java-version: 11 | ||
| java-version: 21 | ||
| distribution: 'zulu' | ||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | ||
| - name: Check ktlint-plugin on samples | ||
| run: ./gradlew ktlintCheck --no-daemon | ||
| run: ./gradlew ktlintCheck --no-daemon --stacktrace | ||
| - name: Generate and submit dependency graph | ||
| uses: gradle/actions/dependency-submission@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | ||
| with: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| toolchainVersion=21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this already in the matrix? Do we need to add it again manually? Just trying to understand
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the daemon toolchain is locked to 21 now, so we always need 21 for gradle itself. the test process is forked off of that using a project toolchain launcher, determined by the parameter we pass in (which is sourced from the matrix)