Skip to content

Commit

Permalink
Update develocity configuration (#97)
Browse files Browse the repository at this point in the history
Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com>
  • Loading branch information
trask and opentelemetrybot authored Dec 2, 2024
1 parent d3aa5f6 commit 2fab853
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 44 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ jobs:
build
-PtestJavaVersion=${{ matrix.test-java-version }}
-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }},${{ steps.setup-java.outputs.path }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: generate
# Skip running on macos-latest which doesn't have docker
Expand Down
52 changes: 10 additions & 42 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pluginManagement {
plugins {
id("com.gradle.enterprise") version "3.14.1"
id("de.undercouch.download") version "5.4.0"
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("com.gradle.develocity") version "3.18.2"
}
}

plugins {
id("com.gradle.enterprise")
id("com.gradle.develocity")
}

dependencyResolutionManagement {
Expand All @@ -17,47 +17,15 @@ dependencyResolutionManagement {
}
}

develocity {
buildScan {
publishing.onlyIf { System.getenv("CI") != null }
termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use")
termsOfUseAgree.set("yes")
}
}

rootProject.name = "semantic-conventions-java"
include(":dependencyManagement")
include(":semconv-incubating")
include(":semconv")

val gradleEnterpriseServer = "https://ge.opentelemetry.io"
val isCI = System.getenv("CI") != null
val geAccessKey = 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 && geAccessKey.isEmpty()

if (useScansGradleCom) {
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
isUploadInBackground = !isCI
publishAlways()

capture {
isTaskInputFiles = true
}
}
}
} else {
gradleEnterprise {
server = gradleEnterpriseServer
buildScan {
isUploadInBackground = !isCI

this as com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
publishIfAuthenticated()
publishAlways()

capture {
isTaskInputFiles = true
}

gradle.startParameter.projectProperties["testJavaVersion"]?.let { tag(it) }
gradle.startParameter.projectProperties["testJavaVM"]?.let { tag(it) }
}
}
}

0 comments on commit 2fab853

Please # to comment.