File tree 1 file changed +10
-0
lines changed
buildSrc/src/main/java/org/springframework/boot/build/classpath
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 38
38
import org .gradle .api .artifacts .component .ModuleComponentIdentifier ;
39
39
import org .gradle .api .artifacts .dsl .DependencyHandler ;
40
40
import org .gradle .api .artifacts .result .ResolvedArtifactResult ;
41
+ import org .gradle .api .file .FileCollection ;
42
+ import org .gradle .api .tasks .Classpath ;
41
43
import org .gradle .api .tasks .Input ;
42
44
import org .gradle .api .tasks .TaskAction ;
43
45
@@ -61,6 +63,8 @@ public class CheckClasspathForUnnecessaryExclusions extends DefaultTask {
61
63
62
64
private final ConfigurationContainer configurations ;
63
65
66
+ private Configuration classpath ;
67
+
64
68
@ Inject
65
69
public CheckClasspathForUnnecessaryExclusions (DependencyHandler dependencyHandler ,
66
70
ConfigurationContainer configurations ) {
@@ -72,11 +76,17 @@ public CheckClasspathForUnnecessaryExclusions(DependencyHandler dependencyHandle
72
76
}
73
77
74
78
public void setClasspath (Configuration classpath ) {
79
+ this .classpath = classpath ;
75
80
this .exclusionsByDependencyId .clear ();
76
81
this .dependencyById .clear ();
77
82
classpath .getAllDependencies ().all (this ::processDependency );
78
83
}
79
84
85
+ @ Classpath
86
+ public FileCollection getClasspath () {
87
+ return this .classpath ;
88
+ }
89
+
80
90
private void processDependency (Dependency dependency ) {
81
91
if (dependency instanceof ModuleDependency ) {
82
92
processDependency ((ModuleDependency ) dependency );
You can’t perform that action at this time.
0 commit comments