Last active
June 15, 2024 15:56
-
-
Save rahogata/92c9eb5e2feb4ebe9c638f1bc2f34533 to your computer and use it in GitHub Desktop.
Exclude node_modules in eclipse project through gradle build tool.
This file contains 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 { | |
project { | |
resourceFilter { | |
appliesTo = 'FOLDERS' | |
type = 'EXCLUDE_ALL' | |
recursive = false | |
matcher { | |
id = 'org.eclipse.ui.ide.multiFilter' | |
arguments = '1.0-name-matches-false-false-node_modules' | |
} | |
} | |
resourceFilter { | |
appliesTo = 'FOLDERS' | |
type = 'EXCLUDE_ALL' | |
recursive = false | |
matcher { | |
id = 'org.eclipse.ui.ide.multiFilter' | |
arguments = '1.0-name-matches-false-false-build' | |
} | |
} | |
} | |
} | |
eclipse { | |
classpath { | |
plusConfigurations += [ configurations.wso2Deps ] | |
} | |
} | |
eclipse.classpath.file.whenMerged { | |
entries.removeAll {it.kind == "src" && it.path == "/fileaccess"} | |
} | |
// disable shadowjar | |
shadowJar { | |
enabled = gradle.startParameter.taskRequests | |
.find {it.args.find {it.toLowerCase().contains("shadowjar")} != null } != null | |
zip64 true | |
} | |
resolutionStrategy.eachDependency { DependencyResolveDetails details -> | |
if (details.requested.name == 'snappy-java') { | |
details.useVersion libVersion.snappyJava | |
} else if(details.requested.group == 'com.google.guava' && details.requested.name == 'guava'){ | |
details.useVersion libVersion.guava | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment