File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,18 @@ eclipse.classpath.file.whenMerged { classpath ->
19
19
def projectName = matcher[0 ][1 ]
20
20
def path = " /${ projectName} "
21
21
if (! classpath. entries. find { e -> e instanceof ProjectDependency && e. path == path }) {
22
+ def recursiveDependency = entry. path. matches(' .+/' + projectName + ' /build/([^/]+/)+(?:main|test)' )
22
23
// Avoid recursive dependency on current project.
23
- if (! entry. path. matches(' .+/' + projectName + ' /build/([^/]+/)+(?:main|test)' )) {
24
- def dependency = new ProjectDependency (path)
25
- dependency. exported = true
26
- classpath. entries. add(dependency)
24
+ if (! recursiveDependency) {
25
+ classpath. entries. add(new ProjectDependency (path))
27
26
}
28
27
}
29
28
classpath. entries. remove(entry)
30
29
}
31
30
}
31
+
32
+ // Remove any remaining direct depencencies on JARs in the build/libs folder
33
+ // except Spring's spring-cglib-repack and spring-objenesis-repack JARs.
32
34
classpath. entries. removeAll { entry -> (entry. path =~ / (?!.*?repack.*\. jar).*?\/ ([^\/ ]+)\/ build\/ libs\/ [^\/ ]+\. jar/ ) }
33
35
}
34
36
You can’t perform that action at this time.
0 commit comments