Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
- Wrapper validation is done as part of setup-gradle, no need to do it
  ourselves, see https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#gradle-wrapper-validation
- Enable storing configuration cache accross builds
- Submit dependencies from gradle to GitHub
- Do not inspect all tasks on initialization (no longer needed as we have
  proper configuration cache)
  • Loading branch information
mar-v-in committed Dec 20, 2024
1 parent d2fcb09 commit 2fe595d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ jobs:
with:
distribution: "temurin"
java-version: "17"
- name: "Gradle Wrapper validation"
uses: gradle/actions/wrapper-validation@v4
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
- name: "Setup matchers"
run: |
# Setting up matchers...
Expand All @@ -43,8 +46,6 @@ jobs:
echo "Matcher configured: ${NAME:?}"
fi
done
- name: "Inspect Gradle tasks"
run: "./gradlew tasks"
- name: "Execute Gradle assemble"
run: "./gradlew assemble"
- name: "Execute Gradle check"
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Dependency Submission
permissions:
contents: write
on:
push:
branches: [ 'master' ]

jobs:
dependency-submission:
runs-on: ubuntu-latest
env:
GRADLE_MICROG_VERSION_WITHOUT_GIT: 1

steps:
- name: "Checkout sources"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Setup Java"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: "Generate and submit gradle dependency graph"
uses: gradle/actions/dependency-submission@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
dependency-graph-continue-on-failure: true
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"

0 comments on commit 2fe595d

Please sign in to comment.