File tree Expand file tree Collapse file tree 2 files changed +27
-4
lines changed
main/groovy/com/github/jengelman/gradle/plugins/shadow Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 3
3
4
4
## [ Unreleased]
5
5
6
- ** Removed**
7
-
8
- - ** BREAKING CHANGE:** Remove Develocity integration. ([ #1013 ] ( https://github.com/GradleUp/shadow/pull/1013 ) )
9
-
10
6
11
7
## [ v8.3.5] (2024-11-03)
12
8
Original file line number Diff line number Diff line change @@ -25,6 +25,33 @@ class ShadowPlugin implements Plugin<Project> {
25
25
// etc. if the user applies shadow before those plugins. However, this is fine, because this was also
26
26
// the behavior with the old plugin when applying in that order.
27
27
plugins. apply(LegacyShadowPlugin )
28
+
29
+ boolean enableDevelocityIntegration = providers. gradleProperty(
30
+ " com.gradleup.shadow.enableDevelocityIntegration"
31
+ ). map { it. toBoolean() }. getOrElse(false )
32
+ if (enableDevelocityIntegration) {
33
+ // Legacy build scan support for Gradle Enterprise, users should migrate to develocity plugin.
34
+ rootProject. plugins. withId(' com.gradle.enterprise' ) {
35
+ configureBuildScan(rootProject)
36
+ }
37
+ rootProject. plugins. withId(' com.gradle.develocity' ) {
38
+ configureBuildScan(rootProject)
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ private void configureBuildScan (Project rootProject ) {
45
+ rootProject. buildScan. buildFinished {
46
+ def shadowTasks = tasks. withType(ShadowJar )
47
+ shadowTasks. each { task ->
48
+ if (task. didWork) {
49
+ task. stats. buildScanData. each { k , v ->
50
+ rootProject. buildScan. value " shadow.${ task.path} .${ k} " , v. toString()
51
+ }
52
+ rootProject. buildScan. value " shadow.${ task.path} .configurations" , task. configurations* . name. join(" , " )
53
+ }
54
+ }
28
55
}
29
56
}
30
57
}
You can’t perform that action at this time.
0 commit comments