Compare commits

...
Author SHA1 Message Date
dependabot[bot] dab74e8114 Bump the github-actions group across 2 directories with 11 updates
Bumps the github-actions group with 11 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/setup-node](https://github.com/actions/setup-node) | `7.0.0` | `7.1.0` |
| [gradle/actions/setup-gradle](https://github.com/gradle/actions) | `6.3.0` | `6.4.1` |
| [github/codeql-action/init](https://github.com/github/codeql-action) | `4.37.9` | `4.39.3` |
| [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.37.9` | `4.39.3` |
| [actions/setup-java](https://github.com/actions/setup-java) | `6.0.0` | `6.3.0` |
| [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.4.4` | `2.5.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.1` | `7.0.2` |
| [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) | `7.2.0` | `7.2.1` |
| [gradle/actions/wrapper-validation](https://github.com/gradle/actions) | `6.3.0` | `6.4.1` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `8.0.1` | `8.0.2` |
| [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) | `8.1.1` | `8.1.3` |
| [actions/setup-node](https://github.com/actions/setup-node) | `7.0.0` | `7.1.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.1` | `7.0.2` |

Bumps the github-actions group with 2 updates in the /.github/actions/build-dist directory: [actions/setup-node](https://github.com/actions/setup-node) and [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `actions/setup-node` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1)

Updates `gradle/actions/setup-gradle` from 6.3.0 to 6.4.1
- [Release notes](https://github.com/gradle/actions/releases)
- [Commits](https://github.com/gradle/actions/compare/9c971963bec38e04b3d30dcc455b5382be2fdbfb...8da46b539cd8fe6ab27ca75128919a18d757604c)

Updates `github/codeql-action/init` from 4.37.9 to 4.39.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/cdf488f595d80d6e07e03d4674febd5ab45fa938...33d7b85da1a04171e211befe2c739303b9a4c066)

Updates `github/codeql-action/analyze` from 4.37.9 to 4.39.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/cdf488f595d80d6e07e03d4674febd5ab45fa938...33d7b85da1a04171e211befe2c739303b9a4c066)

Updates `actions/setup-java` from 6.0.0 to 6.3.0
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/dd06d9cba3e5552c54d9f8ea23572deb30010f7c...d1374f8ac74474200d16ef8ecee22c7ae7a51880)

Updates `ossf/scorecard-action` from 2.4.4 to 2.5.0
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/2d1146689b8cda280b9bc96326124645441f03bc...fa7117db83c52d787ae5a89f350999701505d78e)

Updates `actions/upload-artifact` from 7.0.1 to 7.0.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9)

Updates `stefanzweifel/git-auto-commit-action` from 7.2.0 to 7.2.1
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/4a55954c782fc1ea30b9056cd3e7a2b40ca8887d...d0b01107b5db882071f96de5dd4b54961ea93f4c)

Updates `gradle/actions/wrapper-validation` from 6.3.0 to 6.4.1
- [Release notes](https://github.com/gradle/actions/releases)
- [Commits](https://github.com/gradle/actions/compare/9c971963bec38e04b3d30dcc455b5382be2fdbfb...8da46b539cd8fe6ab27ca75128919a18d757604c)

Updates `actions/download-artifact` from 8.0.1 to 8.0.2
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c...9000827ccba6bdab643e8b6fd33ac0654aef8333)

Updates `peter-evans/create-pull-request` from 8.1.1 to 8.1.3
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/5f6978faf089d4d20b00c7766989d076bb2fc7f1...3ffccacd46053766916f087ce41d627c0b8cf2d1)

Updates `actions/setup-node` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1)

Updates `actions/upload-artifact` from 7.0.1 to 7.0.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9)

Updates `actions/setup-node` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1)

Updates `actions/upload-artifact` from 7.0.1 to 7.0.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9)

Updates `actions/setup-node` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1)

Updates `actions/upload-artifact` from 7.0.1 to 7.0.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/setup-java
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.39.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: github/codeql-action/init
  dependency-version: 4.39.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: gradle/actions/setup-gradle
  dependency-version: 6.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: gradle/actions/wrapper-validation
  dependency-version: 6.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: ossf/scorecard-action
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: peter-evans/create-pull-request
  dependency-version: 8.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: 7.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-11-19 23:05:56 +00:00
Eric Haag c0152e9a6b Update develocity-injection init script to v2.1 (#1126)
Updates the develocity-injection init script to the latest reference
script content
from https://github.com/gradle/develocity-ci-injection.
2026-11-18 21:12:41 -06:00
Eric Haag db2e964163 Stop expecting a pre-installed JDK 8 in the toolchain detection tests 2026-11-18 20:52:58 -06:00
Eric Haag a9a26ec8ba Provision Java 8 for the init script tests when no local installation exists 2026-11-18 20:52:58 -06:00
Bot Githubaction 2d3f49afd6 Update develocity-injection init script to v2.1
Updates the develocity-injection init script to the latest reference script content
from https://github.com/gradle/develocity-ci-injection.
2026-11-19 01:53:54 +00:00
Iñaki Villar 445a164ce8 Authenticate Develocity injection integ tests with workload identity (#1112)
## Changes

Follow-up to #1109. That PR left `suite-integ-test-other.yml` on
`DV_SOLUTIONS_ACCESS_KEY`.

`integ-test-inject-develocity.yml` now gets a GitHub OIDC token, in
`solutions.develocity.cloud=<token>` form, from the same pre-step as
#1109. The token goes where the access key went before:

- **`inject-develocity`**: the `DEVELOCITY_ACCESS_KEY` /
`GRADLE_ENTERPRISE_ACCESS_KEY` env var, set per matrix entry through
`$GITHUB_ENV`
- **`inject-develocity-with-access-key`**: the `develocity-access-key`
input
- **`inject-develocity-short-lived-token-failed`**: both env vars and
the input
- **`inject-develocity-with-access-key-from-input-actions`**: the
`DEVELOCITY_ACCESS_KEY` env var

setup-gradle exchanges the OIDC token at `/api/auth/token` the same way
it exchanges an access key. The `DEVELOCITY_ACCESS_KEY` secret is
removed from the reusable workflow. `id-token: write` is granted along
the chain: `ci-integ-test*.yml` → `suite-integ-test-other.yml` → the
jobs. Fork PRs are already skipped for these jobs.

Part of gradle/dv#74660. After this merges, nothing in gradle/actions
uses `DV_SOLUTIONS_ACCESS_KEY`.

## Verification

- [ ] CI-integ-test on this PR: `develocity-injection` jobs green, Build
Scans published to solutions.develocity.cloud
2026-11-12 10:53:43 -06:00
Iñaki Villar fac0990588 Bump Gradle Wrapper from 9.9.0 to 9.9.1 in /.github/workflow-samples/java-toolchain (#1123)
Bump Gradle Wrapper from 9.9.0 to 9.9.1.

Release notes of Gradle 9.9.1 can be found here:
https://docs.gradle.org/9.9.1/release-notes.html
2026-11-11 17:39:07 -06:00
Iñaki Villar 5ca09edddf Bump Gradle Wrapper from 9.8.2 to 9.9.1 in /.github/workflow-samples/kotlin-dsl (#1124)
Bump Gradle Wrapper from 9.8.2 to 9.9.1.

Release notes of Gradle 9.9.1 can be found here:
https://docs.gradle.org/9.9.1/release-notes.html
2026-11-11 17:26:08 -06:00
Iñaki Villar a4182520b3 Bump Gradle Wrapper from 9.9.0 to 9.9.1 in /.github/workflow-samples/gradle-plugin (#1121)
Bump Gradle Wrapper from 9.9.0 to 9.9.1.

Release notes of Gradle 9.9.1 can be found here:
https://docs.gradle.org/9.9.1/release-notes.html
2026-11-11 16:50:19 -06:00
Iñaki Villar bfcb30cf34 Bump Gradle Wrapper from 9.9.0 to 9.9.1 in /sources/test/init-scripts (#1120)
Bump Gradle Wrapper from 9.9.0 to 9.9.1.

Release notes of Gradle 9.9.1 can be found here:
https://docs.gradle.org/9.9.1/release-notes.html
2026-11-11 12:42:02 -06:00
bot-githubaction 031d955e6d Bump Gradle Wrapper from 9.8.2 to 9.9.1.
Release notes of Gradle 9.9.1 can be found here:
https://docs.gradle.org/9.9.1/release-notes.html

Signed-off-by: bot-githubaction <[email protected]>
2026-11-11 02:14:00 +00:00
bot-githubaction ee2f5df6fa Bump Gradle Wrapper from 9.9.0 to 9.9.1.
Release notes of Gradle 9.9.1 can be found here:
https://docs.gradle.org/9.9.1/release-notes.html

Signed-off-by: bot-githubaction <[email protected]>
2026-11-11 02:13:09 +00:00
bot-githubaction 15e4fe97d0 Bump Gradle Wrapper from 9.9.0 to 9.9.1.
Release notes of Gradle 9.9.1 can be found here:
https://docs.gradle.org/9.9.1/release-notes.html

Signed-off-by: bot-githubaction <[email protected]>
2026-11-11 02:12:18 +00:00
bot-githubaction c2db668634 Bump Gradle Wrapper from 9.9.0 to 9.9.1.
Release notes of Gradle 9.9.1 can be found here:
https://docs.gradle.org/9.9.1/release-notes.html

Signed-off-by: bot-githubaction <[email protected]>
2026-11-11 02:11:36 +00:00
Iñaki Villar 96e7f85c08 Inline the OIDC token step and keep the existing assertions
Use the same pre-step as #1109 instead of a composite action, drop the
extra exchange check and the fake access key.
2026-11-05 11:28:41 -06:00
Iñaki Villar f6e4f55eae Test Develocity injection with workload identity instead of an access key
The Develocity injection integration tests no longer use the long-lived
DV_SOLUTIONS_ACCESS_KEY. The jobs that publish Build Scans pass a GitHub
OIDC token as the access key, which setup-gradle exchanges for a
short-lived token like any access key. The short-lived token failure job
uses a fake access key.
2026-11-05 11:21:00 -06:00
23 changed files with 261 additions and 54 deletions

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@ name: 'Build and upload distribution'
runs:
using: "composite"
steps:
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
cache: npm
@@ -23,7 +23,7 @@ runs:
cp -r sources/dist .
- name: Upload distribution
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: dist
path: dist/
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=0b00b0ffe07c4d4789c12d4935a44a7057d55774b7540bd4a3f76f336deb177a
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.0-bin.zip
distributionSha256Sum=d8a18a7a841dd5df825d35a685fad6f2d7f12ac0c280e57b67c27b4a520ba228
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=0b00b0ffe07c4d4789c12d4935a44a7057d55774b7540bd4a3f76f336deb177a
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.0-bin.zip
distributionSha256Sum=d8a18a7a841dd5df825d35a685fad6f2d7f12ac0c280e57b67c27b4a520ba228
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=21bd5da2de49b642904077f38c0efdc7778e92b3ed0889392dca61b97e389607
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip
distributionSha256Sum=d8a18a7a841dd5df825d35a685fad6f2d7f12ac0c280e57b67c27b4a520ba228
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
+2 -2
View File
@@ -22,14 +22,14 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
cache: npm
cache-dependency-path: sources/package-lock.json
- name: Setup Gradle
# Use a released version to avoid breakages
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
env:
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
with:
+2 -2
View File
@@ -35,7 +35,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v3.29.5
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v3.29.5
with:
languages: ${{ matrix.language }}
config: |
@@ -43,4 +43,4 @@ jobs:
- sources/src
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v3.29.5
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v3.29.5
+2 -2
View File
@@ -36,14 +36,14 @@ jobs:
sources/test/init-scripts/**
- name: Setup Java
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
# Use a released version to avoid breakages
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
env:
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
- name: Run integration tests
+1
View File
@@ -37,6 +37,7 @@ jobs:
permissions:
contents: write
actions: read
id-token: write
needs: caching-integ-tests
uses: ./.github/workflows/suite-integ-test-other.yml
concurrency:
+1
View File
@@ -48,6 +48,7 @@ jobs:
permissions:
contents: write
actions: read
id-token: write
needs: caching-integ-tests
uses: ./.github/workflows/suite-integ-test-other.yml
concurrency:
+2 -2
View File
@@ -27,7 +27,7 @@ jobs:
show-progress: false
- name: 'Run analysis'
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
@@ -44,7 +44,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: 'Upload artifact'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: SARIF file
path: results.sarif
+2 -2
View File
@@ -29,7 +29,7 @@ jobs:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
cache: npm
@@ -92,7 +92,7 @@ jobs:
# Important: The push event will not trigger any other workflows, see
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs
- name: Commit & push changes
uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
uses: stefanzweifel/git-auto-commit-action@d0b01107b5db882071f96de5dd4b54961ea93f4c # v7.2.1
with:
commit_author: bot-githubaction <[email protected]>
commit_user_name: bot-githubaction
+1 -1
View File
@@ -12,6 +12,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
- uses: gradle/actions/wrapper-validation@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
with:
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
+1 -1
View File
@@ -118,7 +118,7 @@ jobs:
# Gradle 9 and later require Java 17
- name: Setup Java 17
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: 17
@@ -178,7 +178,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: Download dependency-graph artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: downloaded-dependency-graphs
pattern: dependency-graph_*dependency-graph-generate-submit-and-upload.json
@@ -46,7 +46,6 @@ jobs:
shell: bash
working-directory: .github/workflow-samples/groovy-dsl
run: |
grep -q 'Eclipse Temurin JDK 8' output.txt || (echo "::error::Did not detect preinstalled JDK 8" && exit 1)
grep -q 'Eclipse Temurin JDK 11' output.txt || (echo "::error::Did not detect preinstalled JDK 11" && exit 1)
grep -q 'Eclipse Temurin JDK 17' output.txt || (echo "::error::Did not detect preinstalled JDK 17" && exit 1)
grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
@@ -65,14 +64,14 @@ jobs:
uses: ./.github/actions/init-integ-test
- name: Setup Java 16
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: 'temurin'
java-version: 16
# Temurin 16 is EOL and publishes no signatures: setup-java v6 enables verify-signature by default
verify-signature: false
- name: Setup Java 20
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: 'temurin'
java-version: 20
@@ -96,7 +95,6 @@ jobs:
shell: bash
working-directory: .github/workflow-samples/groovy-dsl
run: |
grep -q 'Eclipse Temurin JDK 8' output.txt || (echo "::error::Did not detect preinstalled JDK 8" && exit 1)
grep -q 'Eclipse Temurin JDK 11' output.txt || (echo "::error::Did not detect preinstalled JDK 11" && exit 1)
grep -q 'Eclipse Temurin JDK 17' output.txt || (echo "::error::Did not detect preinstalled JDK 17" && exit 1)
grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
@@ -12,9 +12,6 @@ on:
skip-dist:
type: boolean
default: false
secrets:
DEVELOCITY_ACCESS_KEY:
required: true
env:
SKIP_DIST: ${{ inputs.skip-dist }}
@@ -46,12 +43,14 @@ jobs:
- plugin-version: '4.6.1'
accessKeyEnv: DEVELOCITY_ACCESS_KEY
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write
env:
DEVELOCITY_INJECTION_ENABLED: true
DEVELOCITY_INJECTION_URL: https://solutions.develocity.cloud
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1'
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
steps:
- name: Checkout sources
@@ -60,6 +59,19 @@ jobs:
uses: ./.github/actions/init-integ-test
with:
java-version: ${{ matrix.java-version }}
- name: Get GitHub OIDC token for Develocity
id: develocity-oidc
shell: bash
run: |
if [ -z "$ACTIONS_ID_TOKEN_REQUEST_URL" ]; then
echo "::warning::No GitHub OIDC token available (e.g. PR from a fork), Develocity will not be authenticated"
exit 0
fi
token=$(curl -sSfG -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
--data-urlencode "audience=https://solutions.develocity.cloud" \
"$ACTIONS_ID_TOKEN_REQUEST_URL" | jq -r .value)
echo "::add-mask::$token"
echo "${{ matrix.accessKeyEnv }}=solutions.develocity.cloud=$token" >> "$GITHUB_ENV"
- name: Setup Gradle
id: setup-gradle
uses: ./setup-gradle
@@ -104,6 +116,9 @@ jobs:
- gradle: '5.6.4'
java-version: 11
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write
steps:
- name: Checkout sources
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -111,13 +126,26 @@ jobs:
uses: ./.github/actions/init-integ-test
with:
java-version: ${{ matrix.java-version }}
- name: Get GitHub OIDC token for Develocity
id: develocity-oidc
shell: bash
run: |
if [ -z "$ACTIONS_ID_TOKEN_REQUEST_URL" ]; then
echo "::warning::No GitHub OIDC token available (e.g. PR from a fork), Develocity will not be authenticated"
exit 0
fi
token=$(curl -sSfG -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
--data-urlencode "audience=https://solutions.develocity.cloud" \
"$ACTIONS_ID_TOKEN_REQUEST_URL" | jq -r .value)
echo "::add-mask::$token"
echo "access-key=solutions.develocity.cloud=$token" >> "$GITHUB_OUTPUT"
- name: Setup Gradle
id: setup-gradle
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
gradle-version: ${{ matrix.gradle }}
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
develocity-access-key: ${{ steps.develocity-oidc.outputs.access-key }}
develocity-token-expiry: 1
- name: Run Gradle build
id: gradle
@@ -140,9 +168,6 @@ jobs:
DEVELOCITY_INJECTION_URL: 'https://localhost:3333/'
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.1'
# Access key also set as an env var, we want to check it does not leak
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
strategy:
fail-fast: false
matrix:
@@ -160,6 +185,9 @@ jobs:
- gradle: '5.6.4'
java-version: 11
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout sources
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -167,13 +195,29 @@ jobs:
uses: ./.github/actions/init-integ-test
with:
java-version: ${{ matrix.java-version }}
# Access key also set as an env var, we want to check it does not leak
- name: Get GitHub OIDC token for Develocity
id: develocity-oidc
shell: bash
run: |
if [ -z "$ACTIONS_ID_TOKEN_REQUEST_URL" ]; then
echo "::warning::No GitHub OIDC token available (e.g. PR from a fork), Develocity will not be authenticated"
exit 0
fi
token=$(curl -sSfG -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
--data-urlencode "audience=https://solutions.develocity.cloud" \
"$ACTIONS_ID_TOKEN_REQUEST_URL" | jq -r .value)
echo "::add-mask::$token"
echo "access-key=solutions.develocity.cloud=$token" >> "$GITHUB_OUTPUT"
echo "GRADLE_ENTERPRISE_ACCESS_KEY=solutions.develocity.cloud=$token" >> "$GITHUB_ENV"
echo "DEVELOCITY_ACCESS_KEY=solutions.develocity.cloud=$token" >> "$GITHUB_ENV"
- name: Setup Gradle
id: setup-gradle
uses: ./setup-gradle
with:
gradle-version: ${{ matrix.gradle }}
cache-read-only: false # For testing, allow writing cache entries on non-default branches
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
develocity-access-key: ${{ steps.develocity-oidc.outputs.access-key }}
- name: Run Gradle build
id: gradle
working-directory: .github/workflow-samples/no-ge
@@ -184,8 +228,9 @@ jobs:
run: "[ \"${GRADLE_ENTERPRISE_ACCESS_KEY}\" != \"\" ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY is still supported in v3!'; exit 1)"
inject-develocity-with-access-key-from-input-actions:
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
@@ -210,6 +255,19 @@ jobs:
uses: ./.github/actions/init-integ-test
with:
java-version: ${{ matrix.java-version }}
- name: Get GitHub OIDC token for Develocity
id: develocity-oidc
shell: bash
run: |
if [ -z "$ACTIONS_ID_TOKEN_REQUEST_URL" ]; then
echo "::warning::No GitHub OIDC token available (e.g. PR from a fork), Develocity will not be authenticated"
exit 0
fi
token=$(curl -sSfG -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
--data-urlencode "audience=https://solutions.develocity.cloud" \
"$ACTIONS_ID_TOKEN_REQUEST_URL" | jq -r .value)
echo "::add-mask::$token"
echo "DEVELOCITY_ACCESS_KEY=solutions.develocity.cloud=$token" >> "$GITHUB_ENV"
- name: Setup Gradle
id: setup-gradle
uses: ./setup-gradle
@@ -56,7 +56,7 @@ jobs:
run: gradle help "-DgradleVersionCheck=7.1.1"
# Configure JDK 17 for Gradle 9 and later
- name: Setup Java
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: 17
@@ -110,7 +110,7 @@ jobs:
uses: ./.github/actions/init-integ-test
- name: Setup Java
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
+3 -2
View File
@@ -22,11 +22,12 @@ jobs:
develocity-injection:
if: ${{ ! github.event.pull_request.head.repo.fork }}
permissions:
contents: read
id-token: write
uses: ./.github/workflows/integ-test-inject-develocity.yml
with:
skip-dist: ${{ inputs.skip-dist }}
secrets:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
gradle-support-status:
permissions:
+2 -2
View File
@@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
cache: npm
@@ -48,7 +48,7 @@ jobs:
# If there are no changes, this action will not create a pull request
- name: Create or update pull request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3
with:
branch: bot/wrapper-checksums-update
author: bot-githubaction <[email protected]>
@@ -1,6 +1,6 @@
/*
* Initscript for injection of Develocity into Gradle builds.
* Version: 2.0.1
* Version: 2.1
*/
import org.gradle.util.GradleVersion
@@ -94,6 +94,11 @@ static getInputParam(Gradle gradle, String name) {
return System.getProperty(name) ?: gradle.startParameter.systemPropertiesArgs[name] ?: System.getenv(envVarName)
}
static Boolean getBooleanInputParam(Gradle gradle, String name, Boolean defaultValue = null) {
def value = getInputParam(gradle, name)
return value ? Boolean.parseBoolean(value) : defaultValue
}
def isTopLevelBuild = !gradle.parent
if (!isTopLevelBuild) {
return
@@ -102,7 +107,7 @@ if (!isTopLevelBuild) {
def requestedInitScriptName = getInputParam(gradle, 'develocity-injection.init-script-name')
def initScriptName = buildscript.sourceFile.name
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam(gradle, "develocity-injection.enabled"))
def develocityInjectionEnabled = getBooleanInputParam(gradle, "develocity-injection.enabled", false)
if (develocityInjectionEnabled) {
if (requestedInitScriptName != initScriptName) {
logger.log(LogLevel.WARN, "Develocity injection not enabled because requested init script name was '${requestedInitScriptName}', but '${initScriptName}' was expected")
@@ -136,16 +141,26 @@ void enableDevelocityInjection() {
def CCUD_PLUGIN_CLASS = 'com.gradle.CommonCustomUserDataGradlePlugin'
def develocityUrl = getInputParam(gradle, 'develocity-injection.url')
def develocityAllowUntrustedServer = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.allow-untrusted-server'))
def develocityEnforceUrl = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.enforce-url'))
def buildScanUploadInBackground = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.upload-in-background'))
def develocityCaptureFileFingerprints = getInputParam(gradle, 'develocity-injection.capture-file-fingerprints') ? Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.capture-file-fingerprints')) : true
def develocityAllowUntrustedServer = getBooleanInputParam(gradle, 'develocity-injection.allow-untrusted-server', false)
def develocityEnforceUrl = getBooleanInputParam(gradle, 'develocity-injection.enforce-url', false)
def buildScanUploadInBackground = getBooleanInputParam(gradle, 'develocity-injection.upload-in-background', false)
def develocityCaptureFileFingerprints = getBooleanInputParam(gradle, 'develocity-injection.capture-file-fingerprints', true)
def develocityPluginVersion = getInputParam(gradle, 'develocity-injection.develocity-plugin.version')
def ccudPluginVersion = getInputParam(gradle, 'develocity-injection.ccud-plugin.version')
def buildScanTermsOfUseUrl = getInputParam(gradle, 'develocity-injection.terms-of-use.url')
def buildScanTermsOfUseAgree = getInputParam(gradle, 'develocity-injection.terms-of-use.agree')
def ciAutoInjectionCustomValueValue = getInputParam(gradle, 'develocity-injection.custom-value')
def logLevel = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.debug')) ? LogLevel.LIFECYCLE : LogLevel.INFO
def logLevel = getBooleanInputParam(gradle, 'develocity-injection.debug', false) ? LogLevel.LIFECYCLE : LogLevel.INFO
def enforceBuildCache = getBooleanInputParam(gradle, 'develocity-injection.enforce-build-cache', false)
def remoteBuildCacheEnabled = getBooleanInputParam(gradle, 'develocity-injection.remote-build-cache.enabled')
def remoteBuildCachePush = getBooleanInputParam(gradle, 'develocity-injection.remote-build-cache.push')
def remoteBuildCacheServer = getInputParam(gradle, 'develocity-injection.remote-build-cache.server')
def remoteBuildCachePath = getInputParam(gradle, 'develocity-injection.remote-build-cache.path')
def remoteBuildCacheAllowInsecureProtocol = getBooleanInputParam(gradle, 'develocity-injection.remote-build-cache.allow-insecure-protocol')
def remoteBuildCacheAllowUntrustedServer = getBooleanInputParam(gradle, 'develocity-injection.remote-build-cache.allow-untrusted-server')
def localBuildCacheEnabled = getBooleanInputParam(gradle, 'develocity-injection.local-build-cache.enabled')
def localBuildCachePush = getBooleanInputParam(gradle, 'develocity-injection.local-build-cache.push')
def atLeastGradle5 = GradleVersion.current() >= GradleVersion.version('5.0')
def atLeastGradle4 = GradleVersion.current() >= GradleVersion.version('4.0')
@@ -158,6 +173,10 @@ void enableDevelocityInjection() {
return geValue instanceof Closure<?> ? geValue() : geValue
}
def isDevelocityPluginMissing = { Settings settings ->
!settings.pluginManager.hasPlugin(GRADLE_ENTERPRISE_PLUGIN_ID) && !settings.pluginManager.hasPlugin(DEVELOCITY_PLUGIN_ID)
}
def printEnforcingDevelocityUrl = {
logger.log(logLevel, "Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer")
}
@@ -166,6 +185,92 @@ void enableDevelocityInjection() {
logger.log(logLevel, "Accepting Gradle Terms of Use: $buildScanTermsOfUseUrl")
}
def printBuildCacheSkipReason = { String reason, boolean isMisconfiguration = false ->
def level = isMisconfiguration ? LogLevel.WARN : logLevel
if (remoteBuildCacheEnabled != null) {
logger.log(level, "Remote build cache not configured because $reason")
if (localBuildCacheEnabled != null) {
logger.log(level, "Local build cache not configured to avoid leaving the build cache partially configured")
}
} else if (localBuildCacheEnabled != null) {
logger.log(level, "Local build cache not configured because $reason")
}
}
def configureLocalBuildCache = { Settings settings ->
settings.buildCache.local { local ->
local.enabled = localBuildCacheEnabled
if (localBuildCachePush != null) {
local.push = localBuildCachePush
}
logger.log(logLevel, "Configuring the local build cache: enabled: ${local.enabled}, push: ${local.push}")
}
}
def configureRemoteBuildCache = { Settings settings, Class connectorType ->
settings.buildCache.remote(connectorType) { remote ->
remote.enabled = remoteBuildCacheEnabled
if (remoteBuildCachePush != null) {
remote.push = remoteBuildCachePush
}
if (remoteBuildCacheServer) {
remote.server = remoteBuildCacheServer
}
if (remoteBuildCachePath) {
remote.path = remoteBuildCachePath
}
if (remoteBuildCacheAllowInsecureProtocol != null) {
remote.allowInsecureProtocol = remoteBuildCacheAllowInsecureProtocol
}
if (remoteBuildCacheAllowUntrustedServer != null) {
remote.allowUntrustedServer = remoteBuildCacheAllowUntrustedServer
}
logger.log(logLevel, "Configuring the remote build cache: ${remote.server ?: 'Develocity server'}, path: ${remote.path ?: '<default>'}, enabled: ${remote.enabled}, push: ${remote.push}, allowInsecureProtocol: ${remote.allowInsecureProtocol}, allowUntrustedServer: ${remote.allowUntrustedServer == null ? '<default>' : remote.allowUntrustedServer}")
}
}
def configureBuildCache = { Settings settings ->
// The configuration cache was first introduced in Gradle 6.6, and before 7.5.1 a build fails when it reuses an entry that uses the Develocity Build Cache connector
if (GradleVersion.current() >= GradleVersion.version('6.6') && GradleVersion.current() < GradleVersion.version('7.5.1') && gradle.startParameter.isConfigurationCache()) {
printBuildCacheSkipReason("build cache configuration via injection requires Gradle 7.5.1 or later when using the configuration cache")
return
}
if (isDevelocityPluginMissing(settings)) {
printBuildCacheSkipReason("the Develocity Gradle plugin is not applied")
return
}
def develocityExtension = getDevelocitySettingsExtension(settings)
if (!develocityExtension.metaClass.respondsTo(develocityExtension, 'getBuildCache')) {
printBuildCacheSkipReason("this version of the Develocity Gradle plugin does not support the Develocity Build Cache connector", develocityPluginVersion && isNotAtLeast(develocityPluginVersion, '3.11'))
return
}
def existingRemoteBuildCache = settings.buildCache.remote
if (existingRemoteBuildCache != null && !enforceBuildCache) {
printBuildCacheSkipReason("a remote build cache is already configured")
return
}
if (remoteBuildCacheEnabled && !remoteBuildCacheServer && !hasDevelocityServer(develocityExtension)) {
printBuildCacheSkipReason("no Develocity server is configured")
return
}
if (remoteBuildCacheEnabled != null) {
Class develocityBuildCacheConnector = develocityExtension.buildCache
if (existingRemoteBuildCache in develocityBuildCacheConnector) {
resetRemoteBuildCache(settings)
} else if (existingRemoteBuildCache != null) {
logger.log(logLevel, "Replacing the existing remote build cache with the Develocity Build Cache connector")
}
configureRemoteBuildCache(settings, develocityBuildCacheConnector)
}
if (localBuildCacheEnabled != null) {
configureLocalBuildCache(settings)
}
}
// finish early if DV plugin version is unsupported (v3.6.4 is the minimum version tested and supports back to DV 2021.1)
if (develocityPluginVersion && isNotAtLeast(develocityPluginVersion, '3.6.4')) {
logger.log(LogLevel.WARN, "Develocity Gradle plugin must be at least 3.6.4. Configured version is $develocityPluginVersion.")
@@ -281,10 +386,15 @@ void enableDevelocityInjection() {
}
}
}
if (remoteBuildCacheEnabled != null || localBuildCacheEnabled != null) {
// The Develocity Build Cache connector is only available when the Develocity Gradle plugin is applied to settings.
printBuildCacheSkipReason("build cache configuration via injection requires Gradle 6.0 or later")
}
} else {
gradle.settingsEvaluated { settings ->
if (develocityPluginVersion) {
if (!settings.pluginManager.hasPlugin(GRADLE_ENTERPRISE_PLUGIN_ID) && !settings.pluginManager.hasPlugin(DEVELOCITY_PLUGIN_ID)) {
if (isDevelocityPluginMissing(settings)) {
def pluginClass = dvOrGe(DEVELOCITY_PLUGIN_CLASS, GRADLE_ENTERPRISE_PLUGIN_CLASS)
applyPluginExternally(settings.pluginManager, pluginClass, develocityPluginVersion)
if (develocityUrl) {
@@ -375,12 +485,16 @@ void enableDevelocityInjection() {
settings.pluginManager.apply(initscript.classLoader.loadClass(CCUD_PLUGIN_CLASS))
}
}
if (remoteBuildCacheEnabled != null || localBuildCacheEnabled != null) {
configureBuildCache(settings)
}
}
}
}
void applyPluginExternally(def pluginManager, String pluginClassName, String pluginVersion) {
def logLevel = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.debug')) ? LogLevel.LIFECYCLE : LogLevel.INFO
def logLevel = getBooleanInputParam(gradle, 'develocity-injection.debug', false) ? LogLevel.LIFECYCLE : LogLevel.INFO
logger.log(logLevel, "Applying $pluginClassName with version $pluginVersion via init script")
def externallyApplied = 'develocity.externally-applied'
@@ -427,10 +541,25 @@ static def eachDevelocitySettingsExtension(def settings, def dvAction, def geAct
}
}
/**
* Return the 'develocity' extension.
* If no 'develocity' extension is found, returns the 'gradleEnterprise' extension.
* In some versions, the Develocity Gradle plugin creates both extensions, and we want to prefer 'develocity'.
*/
static def getDevelocitySettingsExtension(def settings) {
def GRADLE_ENTERPRISE_EXTENSION_CLASS = 'com.gradle.enterprise.gradleplugin.GradleEnterpriseExtension'
def DEVELOCITY_CONFIGURATION_CLASS = 'com.gradle.develocity.agent.gradle.DevelocityConfiguration'
def elements = settings.extensions.extensionsSchema.elements
def element = elements.find { it.publicType.concreteClass.name == DEVELOCITY_CONFIGURATION_CLASS } ?:
elements.find { it.publicType.concreteClass.name == GRADLE_ENTERPRISE_EXTENSION_CLASS }
return element ? settings[element.name] : null
}
/**
* Apply the `dvAction` to the 'develocity' extension.
* If no 'develocity' extension is found, apply the `bsAction` to the 'buildScan' extension.
* (The develocity plugin creates both extensions, and we want to prefer configuring 'develocity').
* In some versions, the Develocity Gradle plugin creates both extensions, and we want to prefer 'develocity'.
*/
static def eachDevelocityProjectExtension(def project, def dvAction, def bsAction = dvAction) {
def BUILD_SCAN_PLUGIN_ID = 'com.gradle.build-scan'
@@ -453,6 +582,24 @@ static def eachDevelocityProjectExtension(def project, def dvAction, def bsActio
}
}
/**
* The type for 'server' is Property in the 'develocity' extension, and String in the 'gradleEnterprise' extension.
*/
static boolean hasDevelocityServer(def develocityExtension) {
def server = develocityExtension.server
// The Provider type cannot be referenced here because the script must still compile on Gradle 3.x
return server && (!server.metaClass.respondsTo(server, 'isPresent') || server.isPresent())
}
/**
* Gradle has no API to reset a remote build cache or to replace it with a new one of the same type.
* A workaround for this is to temporarily switch to a remote build cache of a different type.
* Switching to an HttpBuildCache first makes the next Develocity Build Cache connector start from default values.
*/
static void resetRemoteBuildCache(Settings settings) {
settings.buildCache.remote(HttpBuildCache) {}
}
static boolean isAtLeast(String versionUnderTest, String referenceVersion) {
GradleVersion.version(versionUnderTest) >= GradleVersion.version(referenceVersion)
}
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=0b00b0ffe07c4d4789c12d4935a44a7057d55774b7540bd4a3f76f336deb177a
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.0-bin.zip
distributionSha256Sum=d8a18a7a841dd5df825d35a685fad6f2d7f12ac0c280e57b67c27b4a520ba228
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
@@ -1,6 +1,7 @@
plugins {
id "com.gradle.develocity" version "4.6.1"
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
id "org.gradle.toolchains.foojay-resolver-convention" version "1.0.0"
}
develocity {