On 13/12/09 9:22 AM, tinca wrote:
Hello Adam,
Adam Murdoch-2 wrote:
...
There's not quite enough context in the above snippet. My guess is that
you haven't specified a type for the task, it should look something like:
task otherJar(type: Jar) { //<-- don't forget the type
from sourceSets.main.classes
include 'com/mycompany/package2/**'
}
...
Hello Adam,
Sorry for giving only partial info. This is the exact task:
task deviceJar(type: Jar) {
description = 'Prepares device/command jar'
appendix = 'device'
from sourceSets.main.classes
include 'the/real/pkg/path/**'
}
So it does define type.
FYI, this is with gradle 0.8.
Ah. The above snippet works with Gradle's trunk, but it won't work with
0.8. Sorry, I've been working with trunk too much recently and I forgot
that include() wasn't in 0.8.
This might work better:
task deviceJar(type: Jar) {
dependsOn compile
fileSet(dir: sourceSet.main.classesDir) {
include '/the/real/pkg/path/**'
}
}
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email