Last active
December 13, 2015 22:48
-
-
Save monzou/4986544 to your computer and use it in GitHub Desktop.
Gradle + Eclipse WTP でサードパーティライブラリのソースが見えるようにする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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