File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
buildSrc/src/main/java/org/springframework/boot/build/classpath Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 3838import org .gradle .api .artifacts .component .ModuleComponentIdentifier ;
3939import org .gradle .api .artifacts .dsl .DependencyHandler ;
4040import org .gradle .api .artifacts .result .ResolvedArtifactResult ;
41+ import org .gradle .api .file .FileCollection ;
42+ import org .gradle .api .tasks .Classpath ;
4143import org .gradle .api .tasks .Input ;
4244import org .gradle .api .tasks .TaskAction ;
4345
@@ -61,6 +63,8 @@ public class CheckClasspathForUnnecessaryExclusions extends DefaultTask {
6163
6264 private final ConfigurationContainer configurations ;
6365
66+ private Configuration classpath ;
67+
6468 @ Inject
6569 public CheckClasspathForUnnecessaryExclusions (DependencyHandler dependencyHandler ,
6670 ConfigurationContainer configurations ) {
@@ -72,11 +76,17 @@ public CheckClasspathForUnnecessaryExclusions(DependencyHandler dependencyHandle
7276 }
7377
7478 public void setClasspath (Configuration classpath ) {
79+ this .classpath = classpath ;
7580 this .exclusionsByDependencyId .clear ();
7681 this .dependencyById .clear ();
7782 classpath .getAllDependencies ().all (this ::processDependency );
7883 }
7984
85+ @ Classpath
86+ public FileCollection getClasspath () {
87+ return this .classpath ;
88+ }
89+
8090 private void processDependency (Dependency dependency ) {
8191 if (dependency instanceof ModuleDependency ) {
8292 processDependency ((ModuleDependency ) dependency );
You can’t perform that action at this time.
0 commit comments