Skip to content

Commit

Permalink
Switch from com.gradle.enterprise to com.gradle.develocity
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Apr 4, 2024
1 parent 81b3a2d commit 518b14b
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 50 deletions.
9 changes: 4 additions & 5 deletions .github/workflow-samples/groovy-dsl/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
plugins {
id "com.gradle.enterprise" version "3.17"
id "com.gradle.develocity" version "3.17"
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.13"
}

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfUseAgree = "yes"
uploadInBackground = false
}
}
Expand Down
11 changes: 5 additions & 6 deletions .github/workflow-samples/kotlin-dsl/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
plugins {
id("com.gradle.enterprise") version "3.17"
id("com.gradle.develocity") version "3.17"
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.13"
}

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
isUploadInBackground = false
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfUseAgree = "yes"
uploadInBackground = false
}
}

Expand Down
9 changes: 4 additions & 5 deletions .github/workflow-samples/no-wrapper-gradle-5/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
plugins {
id "com.gradle.build-scan" version "3.17"
id "com.gradle.develocity" version "3.17"
}

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfUseAgree = "yes"
uploadInBackground = false
}
}
9 changes: 4 additions & 5 deletions .github/workflow-samples/no-wrapper/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
plugins {
id "com.gradle.enterprise" version "3.17"
id "com.gradle.develocity" version "3.17"
}

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfUseAgree = "yes"
uploadInBackground = false
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
plugins {
id "com.gradle.enterprise" version "3.17"
id "com.gradle.develocity" version "3.17"
}

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfUseAgree = "yes"
uploadInBackground = false
}
}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integ-test-caching-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
uses: ./setup-gradle
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
# Add "enterprise" to main cache entry but omit "notifications"
# Add "application" to main cache entry but omit "notifications"
gradle-home-cache-includes: |
caches
enterprise
application
# Exclude build-cache from main cache entry
gradle-home-cache-excludes: |
caches/build-cache-*
Expand All @@ -61,7 +61,7 @@ jobs:
# Use the same configuration as used in the seed build
gradle-home-cache-includes: |
caches
enterprise
application
gradle-home-cache-excludes: |
caches/build-cache-*
caches/*/executionHistory
Expand Down
6 changes: 3 additions & 3 deletions setup-gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -660,11 +660,11 @@ jobs:
run: ./gradlew build
```

This configuration will automatically apply `v3.17` of the [Develocity Gradle plugin](https://docs.gradle.com/enterprise/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
This configuration will automatically apply `v3.17` 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 configure an additional environment variable
with a valid [Develocity access key](https://docs.gradle.com/enterprise/gradle-plugin/#via_environment_variable).
with a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable).

## Configuring Develocity injection

Expand All @@ -677,7 +677,7 @@ The `init-script` supports several additional configuration parameters that you
| DEVELOCITY_ALLOW_UNTRUSTED_SERVER | | allow communication with an untrusted server; set to _true_ if your Develocity instance is using a self-signed certificate |
| DEVELOCITY_CAPTURE_FILE_FINGERPRINTS | | enables capturing the paths and content hashes of each individual input file |
| DEVELOCITY_ENFORCE_URL | | enforce the configured Develocity URL over a URL configured in the project's build; set to _true_ to enforce publication of build scans to the configured Develocity URL |
| DEVELOCITY_PLUGIN_VERSION | :white_check_mark: | the version of the [Develocity Gradle plugin](https://docs.gradle.com/enterprise/gradle-plugin/) to apply |
| DEVELOCITY_PLUGIN_VERSION | :white_check_mark: | the version of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/) to apply |
| DEVELOCITY_CCUD_PLUGIN_VERSION | | the version of the [Common Custom User Data Gradle plugin](https://github.com/gradle/common-custom-user-data-gradle-plugin) to apply, if any |
| GRADLE_PLUGIN_REPOSITORY_URL | | the URL of the repository to use when resolving the Develocity and CCUD plugins; the Gradle Plugin Portal is used by default |
| GRADLE_PLUGIN_REPOSITORY_USERNAME | | the username for the repository URL to use when resolving the Develocity and CCUD plugins |
Expand Down
2 changes: 1 addition & 1 deletion sources/src/job-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function renderBuildScan(result: BuildResult): string {
return renderBuildScanBadge(
'PUBLISH_FAILED',
'orange',
'https://docs.gradle.com/enterprise/gradle-plugin/#troubleshooting'
'https://docs.gradle.com/develocity/gradle-plugin/#troubleshooting'
)
}
if (result.buildScanUri) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def captureUsingBuildScanPublished(buildScanExtension, rootProject, invocationId
if (githubOutput) {
new File(githubOutput) << "build-scan-url=${buildScan.buildScanUri}\n"
} else {
// Retained for compatibility with older GitHub Enterprise versions
// Retained for compatibility with older GHES versions
println("::set-output name=build-scan-url::${buildScan.buildScanUri}")
}
}
Expand Down
9 changes: 4 additions & 5 deletions sources/test/init-scripts/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
plugins {
id "com.gradle.enterprise" version "3.17"
id "com.gradle.develocity" version "3.17"
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.13"
}

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfUseAgree = "yes"
uploadInBackground = false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,12 @@ class TestBuildResultRecorder extends BaseInitScriptTest {
when:
settingsFile.text = """
plugins {
id 'com.gradle.enterprise' version '3.17' apply(false)
id 'com.gradle.develocity' version '3.17' apply(false)
}
gradle.settingsEvaluated {
apply plugin: 'com.gradle.enterprise'
gradleEnterprise {
apply plugin: 'com.gradle.develocity'
develocity {
server = '$mockScansServer.address'
buildScan {
publishAlways()
}
}
}
""" + settingsFile.text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class TestDevelocityInjection extends BaseInitScriptTest {
assumeTrue testGradleVersion.compatibleWithCurrentJvm

given:
settingsFile.text = maybeAddGradleEnterprisePlugin(testGradleVersion.gradleVersion, '3.16.2')
settingsFile.text = maybeAddDevelocityPlugin(testGradleVersion.gradleVersion, '3.16.2')
buildFile.text = maybeAddBuildScanPlugin(testGradleVersion.gradleVersion, '3.16.2')

when:
Expand Down Expand Up @@ -443,15 +443,15 @@ class TestDevelocityInjection extends BaseInitScriptTest {
}
}

private String maybeAddGradleEnterprisePlugin(GradleVersion gradleVersion, String gePluginVersion) {
private String maybeAddDevelocityPlugin(GradleVersion gradleVersion, String gePluginVersion) {
if (gradleVersion < GradleVersion.version('6.0')) {
'' // applied in build.gradle
} else {
"""
plugins {
id 'com.gradle.enterprise' version '${gePluginVersion}'
id 'com.gradle.develocity' version '${gePluginVersion}'
}
gradleEnterprise {
develocity {
server = '${mockScansServer.address}'
buildScan {
publishAlways()
Expand All @@ -475,7 +475,7 @@ class TestDevelocityInjection extends BaseInitScriptTest {
} else if (gradleVersion < GradleVersion.version('6.0')) {
"""
plugins {
id 'com.gradle.build-scan' version '${buildScanPluginVersion}'
id 'com.gradle.develocity' version '${buildScanPluginVersion}'
}
buildScan {
server = '${mockScansServer.address}'
Expand Down

0 comments on commit 518b14b

Please sign in to comment.