Polish Eclipse IDE support
This commit is contained in:
parent
b8b85a6a59
commit
2d65bce18e
|
@ -19,16 +19,18 @@ eclipse.classpath.file.whenMerged { classpath ->
|
||||||
def projectName = matcher[0][1]
|
def projectName = matcher[0][1]
|
||||||
def path = "/${projectName}"
|
def path = "/${projectName}"
|
||||||
if (!classpath.entries.find { e -> e instanceof ProjectDependency && e.path == path }) {
|
if (!classpath.entries.find { e -> e instanceof ProjectDependency && e.path == path }) {
|
||||||
|
def recursiveDependency = entry.path.matches('.+/' + projectName + '/build/([^/]+/)+(?:main|test)')
|
||||||
// Avoid recursive dependency on current project.
|
// Avoid recursive dependency on current project.
|
||||||
if (!entry.path.matches('.+/' + projectName + '/build/([^/]+/)+(?:main|test)')) {
|
if (!recursiveDependency) {
|
||||||
def dependency = new ProjectDependency(path)
|
classpath.entries.add(new ProjectDependency(path))
|
||||||
dependency.exported = true
|
|
||||||
classpath.entries.add(dependency)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
classpath.entries.remove(entry)
|
classpath.entries.remove(entry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove any remaining direct depencencies on JARs in the build/libs folder
|
||||||
|
// except Spring's spring-cglib-repack and spring-objenesis-repack JARs.
|
||||||
classpath.entries.removeAll { entry -> (entry.path =~ /(?!.*?repack.*\.jar).*?\/([^\/]+)\/build\/libs\/[^\/]+\.jar/) }
|
classpath.entries.removeAll { entry -> (entry.path =~ /(?!.*?repack.*\.jar).*?\/([^\/]+)\/build\/libs\/[^\/]+\.jar/) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue