I have buildscript block that references many JARs:
buildscript {
dependencies { classpath "com.github.kulya:jmeter-gradle-plugin:1.3.4-2.13" }
dependencies { classpath "com.eriwen:gradle-css-plugin:2.14.0" }
dependencies { classpath "com.eriwen:gradle-js-plugin:2.14.1" }
dependencies { classpath "com.google.javascript:closure-compiler:v20160208" }
dependencies { classpath "org.akhikhl.gretty:gretty:+" }
}
task copyWarGradlePlugins(type: Copy) {
destinationDir = file(project.buildDir.name + '/warGradlePlugins')
from (buildscript.configurations.classpath)
}
I want to copy (to my WAR file) some of the referenced JARs (e.g. dependencies of gradle-css-plugin, gradle-js-plugin, closure-compiler) but not others (e.g. gretty, jmeter-gradle-plugin).
How do I exclude for example jmeter-gradle-plugin and all its dependencies?
UPDATE:
There are 150+ JARs. Excluding them by file name is not practical/maintainable.