I can't get fileSet to work properly (or is it jar()?). I must be
doing something wrong.
I am trying to create a second jar-file which contains the same as the
default one minus a few classes here and there. Here's my build script
(it's actually part of a multi-project build where the parent contains
the "usePlugin" clause):
--------- build.gradle ----------------
usePlugin('java')
dependencies {...}
libs {
jar(appendix: 'gwt', classifier: 'server'){
filesSet(dir: "classesDir") {
include('**/client/common')
}
}
}
According to what I can decipher from the user manual, this should
create a second jar file called <project-name>-gwt.<version>-server.jar.
However, the build fails with this exception:
$> gradle -i clean dists
Starting Build
Settings evaluated using settings file '<path>/settings.gradle'.
:: loading settings :: url = jar:file:<path-to-gradle-install>/lib/
ivy-2.0.0-rc2.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: org.gradle#build;SNAPSHOT
confs: [build]
:: resolution report :: resolve 30ms :: artifacts dl 0ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| build | 0 | 0 | 0 | 0 || 0 | 0 |
---------------------------------------------------------------------
Projects loaded. Root project using build file '<path-to-parent-
project>/webStatsGWT/build.gradle'.
Included projects: [:, :<parent-project-name>, :<other-project-name>]
Project= : evaluated.
Build failed with an exception.
Run with -s or -d option to get more details. Run with -f option to
get the full (very verbose) stacktrace.
Build file '/<path-to-build-script-being-run>/build.gradle' line: 17
A problem occurred evaluating project :<project-name>.
Cause: No signature of method:
org.gradle.api.tasks.bundling.Jar.filesSet() is applicable for
argument types: (java.util.LinkedHashMap, build_gradle
$_run_closure2_closure3_closure4) values: {["dir":"classesDir"],
build_gradle$_run_closure2_closure3_closu...@599bb5d7}
BUILD FAILED
Total time: 2.49 secs
Can anyone point me in the right direction?
Cheers,
Eske