From 5c3326b6e6a0a768257b29a54db57cdffef25c85 Mon Sep 17 00:00:00 2001 From: bot-githubaction Date: Wed, 28 May 2025 02:36:07 +0000 Subject: [PATCH 1/2] Bump references to Develocity Gradle plugin from 4.0.1 to 4.0.2 --- .github/workflow-samples/groovy-dsl/settings.gradle | 2 +- .../workflow-samples/kotlin-dsl/settings.gradle.kts | 2 +- .../workflow-samples/no-wrapper-gradle-5/build.gradle | 2 +- .github/workflow-samples/no-wrapper/settings.gradle | 2 +- .../non-executable-wrapper/settings.gradle | 2 +- .github/workflows/integ-test-inject-develocity.yml | 10 +++++----- docs/setup-gradle.md | 2 +- sources/src/develocity/build-scan.ts | 2 +- sources/test/init-scripts/settings.gradle | 2 +- .../gradle/gradlebuildaction/BaseInitScriptTest.groovy | 2 +- .../gradlebuildaction/TestBuildResultRecorder.groovy | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflow-samples/groovy-dsl/settings.gradle b/.github/workflow-samples/groovy-dsl/settings.gradle index 352094f3..6b83a881 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 "4.0.1" + id "com.gradle.develocity" version "4.0.2" 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 c988ed33..0768cd81 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 "4.0.1" + id("com.gradle.develocity") version "4.0.2" 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 9f4364c9..ccfb74ed 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 "4.0.1" + id "com.gradle.develocity" version "4.0.2" } develocity { diff --git a/.github/workflow-samples/no-wrapper/settings.gradle b/.github/workflow-samples/no-wrapper/settings.gradle index 000799fa..def5088b 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 "4.0.1" + id "com.gradle.develocity" version "4.0.2" } develocity { diff --git a/.github/workflow-samples/non-executable-wrapper/settings.gradle b/.github/workflow-samples/non-executable-wrapper/settings.gradle index 000799fa..def5088b 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 "4.0.1" + id "com.gradle.develocity" version "4.0.2" } develocity { diff --git a/.github/workflows/integ-test-inject-develocity.yml b/.github/workflows/integ-test-inject-develocity.yml index 9bf1cba9..2c9cb8a4 100644 --- a/.github/workflows/integ-test-inject-develocity.yml +++ b/.github/workflows/integ-test-inject-develocity.yml @@ -30,11 +30,11 @@ jobs: matrix: gradle: ['current', '7.6.2', '6.9.4', '5.6.4'] os: ${{fromJSON(inputs.runner-os)}} - plugin-version: ['3.16.2', '4.0.1'] + plugin-version: ['3.16.2', '4.0.2'] include: - plugin-version: '3.16.2' accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY - - plugin-version: '4.0.1' + - plugin-version: '4.0.2' accessKeyEnv: DEVELOCITY_ACCESS_KEY runs-on: ${{ matrix.os }} env: @@ -82,7 +82,7 @@ jobs: matrix: gradle: ['current', '7.6.2', '6.9.4', '5.6.4'] os: ${{fromJSON(inputs.runner-os)}} - plugin-version: ['3.16.2', '4.0.1'] + plugin-version: ['3.16.2', '4.0.2'] runs-on: ${{ matrix.os }} steps: - name: Checkout sources @@ -126,7 +126,7 @@ jobs: matrix: gradle: ['current', '7.6.2', '6.9.4', '5.6.4'] os: ${{fromJSON(inputs.runner-os)}} - plugin-version: [ '3.16.2', '4.0.1' ] + plugin-version: [ '3.16.2', '4.0.2' ] runs-on: ubuntu-latest steps: - name: Checkout sources @@ -157,7 +157,7 @@ jobs: matrix: gradle: ['current', '7.6.2', '6.9.4', '5.6.4'] os: ${{fromJSON(inputs.runner-os)}} - plugin-version: [ '3.16.2', '4.0.1' ] + plugin-version: [ '3.16.2', '4.0.2' ] runs-on: ${{ matrix.os }} steps: - name: Checkout sources diff --git a/docs/setup-gradle.md b/docs/setup-gradle.md index 40d574c8..16dc6567 100644 --- a/docs/setup-gradle.md +++ b/docs/setup-gradle.md @@ -847,7 +847,7 @@ Here's a minimal example: run: ./gradlew build ``` -This configuration will automatically apply `v4.0.1` 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.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. 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: diff --git a/sources/src/develocity/build-scan.ts b/sources/src/develocity/build-scan.ts index cd0a63da..0640f465 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', '4.0.1') + maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.0.2') 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 afddc6ff..e203210c 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 "4.0.1" + id "com.gradle.develocity" version "4.0.2" 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 af82f574..a42b818b 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 = '4.0.1' + static final String DEVELOCITY_PLUGIN_VERSION = '4.0.2' 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 abb87467..5d07324e 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 '4.0.1' apply(false) + id 'com.gradle.develocity' version '4.0.2' apply(false) } gradle.settingsEvaluated { apply plugin: 'com.gradle.develocity' From 8470d8529f2072ea39b1ed013a4ea9e04df572fc Mon Sep 17 00:00:00 2001 From: Alexis Tual Date: Mon, 2 Jun 2025 16:52:27 +0200 Subject: [PATCH 2/2] Adapt tests to new Build Scan publication message in Develocity Gradle plugin 4.0.2 --- .../gradle/gradlebuildaction/TestDevelocityInjection.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestDevelocityInjection.groovy b/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestDevelocityInjection.groovy index ceecba1f..93cd94fb 100644 --- a/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestDevelocityInjection.groovy +++ b/sources/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestDevelocityInjection.groovy @@ -355,8 +355,10 @@ class TestDevelocityInjection extends BaseInitScriptTest { } void outputContainsBuildScanUrl(BuildResult result) { - def message = "Publishing build scan...\n${mockScansServer.address}s/$PUBLIC_BUILD_SCAN_ID" - assert result.output.contains(message) + def opt = ['Publishing build scan...', 'Publishing Build Scan...'].stream() + .filter { result.output.contains("${it}\n${mockScansServer.address}s/$PUBLIC_BUILD_SCAN_ID") }.findFirst() + assert opt.isPresent() + def message = opt.get() assert 1 == result.output.count(message) }