Update develocity configuration (#1567)

This commit is contained in:
Trask Stalnaker 2024-12-09 07:17:18 -08:00 committed by GitHub
parent f798481818
commit 2b6625ef8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 55 deletions

View File

@ -24,10 +24,6 @@
"matchPackagePrefixes": ["io.micrometer:"],
"groupName": "micrometer packages"
},
{
"matchPackagePrefixes": ["com.gradle.enterprise"],
"groupName": "gradle enterprise packages"
},
{
// prevent 3.0.1u2 -> 3.0.1
"matchPackageNames": ["com.google.code.findbugs:annotations"],

View File

@ -30,8 +30,6 @@ jobs:
cache-read-only: ${{ github.event_name == 'pull_request' }}
- name: Gradle build and test
run: ./gradlew build -x test
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
test:
name: test (${{ matrix.test-java-version }})
@ -71,8 +69,6 @@ jobs:
-PtestJavaVersion=${{ matrix.test-java-version }}
-Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }}
-Porg.gradle.java.installations.auto-download=false
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
integration-test:
runs-on: ubuntu-latest
@ -89,10 +85,9 @@ jobs:
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.event_name == 'pull_request' }}
- name: Integration test
run: ./gradlew integrationTest
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Save integration test results
uses: actions/upload-artifact@v4

View File

@ -15,7 +15,6 @@ dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:4.1.0")
implementation("net.ltgt.gradle:gradle-nullaway-plugin:2.1.0")
implementation("com.gradle.enterprise:com.gradle.enterprise.gradle.plugin:3.18.2")
}
spotless {

View File

@ -71,13 +71,6 @@ tasks {
showCauses = true
showStackTraces = true
}
develocity.testRetry {
// You can see tests that were retried by this mechanism in the collected test reports and build scans.
if (System.getenv().containsKey("CI") || rootProject.hasProperty("retryTests")) {
maxRetries.set(5)
}
}
}
withType<Javadoc>().configureEach {

View File

@ -1,8 +1,8 @@
pluginManagement {
plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.gradle.develocity") version "3.18.2"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("com.gradle.develocity") version "3.18.2"
}
}
@ -17,42 +17,11 @@ dependencyResolutionManagement {
}
}
val gradleEnterpriseServer = "https://ge.opentelemetry.io"
val isCI = System.getenv("CI") != null
val develocityAccessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY") ?: ""
// if GE access key is not given and we are in CI, then we publish to scans.gradle.com
val useScansGradleCom = isCI && develocityAccessKey.isEmpty()
if (useScansGradleCom) {
develocity {
buildScan {
termsOfUseUrl.set("https://gradle.com/terms-of-service")
termsOfUseAgree.set("yes")
uploadInBackground.set(!isCI)
publishing.onlyIf { true }
capture {
fileFingerprints.set(true)
}
}
}
} else {
develocity {
server = gradleEnterpriseServer
buildScan {
uploadInBackground.set(!isCI)
publishing.onlyIf {
it.isAuthenticated
}
capture {
fileFingerprints.set(true)
}
gradle.startParameter.projectProperties["testJavaVersion"]?.let { tag(it) }
gradle.startParameter.projectProperties["testJavaVM"]?.let { tag(it) }
}
develocity {
buildScan {
publishing.onlyIf { System.getenv("CI") != null }
termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use")
termsOfUseAgree.set("yes")
}
}