diff --git a/.github/workflow-samples/groovy-dsl/settings.gradle b/.github/workflow-samples/groovy-dsl/settings.gradle index bdba490..f51cdb9 100644 --- a/.github/workflow-samples/groovy-dsl/settings.gradle +++ b/.github/workflow-samples/groovy-dsl/settings.gradle @@ -1,5 +1,5 @@ plugins { - id "com.gradle.develocity" version "3.19.2" + id "com.gradle.develocity" version "4.0" id "com.gradle.common-custom-user-data-gradle-plugin" version "2.2.1" } diff --git a/.github/workflow-samples/kotlin-dsl/settings.gradle.kts b/.github/workflow-samples/kotlin-dsl/settings.gradle.kts index 0c0b1d5..ac7bb4b 100644 --- a/.github/workflow-samples/kotlin-dsl/settings.gradle.kts +++ b/.github/workflow-samples/kotlin-dsl/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.gradle.develocity") version "3.19.2" + id("com.gradle.develocity") version "4.0" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.2.1" } diff --git a/.github/workflow-samples/no-wrapper-gradle-5/build.gradle b/.github/workflow-samples/no-wrapper-gradle-5/build.gradle index 3295f30..47a7fe3 100644 --- a/.github/workflow-samples/no-wrapper-gradle-5/build.gradle +++ b/.github/workflow-samples/no-wrapper-gradle-5/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.gradle.develocity" version "3.19.2" + id "com.gradle.develocity" version "4.0" } develocity { diff --git a/.github/workflow-samples/no-wrapper/settings.gradle b/.github/workflow-samples/no-wrapper/settings.gradle index 4cfbbad..535bc92 100644 --- a/.github/workflow-samples/no-wrapper/settings.gradle +++ b/.github/workflow-samples/no-wrapper/settings.gradle @@ -1,5 +1,5 @@ plugins { - id "com.gradle.develocity" version "3.19.2" + id "com.gradle.develocity" version "4.0" } develocity { diff --git a/.github/workflow-samples/non-executable-wrapper/settings.gradle b/.github/workflow-samples/non-executable-wrapper/settings.gradle index 4cfbbad..535bc92 100644 --- a/.github/workflow-samples/non-executable-wrapper/settings.gradle +++ b/.github/workflow-samples/non-executable-wrapper/settings.gradle @@ -1,5 +1,5 @@ plugins { - id "com.gradle.develocity" version "3.19.2" + id "com.gradle.develocity" version "4.0" } develocity { diff --git a/.github/workflows/ci-check-and-unit-test.yml b/.github/workflows/ci-check-and-unit-test.yml index 95a0849..6e044b2 100644 --- a/.github/workflows/ci-check-and-unit-test.yml +++ b/.github/workflows/ci-check-and-unit-test.yml @@ -30,7 +30,7 @@ jobs: env: ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing with: - gradle-version: "8.13" + gradle-version: '8.13' - name: Install npm dependencies run: | diff --git a/.github/workflows/integ-test-build-scan-publish.yml b/.github/workflows/integ-test-build-scan-publish.yml index 759314d..f2ad616 100644 --- a/.github/workflows/integ-test-build-scan-publish.yml +++ b/.github/workflows/integ-test-build-scan-publish.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - gradle: [current, 7.6.2, 6.9.4, 5.6.4] + gradle: ['current', '7.6.2', '6.9.4', '5.6.4'] os: ${{fromJSON(inputs.runner-os)}} runs-on: ${{ matrix.os }} steps: @@ -41,8 +41,8 @@ jobs: cache-read-only: false # For testing, allow writing cache entries on non-default branches gradle-version: ${{ matrix.gradle }} build-scan-publish: true - build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" - build-scan-terms-of-use-agree: "yes" + build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' + build-scan-terms-of-use-agree: 'yes' - name: Run Gradle build id: gradle working-directory: .github/workflow-samples/no-ge diff --git a/.github/workflows/integ-test-dependency-submission-failures.yml b/.github/workflows/integ-test-dependency-submission-failures.yml index 49ff863..aac13c4 100644 --- a/.github/workflows/integ-test-dependency-submission-failures.yml +++ b/.github/workflows/integ-test-dependency-submission-failures.yml @@ -63,7 +63,7 @@ jobs: id: gradle-build uses: ./dependency-submission with: - gradle-version: 7.0.1 + gradle-version: '7.0.1' build-root-directory: .github/workflow-samples/groovy-dsl continue-on-error: true - name: Check step failed diff --git a/.github/workflows/integ-test-dependency-submission.yml b/.github/workflows/integ-test-dependency-submission.yml index 557a2ca..3f26ddb 100644 --- a/.github/workflows/integ-test-dependency-submission.yml +++ b/.github/workflows/integ-test-dependency-submission.yml @@ -231,11 +231,11 @@ jobs: fail-fast: false matrix: os: ${{fromJSON(inputs.runner-os)}} - gradle: [8.0.2, 7.6.4, 7.1.1, 6.9.4, 6.0.1, 5.6.4, 5.2.1] + gradle: ['8.0.2', '7.6.4', '7.1.1', '6.9.4', '6.0.1', '5.6.4', '5.2.1'] include: - - gradle: 5.6.4 + - gradle: '5.6.4' build-root-suffix: -gradle-5 - - gradle: 5.2.1 + - gradle: '5.2.1' build-root-suffix: -gradle-5 runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/integ-test-inject-develocity.yml b/.github/workflows/integ-test-inject-develocity.yml index dc6a476..21b8913 100644 --- a/.github/workflows/integ-test-inject-develocity.yml +++ b/.github/workflows/integ-test-inject-develocity.yml @@ -25,25 +25,25 @@ permissions: jobs: inject-develocity: + strategy: + fail-fast: false + matrix: + gradle: ['current', '7.6.2', '6.9.4', '5.6.4'] + os: ${{fromJSON(inputs.runner-os)}} + plugin-version: ['3.16.2', '4.0'] + include: + - plugin-version: '3.16.2' + accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY + - plugin-version: '4.0' + accessKeyEnv: DEVELOCITY_ACCESS_KEY + runs-on: ${{ matrix.os }} env: DEVELOCITY_INJECTION_ENABLED: true DEVELOCITY_INJECTION_URL: https://ge.solutions-team.gradle.com DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }} - DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.1' + DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1' ${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }} - strategy: - fail-fast: false - matrix: - gradle: [current, 7.6.2, 6.9.4, 5.6.4] - os: ${{fromJSON(inputs.runner-os)}} - plugin-version: [3.16.2, 3.19.2] - include: - - plugin-version: 3.16.2 - accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY - - plugin-version: 3.19.2 - accessKeyEnv: DEVELOCITY_ACCESS_KEY - runs-on: ${{ matrix.os }} steps: - name: Checkout sources uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -76,13 +76,13 @@ jobs: DEVELOCITY_INJECTION_ENABLED: true DEVELOCITY_INJECTION_URL: 'https://ge.solutions-team.gradle.com' DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }} - DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.1' + DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1' strategy: fail-fast: false matrix: - gradle: [current, 7.6.2, 6.9.4, 5.6.4] + gradle: ['current', '7.6.2', '6.9.4', '5.6.4'] os: ${{fromJSON(inputs.runner-os)}} - plugin-version: [3.16.2, 3.19.2] + plugin-version: ['3.16.2', '4.0'] runs-on: ${{ matrix.os }} steps: - name: Checkout sources @@ -124,9 +124,9 @@ jobs: strategy: fail-fast: false matrix: - gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ] + gradle: ['current', '7.6.2', '6.9.4', '5.6.4'] os: ${{fromJSON(inputs.runner-os)}} - plugin-version: [ 3.16.2, 3.19.2 ] + plugin-version: [ '3.16.2', '4.0' ] runs-on: ubuntu-latest steps: - name: Checkout sources @@ -155,9 +155,9 @@ jobs: strategy: fail-fast: false matrix: - gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ] + gradle: ['current', '7.6.2', '6.9.4', '5.6.4'] os: ${{fromJSON(inputs.runner-os)}} - plugin-version: [ 3.16.2, 3.19.2 ] + plugin-version: [ '3.16.2', '4.0' ] runs-on: ${{ matrix.os }} steps: - name: Checkout sources diff --git a/.github/workflows/integ-test-provision-gradle-versions.yml b/.github/workflows/integ-test-provision-gradle-versions.yml index 76680eb..3ec4c14 100644 --- a/.github/workflows/integ-test-provision-gradle-versions.yml +++ b/.github/workflows/integ-test-provision-gradle-versions.yml @@ -41,14 +41,14 @@ jobs: uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches - gradle-version: 6.9 + gradle-version: '6.9' - name: Test uses Gradle v6.9 working-directory: .github/workflow-samples/no-wrapper run: gradle help "-DgradleVersionCheck=6.9" - name: Setup Gradle with v7.1.1 uses: ./setup-gradle with: - gradle-version: 7.1.1 + gradle-version: '7.1.1' - name: Test uses Gradle v7.1.1 working-directory: .github/workflow-samples/no-wrapper run: gradle help "-DgradleVersionCheck=7.1.1" @@ -78,20 +78,20 @@ jobs: strategy: fail-fast: false matrix: - gradle: ["8.13", "8.12", "8.12-rc-1", 8.9, 8.1, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1] + gradle: ['8.13', '8.12', '8.12-rc-1', '8.9', '8.1', '7.6.4', '6.9.4', '5.6.4', '4.10.3', '3.5.1'] os: ${{fromJSON(inputs.runner-os)}} include: - java-version: 11 - - gradle: 5.6.4 + - gradle: '5.6.4' build-root-suffix: -gradle-5 - - gradle: 4.10.3 + - gradle: '4.10.3' build-root-suffix: -gradle-4 - - gradle: 3.5.1 + - gradle: '3.5.1' build-root-suffix: -gradle-4 java-version: 8 exclude: - os: macos-latest # Java 8 is not supported on macos-latest, so we cannot test Gradle 3.5.1 - gradle: 3.5.1 + gradle: '3.5.1' runs-on: ${{ matrix.os }} steps: - name: Checkout sources diff --git a/docs/dependency-submission.md b/docs/dependency-submission.md index 1d67c51..042ef23 100644 --- a/docs/dependency-submission.md +++ b/docs/dependency-submission.md @@ -86,7 +86,7 @@ In some cases, the default action configuration will not be sufficient, and addi uses: gradle/actions/dependency-submission@v4 with: # Use a particular Gradle version instead of the configured wrapper. - gradle-version: 8.6 + gradle-version: '8.6' # The gradle project is not in the root of the repository. build-root-directory: my-gradle-project diff --git a/docs/deprecation-upgrade-guide.md b/docs/deprecation-upgrade-guide.md index 7cf9321..c89ff37 100644 --- a/docs/deprecation-upgrade-guide.md +++ b/docs/deprecation-upgrade-guide.md @@ -101,7 +101,7 @@ The exact syntax depends on whether or not your project is configured with the [ - name: Setup Gradle for a non-wrapper project uses: gradle/actions/setup-gradle@v4 with: - gradle-version: "8.11" + gradle-version: '8.11' - name: Assemble the project run: gradle assemble diff --git a/docs/setup-gradle.md b/docs/setup-gradle.md index 394423c..576d076 100644 --- a/docs/setup-gradle.md +++ b/docs/setup-gradle.md @@ -60,7 +60,7 @@ Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid havi - name: Setup Gradle 8.10 uses: gradle/actions/setup-gradle@v4 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 run: gradle build ``` @@ -220,7 +220,7 @@ jobs: - uses: gradle/actions/setup-gradle@v4 with: - gradle-version: 8.6 + gradle-version: '8.6' cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - run: gradle build --configuration-cache ``` @@ -474,7 +474,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 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' - run: ./gradlew build --scan ``` @@ -675,7 +675,7 @@ jobs: - name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy run: ./gradlew build env: - GRADLE_PLUGIN_REPOSITORY_URL: "https://gradle-plugins-proxy.mycorp.com" + GRADLE_PLUGIN_REPOSITORY_URL: 'https://gradle-plugins-proxy.mycorp.com' # Set the following variables if your custom plugin repository requires authentication # GRADLE_PLUGIN_REPOSITORY_USERNAME: "username" @@ -746,8 +746,8 @@ To publish to https://scans.gradle.com, you must specify in your workflow that y uses: gradle/actions/setup-gradle@v4 with: build-scan-publish: true - build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" - build-scan-terms-of-use-agree: "yes" + build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' + build-scan-terms-of-use-agree: 'yes' - name: Run a Gradle build - a build scan will be published automatically run: ./gradlew build @@ -783,7 +783,7 @@ To avoid this, use the `develocity-token-expiry` parameter to specify a differen uses: gradle/actions/setup-gradle@v4 with: 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). ``` ### Develocity access key supplied as environment variable @@ -837,14 +837,14 @@ Here's a minimal example: uses: gradle/actions/setup-gradle@v4 with: develocity-injection-enabled: true - develocity-url: https://develocity.your-server.com - develocity-plugin-version: 3.17.5 + develocity-url: 'https://develocity.your-server.com' + develocity-plugin-version: '4.0' - name: Run a Gradle build with Develocity injection enabled run: ./gradlew build ``` -This configuration will automatically apply `v3.19.2` 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.0` 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. 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: @@ -857,10 +857,10 @@ In the likely scenario that your Develocity server requires authentication, you - name: Run a Gradle build with Develocity injection enabled run: ./gradlew build - env: - DEVELOCITY_INJECTION_ENABLED: true - DEVELOCITY_URL: https://develocity.your-server.com - DEVELOCITY_PLUGIN_VERSION: 3.17 + with: + develocity-injection-enabled: true + develocity-url: 'https://develocity.your-server.com' + develocity-plugin-version: '4.0' ``` This access key will be used during the action execution to get a short-lived token and set it to the DEVELOCITY_ACCESS_KEY environment variable. @@ -908,10 +908,10 @@ Here's an example using the env vars: run: ./gradlew build env: DEVELOCITY_INJECTION_ENABLED: true - DEVELOCITY_URL: https://develocity.your-server.com - DEVELOCITY_ENFORCE_URL: true - DEVELOCITY_PLUGIN_VERSION: "3.19" - DEVELOCITY_CCUD_PLUGIN_VERSION: "2.1" + DEVELOCITY_INJECTION_URL: https://develocity.your-server.com + DEVELOCITY_INJECTION_ENFORCE_URL: true + DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: '4.0' + DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1' ``` # Dependency verification diff --git a/sources/src/develocity/build-scan.ts b/sources/src/develocity/build-scan.ts index 015e2a6..4a01224 100644 --- a/sources/src/develocity/build-scan.ts +++ b/sources/src/develocity/build-scan.ts @@ -34,7 +34,7 @@ export async function setup(config: BuildScanConfig): Promise { // except if they are defined in the configuration if (config.getBuildScanPublishEnabled()) { maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true') - maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '3.19.2') + maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.0') maybeExportVariable('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', '2.1') maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl()) maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree()) diff --git a/sources/test/init-scripts/settings.gradle b/sources/test/init-scripts/settings.gradle index 02586e4..945bd43 100644 --- a/sources/test/init-scripts/settings.gradle +++ b/sources/test/init-scripts/settings.gradle @@ -1,5 +1,5 @@ plugins { - id "com.gradle.develocity" version "3.19.2" + id "com.gradle.develocity" version "4.0" id "com.gradle.common-custom-user-data-gradle-plugin" version "2.2.1" } diff --git a/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/BaseInitScriptTest.groovy b/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/BaseInitScriptTest.groovy index d23729e..4a4fd2f 100644 --- a/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/BaseInitScriptTest.groovy +++ b/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/BaseInitScriptTest.groovy @@ -16,7 +16,7 @@ import java.nio.file.Files import java.util.zip.GZIPOutputStream class BaseInitScriptTest extends Specification { - static final String DEVELOCITY_PLUGIN_VERSION = '3.19.2' + static final String DEVELOCITY_PLUGIN_VERSION = '4.0' static final String CCUD_PLUGIN_VERSION = '2.1' static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9) diff --git a/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestBuildResultRecorder.groovy b/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestBuildResultRecorder.groovy index ccfe85d..ec63b05 100644 --- a/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestBuildResultRecorder.groovy +++ b/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestBuildResultRecorder.groovy @@ -248,7 +248,7 @@ task expectFailure { when: settingsFile.text = """ plugins { - id 'com.gradle.develocity' version '3.19.2' apply(false) + id 'com.gradle.develocity' version '4.0' apply(false) } gradle.settingsEvaluated { apply plugin: 'com.gradle.develocity'