Skip to content

Instantly share code, notes, and snippets.

@ksaua
Created October 16, 2014 07:37
Show Gist options
  • Save ksaua/3b490a541c310b4f65b5 to your computer and use it in GitHub Desktop.
Save ksaua/3b490a541c310b4f65b5 to your computer and use it in GitHub Desktop.
Access Rule
eclipse {
classpath {
file {
whenMerged { classpath ->
classpath.entries.each {
if (it instanceof org.gradle.plugins.ide.eclipse.model.ProjectDependency) {
//println "${it.class}, $it"
if (it.path.toString().contains('Implementation')) {
def accessRule = new org.gradle.plugins.ide.eclipse.model.AccessRule("nonaccessible", "**")
it.accessRules.add(accessRule)
}
}
}
//you can tinker with the Classpath here
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment