Skip to content

Commit 2d65bce

Browse files
committed
Polish Eclipse IDE support
1 parent b8b85a6 commit 2d65bce

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gradle/ide.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)