I prepared workaround for gradle bug GRADLE-1315 eclipse.classpath.file {
whenMerged { classpath ->
def containers = classpath.entries.findAll {
entry -> entry.kind == ‘con’ &&
entry.path == ‘org.eclipse.jdt.launching.JRE_CONTAINER’ &&
entry.exported == ‘true’}
classpath.entries.removeAll (containers)
classpath.entries.findAll { entry -> entry.kind == ‘con’ &&
entry.path == ‘org.eclipse.jdt.launching.JRE_CONTAINER’}*.exported = false
} }
I don’t get why method findAll doesn’t find a class path with exported = true but just the opposite, so I have to add another line to remove exported flag, I don’t get it. Could you explain it or find a bug in my code?
Thanks, Zbigniew