Skip to content

Instantly share code, notes, and snippets.

@monzou
Last active December 13, 2015 22:48
Show Gist options
  • Save monzou/4986544 to your computer and use it in GitHub Desktop.
Save monzou/4986544 to your computer and use it in GitHub Desktop.
Gradle + Eclipse WTP でサードパーティライブラリのソースが見えるようにする
eclipse {
classpath {
file {
whenMerged { classpath ->
def webContainer = classpath.entries.find { it.path == 'org.eclipse.jst.j2ee.internal.web.container' }
if (webContainer != null) {
def projects = classpath.entries.findAll { it instanceof org.gradle.plugins.ide.eclipse.model.ProjectDependency }
def others = classpath.entries.findAll { it != webContainer }
others.removeAll(projects);
classpath.entries = others + webContainer + projects
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment