Skip to content

Instantly share code, notes, and snippets.

@rahogata
Last active June 15, 2024 15:56
Show Gist options
  • Save rahogata/92c9eb5e2feb4ebe9c638f1bc2f34533 to your computer and use it in GitHub Desktop.
Save rahogata/92c9eb5e2feb4ebe9c638f1bc2f34533 to your computer and use it in GitHub Desktop.
Exclude node_modules in eclipse project through gradle build tool.
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