Skip to content

Commit

Permalink
migrate to the new setup-gradle and dependency-submission actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Jan 26, 2024
1 parent 7bf11dd commit 2514eac
Show file tree
Hide file tree
Showing 21 changed files with 121 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/actions/run-gradle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ runs:
distribution: temurin
- name: Setup Gradle
id: setup-gradle
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1
uses: gradle/actions/setup-gradle@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
continue-on-error: true
env:
JAVA_HOME: ${{ steps.setup-gradle-jdk.outputs.path }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ jobs:
java: ${{ env.PUBLISH_JDK }}
continue-on-error: true
- name: Publish to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3.1.5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Publish to Codacy
Expand Down Expand Up @@ -355,7 +355,7 @@ jobs:
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
timeout-minutes: 5
with:
action: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
action: gradle/actions/setup-gradle@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with: |
cache-read-only: false
arguments: help --no-scan
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
timeout-minutes: 5
with:
action: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
action: gradle/actions/setup-gradle@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with: |
cache-read-only: false
arguments: help --no-scan
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on: [pull_request]

permissions:
contents: read
pull-requests: write

jobs:
dependency-review:
Expand All @@ -20,3 +21,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Dependency Review
uses: actions/dependency-review-action@4901385134134e04cec5fbe5ddfe3b2c5bd5d976 # v4.0.0
with:
comment-summary-in-pr: on-failure
retry-on-snapshot-warnings: true
retry-on-snapshot-warnings-timeout: 600
27 changes: 27 additions & 0 deletions .github/workflows/dependency-submission-pr-retreive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Retrieve and submit dependency graph
permissions: read-all
on:
workflow_run:
workflows: ['Generate and save dependency graph']
types: [completed]

env:
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
JAVA_VERSION: 21

jobs:
submit-dependency-graph:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: audit
- name: Retrieve and submit dependency graph
uses: gradle/actions/dependency-submission@v3-beta
with:
dependency-graph-action: retrieve-and-submit # Download saved dependency-graph and submit
63 changes: 63 additions & 0 deletions .github/workflows/dependency-submission-pr-submit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Generate and save dependency graph
permissions: read-all
on: [ pull_request ]

env:
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
JAVA_VERSION: 21

jobs:
dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.adoptium.net:443
api.github.com:443
caffeine.gradle-enterprise.cloud:443
downloads.gradle.org:443
downloads.gradle-dn.com:443
github.com:443
jcenter.bintray.com:443
objects.githubusercontent.com:443
plugins.gradle.org:443
plugins-artifacts.gradle.org:443
repo.maven.apache.org:443
repo1.maven.org:443
services.gradle.org:443
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
timeout-minutes: 5
with:
action: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with: |
cache: gradle
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
attempt_limit: 3
attempt_delay: 2000
- name: Setup Gradle
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
timeout-minutes: 5
with:
action: gradle/actions/setup-gradle@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with: |
cache-read-only: false
arguments: help --no-scan
generate-job-summary: false
gradle-home-cache-cleanup: true
attempt_limit: 3
attempt_delay: 2000
- name: Submit Dependency Graph
uses: gradle/actions/dependency-submission@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
dependency-graph-action: generate-and-save
16 changes: 4 additions & 12 deletions .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Dependency Submission
on:
push:
branches: [master]
permissions: read-all
on: [ push ]

env:
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
Expand Down Expand Up @@ -50,7 +48,7 @@ jobs:
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
timeout-minutes: 5
with:
action: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
action: gradle/actions/setup-gradle@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with: |
cache-read-only: false
arguments: help --no-scan
Expand All @@ -59,12 +57,6 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Submit Dependency Graph
uses: mikepenz/gradle-dependency-submission@e39d996cbb20c65ff32b7129c0e2be9caefa8f7a # v1
uses: gradle/actions/dependency-submission@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with:
gradle-build-module: |-
:simulator
:caffeine
:jcache
:guava
include-build-environment: true
sub-module-mode: INDIVIDUAL_DEEP
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
timeout-minutes: 5
with:
action: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
action: gradle/actions/setup-gradle@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with: |
cache-read-only: false
arguments: help --no-scan
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
timeout-minutes: 5
with:
action: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
action: gradle/actions/setup-gradle@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with: |
cache-read-only: false
arguments: help --no-scan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ caffeine = "3.1.8"
junit = "5.10.1"
reactor = "3.6.2"
truth = "1.3.0"
versions = "0.50.0"
versions = "0.51.0"

[libraries]
caffeine = { module = "com.github.ben-manes.caffeine:caffeine", version.ref = "caffeine" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-3-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion examples/graal-native/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ caffeine = "3.1.8"
graal = "0.9.28"
junit = "5.10.1"
truth = "1.3.0"
versions = "0.50.0"
versions = "0.51.0"

[libraries]
caffeine = { module = "com.github.ben-manes.caffeine:caffeine", version.ref = "caffeine" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-3-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion examples/hibernate/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ junit = "5.10.1"
log4j2 = "3.0.0-beta1"
slf4j = "2.0.7"
truth = "1.3.0"
versions = "0.50.0"
versions = "0.51.0"

[libraries]
caffeine = { module = "com.github.ben-manes.caffeine:jcache", version.ref = "caffeine" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-3-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion examples/resilience-failsafe/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ caffeine = "3.1.8"
failsafe = "3.3.2"
junit = "5.10.1"
truth = "1.3.0"
versions = "0.50.0"
versions = "0.51.0"

[libraries]
caffeine = { module = "com.github.ben-manes.caffeine:caffeine", version.ref = "caffeine" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-3-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion examples/write-behind-rxjava/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ awaitility = "4.2.0"
caffeine = "3.1.8"
junit = "5.10.1"
rxjava = "3.1.8"
versions = "0.50.0"
versions = "0.51.0"

[libraries]
awaitility = { module = "org.awaitility:awaitility", version.ref = "awaitility" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-3-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ expiring-map = "0.5.11"
fast-filter = "1.0.2"
fastutil = "8.5.12"
felix-framework = "7.0.5"
felix-scr = "2.2.6"
felix-scr = "2.2.10"
findsecbugs = "1.12.0"
flip-tables = "1.1.0"
flip-tables = "1.1.1"
forbidden-apis = "3.6"
google-java-format = "1.19.2"
guava = "33.0.0-jre"
Expand Down Expand Up @@ -63,7 +63,7 @@ junit4 = "4.13.2"
junit5 = "5.10.1"
kotlin = "1.9.22"
lincheck = "2.18.1"
mockito = "5.9.0"
mockito = "5.10.0"
nexus-publish = "2.0.0-rc-1"
nullaway-core = "0.10.21"
nullaway-plugin = "1.6.0"
Expand All @@ -82,13 +82,13 @@ snakeyaml = "2.2"
sonarqube = "4.4.1.3373"
spotbugs-contrib = "7.6.4"
spotbugs-core = "4.8.3"
spotbugs-plugin = "6.0.6"
spotbugs-plugin = "6.0.7"
stream = "2.9.8"
tcache = "2.0.1"
testng = "7.9.0"
truth = "1.3.0"
univocity-parsers = "2.9.1"
versions = "0.50.0"
versions = "0.51.0"
xz = "1.9"
ycsb = "0.17.0"
zero-allocation-hashing = "0.16"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-3-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 2514eac

Please sign in to comment.