On 25/02/2011 10:25, Sebastian Barszczewski wrote:
Hello gradle users,
i am new to gradle and i am trying to assemble a simple jar file with groovy in
a grails project. The jar file should contain only some enums from a certain
package.
My build.gradle looks like this.
apply plugin:'groovy'
jar {
includes ['my/certain/package/**']
}
When i execute "gradle build" at the command line gradle states "BUILD SUCCESS"
but where can i find the assembled jar? How can i determine the destination folder?
Have a look in the build/libs directory, which is the default location:
http://gradle.org/0.9.2/docs/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:destinationDir
I tried:
apply plugin:'groovy'
jar {
includes ['my/certain/package/**']
destinationDir file('lib')
}
but then the build fails with "Could not find method destinationDir() ...."
It is a property, so try
destinationDir = x
but it's probably best to stick with the default value for consistency.
If you want to create an additional jar with a subset of the classes,
rather than modifying the default jar task, you can create an additional
task of type "Jar". You'll find examples of this in the user manual.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email