Skip to content

Commit 1888cb6

Browse files
liutikasGoooler
andauthored
Disable Develocity integration by default (#993)
Configuring Develocity build scan to publish additional details breaks Gradle project isolation. This change introduces a new property, `com.gradleup.shadow.enableDevelocityIntegration`, which defaults to false. However, it allows users to set it to true to continue using Develocity integration. --------- Co-authored-by: Goooler <wangzongler@gmail.com>
1 parent 196fd6c commit 1888cb6

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

src/docs/changes/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
## [Unreleased]
55

6+
**Changed**
7+
8+
- Disable Develocity integration by default. ([#993](https://github.com/GradleUp/shadow/pull/993))
9+
610

711
## [v8.3.2]
812

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowPlugin.groovy

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ class ShadowPlugin implements Plugin<Project> {
2121
plugins.apply(ShadowApplicationPlugin)
2222
}
2323

24-
// Legacy build scan support for Gradle Enterprise, users should migrate to develocity plugin.
25-
rootProject.plugins.withId('com.gradle.enterprise') {
26-
configureBuildScan(rootProject)
27-
}
28-
rootProject.plugins.withId('com.gradle.develocity') {
29-
configureBuildScan(rootProject)
24+
boolean enableDevelocityIntegration = providers.gradleProperty(
25+
"com.gradleup.shadow.enableDevelocityIntegration"
26+
).map { it.toBoolean() }.getOrElse(false)
27+
if (enableDevelocityIntegration) {
28+
// Legacy build scan support for Gradle Enterprise, users should migrate to develocity plugin.
29+
rootProject.plugins.withId('com.gradle.enterprise') {
30+
configureBuildScan(rootProject)
31+
}
32+
rootProject.plugins.withId('com.gradle.develocity') {
33+
configureBuildScan(rootProject)
34+
}
3035
}
3136
}
3237
}

0 commit comments

Comments
 (0)