mirror of
https://github.com/gradle/actions.git
synced 2026-06-06 18:29:39 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 476a51fac4 | |||
| 11d4d83c63 |
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "4.4.0"
|
id "com.gradle.develocity" version "4.4.2"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.gradle.develocity") version "4.4.0"
|
id("com.gradle.develocity") version "4.4.2"
|
||||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.4.0"
|
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.4.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "4.4.0"
|
id "com.gradle.develocity" version "4.4.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "4.4.0"
|
id "com.gradle.develocity" version "4.4.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "4.4.0"
|
id "com.gradle.develocity" version "4.4.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
develocity {
|
develocity {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: ['3.16.2', '4.4.0']
|
plugin-version: ['3.16.2', '4.4.2']
|
||||||
include:
|
include:
|
||||||
- java-version: 17
|
- java-version: 17
|
||||||
- gradle: '8.14.3'
|
- gradle: '8.14.3'
|
||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
java-version: 11
|
java-version: 11
|
||||||
- plugin-version: '3.16.2'
|
- plugin-version: '3.16.2'
|
||||||
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
||||||
- plugin-version: '4.4.0'
|
- plugin-version: '4.4.2'
|
||||||
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
@@ -92,7 +92,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: ['3.16.2', '4.4.0']
|
plugin-version: ['3.16.2', '4.4.2']
|
||||||
include:
|
include:
|
||||||
- java-version: 17
|
- java-version: 17
|
||||||
- gradle: '8.14.3'
|
- gradle: '8.14.3'
|
||||||
@@ -148,7 +148,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [ '3.16.2', '4.4.0' ]
|
plugin-version: [ '3.16.2', '4.4.2' ]
|
||||||
include:
|
include:
|
||||||
- java-version: 17
|
- java-version: 17
|
||||||
- gradle: '8.14.3'
|
- gradle: '8.14.3'
|
||||||
@@ -191,7 +191,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [ '3.16.2', '4.4.0' ]
|
plugin-version: [ '3.16.2', '4.4.2' ]
|
||||||
include:
|
include:
|
||||||
- java-version: 17
|
- java-version: 17
|
||||||
- gradle: '8.14.3'
|
- gradle: '8.14.3'
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
|
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
|
||||||
@@ -106,7 +106,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: gradle/actions/wrapper-validation@v5
|
- uses: gradle/actions/wrapper-validation@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.
|
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios.
|
See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios.
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ If you're confused by the behaviour you're seeing or have specific questions, pl
|
|||||||
> **Prefer a 100% Open Source (MIT) path?**
|
> **Prefer a 100% Open Source (MIT) path?**
|
||||||
> We also provide a **Basic Caching** provider as a thin wrapper over `actions/cache`. This provider is **free for all repositories** (public and private) and can be enabled at any time by setting `cache-provider: basic`.
|
> We also provide a **Basic Caching** provider as a thin wrapper over `actions/cache`. This provider is **free for all repositories** (public and private) and can be enabled at any time by setting `cache-provider: basic`.
|
||||||
>
|
>
|
||||||
> For a full breakdown of the components, usage tiers, and our **Safe Harbor** data privacy commitment, see our [Distribution & Licensing Guide](./DISTRIBUTION.md).
|
> For a full breakdown of the components, usage tiers, and our **Safe Harbor** data privacy commitment, see our [Distribution & Licensing Guide](../DISTRIBUTION.md).
|
||||||
|
|
||||||
## General usage
|
## General usage
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
### Gradle execution
|
### Gradle execution
|
||||||
@@ -88,7 +88,7 @@ Three input parameters are required, one to enable publishing and two more to ac
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
with:
|
with:
|
||||||
build-scan-publish: true
|
build-scan-publish: true
|
||||||
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
|
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
|
||||||
@@ -103,7 +103,7 @@ In some cases, the default action configuration will not be sufficient, and addi
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Generate and save dependency graph
|
- name: Generate and save dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
with:
|
with:
|
||||||
# Use a particular Gradle version instead of the configured wrapper.
|
# Use a particular Gradle version instead of the configured wrapper.
|
||||||
gradle-version: '8.6'
|
gradle-version: '8.6'
|
||||||
@@ -150,7 +150,7 @@ To reduce storage costs for these artifacts, you can:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Generate dependency graph but only store workflow artifacts for 1 day
|
- name: Generate dependency graph but only store workflow artifacts for 1 day
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
with:
|
with:
|
||||||
artifact-retention-days: 1 # Default is 30 days or as configured for repository
|
artifact-retention-days: 1 # Default is 30 days or as configured for repository
|
||||||
```
|
```
|
||||||
@@ -159,7 +159,7 @@ To reduce storage costs for these artifacts, you can:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Generate and submit dependency graph but do not store as workflow artifact
|
- name: Generate and submit dependency graph but do not store as workflow artifact
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
with:
|
with:
|
||||||
dependency-graph: 'generate-and-submit' # Default value is 'generate-submit-and-upload'
|
dependency-graph: 'generate-and-submit' # Default value is 'generate-submit-and-upload'
|
||||||
```
|
```
|
||||||
@@ -319,7 +319,7 @@ For example, if you want to exclude dependencies resolved by the `buildSrc` proj
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
with:
|
with:
|
||||||
# Exclude all dependencies that originate solely in the 'buildSrc' project
|
# Exclude all dependencies that originate solely in the 'buildSrc' project
|
||||||
dependency-graph-exclude-projects: ':buildSrc'
|
dependency-graph-exclude-projects: ':buildSrc'
|
||||||
@@ -370,7 +370,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2. Add a dedicated Dependency Review workflow
|
#### 2. Add a dedicated Dependency Review workflow
|
||||||
@@ -432,7 +432,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Generate and save dependency graph
|
- name: Generate and save dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-upload
|
dependency-graph: generate-and-upload
|
||||||
```
|
```
|
||||||
@@ -455,7 +455,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download and submit dependency graph
|
- name: Download and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v5
|
uses: gradle/actions/dependency-submission@v6
|
||||||
with:
|
with:
|
||||||
dependency-graph: download-and-submit # Download saved dependency-graph and submit
|
dependency-graph: download-and-submit # Download saved dependency-graph and submit
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ To convert your workflows, simply replace:
|
|||||||
```
|
```
|
||||||
with
|
with
|
||||||
```
|
```
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`
|
## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`
|
||||||
@@ -40,7 +40,7 @@ To convert your workflows, simply replace:
|
|||||||
```
|
```
|
||||||
with
|
with
|
||||||
```
|
```
|
||||||
uses: gradle/actions/wrapper-validation@v5
|
uses: gradle/actions/wrapper-validation@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using the action to execute Gradle via the `arguments` parameter is deprecated
|
## Using the action to execute Gradle via the `arguments` parameter is deprecated
|
||||||
@@ -82,7 +82,7 @@ The exact syntax depends on whether or not your project is configured with the [
|
|||||||
|
|
||||||
```
|
```
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
|
|
||||||
- name: Assemble the project
|
- name: Assemble the project
|
||||||
run: ./gradlew assemble
|
run: ./gradlew assemble
|
||||||
@@ -99,7 +99,7 @@ The exact syntax depends on whether or not your project is configured with the [
|
|||||||
|
|
||||||
```
|
```
|
||||||
- name: Setup Gradle for a non-wrapper project
|
- name: Setup Gradle for a non-wrapper project
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
gradle-version: '8.11'
|
gradle-version: '8.11'
|
||||||
|
|
||||||
|
|||||||
+25
-22
@@ -9,7 +9,7 @@ This GitHub Action can be used to configure Gradle for optimal execution on any
|
|||||||
> **Prefer a 100% Open Source (MIT) path?**
|
> **Prefer a 100% Open Source (MIT) path?**
|
||||||
> We also provide a **Basic Caching** provider as a thin wrapper over `actions/cache`. This provider is **free for all repositories** (public and private) and can be enabled at any time by setting `cache-provider: basic`.
|
> We also provide a **Basic Caching** provider as a thin wrapper over `actions/cache`. This provider is **free for all repositories** (public and private) and can be enabled at any time by setting `cache-provider: basic`.
|
||||||
>
|
>
|
||||||
> For a full breakdown of the components, usage tiers, and our **Safe Harbor** data privacy commitment, see our [Distribution & Licensing Guide](./DISTRIBUTION.md).
|
> For a full breakdown of the components, usage tiers, and our **Safe Harbor** data privacy commitment, see our [Distribution & Licensing Guide](../DISTRIBUTION.md).
|
||||||
|
|
||||||
## Why use the `setup-gradle` action?
|
## Why use the `setup-gradle` action?
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
|
|
||||||
- name: Execute Gradle build
|
- name: Execute Gradle build
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
@@ -68,7 +68,7 @@ Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid havi
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle 8.10
|
- name: Setup Gradle 8.10
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
gradle-version: '8.10' # Quotes required to prevent YAML converting to number
|
gradle-version: '8.10' # Quotes required to prevent YAML converting to number
|
||||||
- name: Build with Gradle 8.10
|
- name: Build with Gradle 8.10
|
||||||
@@ -106,7 +106,7 @@ jobs:
|
|||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- uses: gradle/actions/setup-gradle@v5
|
- uses: gradle/actions/setup-gradle@v6
|
||||||
id: setup-gradle
|
id: setup-gradle
|
||||||
with:
|
with:
|
||||||
gradle-version: release-candidate
|
gradle-version: release-candidate
|
||||||
@@ -135,8 +135,11 @@ You choose which provider to use via the `cache-provider` input:
|
|||||||
- **`basic`**: A fully open-source (MIT) caching implementation built on the standard GitHub Actions cache (`@actions/cache`). Uses the same caching strategy as `actions/setup-java` with `cache: gradle`. See [Basic Caching](#basic-caching) for details.
|
- **`basic`**: A fully open-source (MIT) caching implementation built on the standard GitHub Actions cache (`@actions/cache`). Uses the same caching strategy as `actions/setup-java` with `cache: gradle`. See [Basic Caching](#basic-caching) for details.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Use the open-source basic cache provider
|
# Use the open-source basic cache provider
|
||||||
cache-provider: basic
|
- uses: gradle/actions/setup-gradle@v6
|
||||||
|
id: setup-gradle
|
||||||
|
with:
|
||||||
|
cache-provider: basic
|
||||||
```
|
```
|
||||||
|
|
||||||
### Common cache configuration
|
### Common cache configuration
|
||||||
@@ -538,7 +541,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
add-job-summary-as-pr-comment: 'on-failure' # Valid values are 'never' (default), 'always', and 'on-failure'
|
add-job-summary-as-pr-comment: 'on-failure' # Valid values are 'never' (default), 'always', and 'on-failure'
|
||||||
|
|
||||||
@@ -575,7 +578,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
|
|
||||||
- name: Run build with Gradle wrapper
|
- name: Run build with Gradle wrapper
|
||||||
run: ./gradlew build --scan
|
run: ./gradlew build --scan
|
||||||
@@ -606,7 +609,7 @@ If you do not want wrapper-validation to occur automatically, you can disable it
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
validate-wrappers: false
|
validate-wrappers: false
|
||||||
```
|
```
|
||||||
@@ -618,7 +621,7 @@ These are not allowed by default.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
validate-wrappers: true
|
validate-wrappers: true
|
||||||
allow-snapshot-wrappers: true
|
allow-snapshot-wrappers: true
|
||||||
@@ -683,7 +686,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle to generate and submit dependency graphs
|
- name: Setup Gradle to generate and submit dependency graphs
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-submit
|
dependency-graph: generate-and-submit
|
||||||
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
|
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
|
||||||
@@ -710,7 +713,7 @@ graph cannot be generated or submitted. You can enable this behavior with the `d
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Ensure that the workflow Job will fail if the dependency graph cannot be submitted
|
# Ensure that the workflow Job will fail if the dependency graph cannot be submitted
|
||||||
- uses: gradle/actions/setup-gradle@v5
|
- uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-submit
|
dependency-graph: generate-and-submit
|
||||||
dependency-graph-continue-on-failure: false
|
dependency-graph-continue-on-failure: false
|
||||||
@@ -735,7 +738,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle to generate and submit dependency graphs
|
- name: Setup Gradle to generate and submit dependency graphs
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-submit
|
dependency-graph: generate-and-submit
|
||||||
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
|
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
|
||||||
@@ -765,7 +768,7 @@ jobs:
|
|||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Gradle to generate and submit dependency graphs
|
- name: Setup Gradle to generate and submit dependency graphs
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
dependency-graph: generate-and-submit
|
dependency-graph: generate-and-submit
|
||||||
- name: Build the app, generating a graph of dependencies required
|
- name: Build the app, generating a graph of dependencies required
|
||||||
@@ -809,7 +812,7 @@ To publish to https://scans.gradle.com, you must specify in your workflow that y
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle to publish build scans
|
- name: Setup Gradle to publish build scans
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
build-scan-publish: true
|
build-scan-publish: true
|
||||||
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
|
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
|
||||||
@@ -831,7 +834,7 @@ The short-lived access token will then be used wherever a Develocity access key
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} # Long-lived access key, visiblility is restricted to this step.
|
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} # Long-lived access key, visiblility is restricted to this step.
|
||||||
|
|
||||||
@@ -849,7 +852,7 @@ To avoid this, use the `develocity-token-expiry` parameter to specify a differen
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
||||||
develocity-token-expiry: '8' # The number of hours that the access token should remain valid (max 24).
|
develocity-token-expiry: '8' # The number of hours that the access token should remain valid (max 24).
|
||||||
@@ -871,7 +874,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
|
|
||||||
# The build will automatically use a short-lived access token to authenticate with Develocity
|
# The build will automatically use a short-lived access token to authenticate with Develocity
|
||||||
- name: Run a Gradle build that is configured to publish to Develocity.
|
- name: Run a Gradle build that is configured to publish to Develocity.
|
||||||
@@ -903,7 +906,7 @@ Here's a minimal example:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
develocity-injection-enabled: true
|
develocity-injection-enabled: true
|
||||||
develocity-url: 'https://develocity.your-server.com'
|
develocity-url: 'https://develocity.your-server.com'
|
||||||
@@ -913,14 +916,14 @@ Here's a minimal example:
|
|||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|
||||||
This configuration will automatically apply `v4.4.0` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
|
This configuration will automatically apply `v4.4.2` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
|
||||||
|
|
||||||
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
|
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
|
||||||
In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret:
|
In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
with:
|
with:
|
||||||
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
|
||||||
|
|
||||||
@@ -971,7 +974,7 @@ Here's an example using the env vars:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
|
|
||||||
- name: Run a Gradle build with Develocity injection enabled with environment variables
|
- name: Run a Gradle build with Develocity injection enabled with environment variables
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ We created an example [Homoglyph attack PR here](https://github.com/JLLeitschuh/
|
|||||||
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
|
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: gradle/actions/wrapper-validation@v5
|
uses: gradle/actions/wrapper-validation@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`.
|
This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`.
|
||||||
@@ -73,7 +73,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: gradle/actions/wrapper-validation@v5
|
- uses: gradle/actions/wrapper-validation@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing to an external GitHub Repository
|
## Contributing to an external GitHub Repository
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export async function setup(config: DevelocityConfig): Promise<void> {
|
|||||||
// except if they are defined in the configuration
|
// except if they are defined in the configuration
|
||||||
if (config.getBuildScanPublishEnabled()) {
|
if (config.getBuildScanPublishEnabled()) {
|
||||||
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
|
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
|
||||||
maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.4.0')
|
maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.4.2')
|
||||||
maybeExportVariable('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', '2.1')
|
maybeExportVariable('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', '2.1')
|
||||||
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_URL', config.getTermsOfUseUrl())
|
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_URL', config.getTermsOfUseUrl())
|
||||||
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_AGREE', config.getTermsOfUseAgree())
|
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_AGREE', config.getTermsOfUseAgree())
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.develocity" version "4.4.0"
|
id "com.gradle.develocity" version "4.4.2"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ import java.nio.file.Files
|
|||||||
import java.util.zip.GZIPOutputStream
|
import java.util.zip.GZIPOutputStream
|
||||||
|
|
||||||
class BaseInitScriptTest extends Specification {
|
class BaseInitScriptTest extends Specification {
|
||||||
static final String DEVELOCITY_PLUGIN_VERSION = '4.4.0'
|
static final String DEVELOCITY_PLUGIN_VERSION = '4.4.2'
|
||||||
static final String CCUD_PLUGIN_VERSION = '2.1'
|
static final String CCUD_PLUGIN_VERSION = '2.1'
|
||||||
|
|
||||||
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
|
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
|
||||||
|
|||||||
+1
-1
@@ -248,7 +248,7 @@ task expectFailure {
|
|||||||
when:
|
when:
|
||||||
settingsFile.text = """
|
settingsFile.text = """
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gradle.develocity' version '4.4.0' apply(false)
|
id 'com.gradle.develocity' version '4.4.2' apply(false)
|
||||||
}
|
}
|
||||||
gradle.settingsEvaluated {
|
gradle.settingsEvaluated {
|
||||||
apply plugin: 'com.gradle.develocity'
|
apply plugin: 'com.gradle.develocity'
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: gradle/actions/wrapper-validation@v5
|
- uses: gradle/actions/wrapper-validation@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [full action documentation](../docs/wrapper-validation.md) for more advanced usage scenarios.
|
See the [full action documentation](../docs/wrapper-validation.md) for more advanced usage scenarios.
|
||||||
|
|||||||
Reference in New Issue
Block a user