From 1c3f3d9c2f44df6c31b9b775cc6f8768826a403c Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Tue, 8 Oct 2024 11:40:50 -0500 Subject: [PATCH] Remove Develocity agent version data capturing samples --- .../gradle-data-capturing-samples-verification.yml | 2 -- .../maven-data-capturing-samples-verification.yml | 2 -- build-data-capturing-gradle-samples/README.md | 7 ------- .../gradle-develocity-plugin-version.gradle | 14 -------------- .../gradle-develocity-plugin-version.gradle.kts | 14 -------------- build-data-capturing-maven-samples/README.md | 7 ------- .../maven-develocity-extension-version.groovy | 7 ------- 7 files changed, 53 deletions(-) delete mode 100644 build-data-capturing-gradle-samples/capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle delete mode 100644 build-data-capturing-gradle-samples/capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle.kts delete mode 100644 build-data-capturing-maven-samples/capture-develocity-extension-version/maven-develocity-extension-version.groovy diff --git a/.github/workflows/gradle-data-capturing-samples-verification.yml b/.github/workflows/gradle-data-capturing-samples-verification.yml index 0adf60f3a..5432374ab 100644 --- a/.github/workflows/gradle-data-capturing-samples-verification.yml +++ b/.github/workflows/gradle-data-capturing-samples-verification.yml @@ -16,8 +16,6 @@ jobs: strategy: matrix: include: - - name: 'Develocity Gradle plugin version' - sample-file: 'capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle' - name: 'Git diffs' sample-file: 'capture-git-diffs/gradle-git-diffs.gradle' - name: 'Max parallel forks' diff --git a/.github/workflows/maven-data-capturing-samples-verification.yml b/.github/workflows/maven-data-capturing-samples-verification.yml index e2b3d554f..8673e0553 100644 --- a/.github/workflows/maven-data-capturing-samples-verification.yml +++ b/.github/workflows/maven-data-capturing-samples-verification.yml @@ -19,8 +19,6 @@ jobs: strategy: matrix: include: - - name: 'Develocity Maven extension version' - sample-file: 'capture-develocity-extension-version/maven-develocity-extension-version.groovy' - name: 'OS processes' sample-file: 'capture-os-processes/maven-os-processes.groovy' - name: 'Processor arch' diff --git a/build-data-capturing-gradle-samples/README.md b/build-data-capturing-gradle-samples/README.md index 73045abe5..ea1dff92b 100644 --- a/build-data-capturing-gradle-samples/README.md +++ b/build-data-capturing-gradle-samples/README.md @@ -26,13 +26,6 @@ tags, links, and custom values. To learn more, see the Develocity documentation on [Extending build scans](https://docs.gradle.com/develocity/gradle-plugin/current/#extending_build_scans). -### Capture Develocity Plugin Version - -_Demonstrates: Custom values_ - -This sample demonstrates how to capture the Develocity Gradle plugin version as a custom value. This can be used -to identify and filter for projects using a certain version of the plugin on the Develocity dashboards. - ### Capture Git Diffs _Demonstrates: Custom links_ diff --git a/build-data-capturing-gradle-samples/capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle b/build-data-capturing-gradle-samples/capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle deleted file mode 100644 index 3fbd850ff..000000000 --- a/build-data-capturing-gradle-samples/capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This Groovy script captures the Develocity Gradle plugin version as a custom value. - */ - -def develocityApi = project.extensions.findByName('develocity') -if (!develocityApi) { - return -} -def buildScanApi = develocityApi.getBuildScan() - -URL url = buildScanApi.class.classLoader.getResource("com.gradle.scan.plugin.internal.meta.buildAgentVersion.txt") -String buildAgentVersion = url.text -buildScanApi.value("Develocity Gradle plugin version", buildAgentVersion) - diff --git a/build-data-capturing-gradle-samples/capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle.kts b/build-data-capturing-gradle-samples/capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle.kts deleted file mode 100644 index 7e9945af0..000000000 --- a/build-data-capturing-gradle-samples/capture-develocity-plugin-version/gradle-develocity-plugin-version.gradle.kts +++ /dev/null @@ -1,14 +0,0 @@ -import com.gradle.develocity.agent.gradle.DevelocityConfiguration - -/** - * This Kotlin script captures the Develocity Gradle plugin version as a custom value. - */ - -project.extensions.configure { - buildScan { - val url = DevelocityConfiguration::class.java.classLoader.getResource("com.gradle.scan.plugin.internal.meta.buildAgentVersion.txt") - val buildAgentVersion = url.readText() - value("Develocity Gradle plugin version", buildAgentVersion) - } -} - diff --git a/build-data-capturing-maven-samples/README.md b/build-data-capturing-maven-samples/README.md index 4e6bffae6..71d272867 100644 --- a/build-data-capturing-maven-samples/README.md +++ b/build-data-capturing-maven-samples/README.md @@ -16,13 +16,6 @@ tags, links, and custom values. To learn more, see the Develocity documentation on [Extending build scans](https://docs.gradle.com/develocity/maven-extension/current/#extending_build_scans). -### Capture Develocity Extension Version - -_Demonstrates: Custom values_ - -This sample demonstrates how to capture the Develocity Maven extension version as a custom value. This can be -used to identify and filter for projects using a certain version of the extension on the Develocity dashboards. - ### Capture OS Processes _Demonstrates: Custom values_ diff --git a/build-data-capturing-maven-samples/capture-develocity-extension-version/maven-develocity-extension-version.groovy b/build-data-capturing-maven-samples/capture-develocity-extension-version/maven-develocity-extension-version.groovy deleted file mode 100644 index d657fbfca..000000000 --- a/build-data-capturing-maven-samples/capture-develocity-extension-version/maven-develocity-extension-version.groovy +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This Groovy script captures the Develocity Maven extension version as a custom value. - */ - -URL url = buildScan.buildScan.class.classLoader.getResource("com.gradle.scan.plugin.internal.meta.buildAgentVersion.txt") -String buildAgentVersion = url.text -buildScan.value("Develocity Maven extension version", buildAgentVersion)