File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,16 +19,18 @@ eclipse.classpath.file.whenMerged { classpath ->
1919 def projectName = matcher[0 ][1 ]
2020 def path = " /${ projectName} "
2121 if (! classpath. entries. find { e -> e instanceof ProjectDependency && e. path == path }) {
22+ def recursiveDependency = entry. path. matches(' .+/' + projectName + ' /build/([^/]+/)+(?:main|test)' )
2223 // 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))
2726 }
2827 }
2928 classpath. entries. remove(entry)
3029 }
3130 }
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.
3234 classpath. entries. removeAll { entry -> (entry. path =~ / (?!.*?repack.*\. jar).*?\/ ([^\/ ]+)\/ build\/ libs\/ [^\/ ]+\. jar/ ) }
3335}
3436
You can’t perform that action at this time.
0 commit comments