26
26
import java .util .ArrayList ;
27
27
import java .util .List ;
28
28
import java .util .Set ;
29
- import java .util .stream .Collectors ;
30
29
import org .gradle .api .GradleException ;
31
30
import org .gradle .api .Plugin ;
32
31
import org .gradle .api .Project ;
33
32
import org .gradle .api .Task ;
34
- import org .gradle .api .artifacts .Configuration ;
35
- import org .gradle .api .artifacts .DependencySet ;
36
- import org .gradle .api .artifacts .ProjectDependency ;
37
33
import org .gradle .api .plugins .JavaPluginConvention ;
38
34
import org .gradle .api .tasks .SourceSet ;
39
35
import org .gradle .api .tasks .TaskContainer ;
@@ -57,28 +53,6 @@ public class JibPlugin implements Plugin<Project> {
57
53
58
54
public static final String REQUIRED_VERSION_PROPERTY_NAME = "jib.requiredVersion" ;
59
55
60
- /**
61
- * Collects all project dependencies of the style "compile project(':mylib')" for any kind of
62
- * configuration [compile, runtime, etc]. It potentially will collect common test libraries in
63
- * configs like [test, integrationTest, etc], but it's either that or filter based on a
64
- * configuration containing the word "test" which feels dangerous.
65
- *
66
- * @param project this project we are containerizing
67
- * @return a list of projects that this project depends on.
68
- */
69
- @ VisibleForTesting
70
- static List <Project > getProjectDependencies (Project project ) {
71
- return project
72
- .getConfigurations ()
73
- .stream ()
74
- .map (Configuration ::getDependencies )
75
- .flatMap (DependencySet ::stream )
76
- .filter (ProjectDependency .class ::isInstance )
77
- .map (ProjectDependency .class ::cast )
78
- .map (ProjectDependency ::getDependencyProject )
79
- .collect (Collectors .toList ());
80
- }
81
-
82
56
private static void checkGradleVersion () {
83
57
if (GRADLE_MIN_VERSION .compareTo (GradleVersion .current ()) > 0 ) {
84
58
throw new GradleException (
0 commit comments