First, a separate project seems like overkill. I'd probably just add an
'uberjar' task to the root project. A basic solution could look like this:
uberProjects = [project(":foo"), project(":bar")]
task uberjar(type: Jar, dependsOn: uberProjects.assemble) {
classifier = "uber"
uberProjects.each { prj ->
from({
prj.configurations.archives.allArtifactFiles.collect { zipTree(it) }
}, {
// do any further processing specific to 'prj'
})
}
}
Note that I've listed the subprojects to be included explicitly. Here are
some other ways to declare them:
uberProjects = subprojects
uberProjects = subprojects - [project(":foo"), project(":bar")]
--
Peter Niederwieser
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradleware
http://www.gradleware.com
Creator, Spock Framework
http://spockframework.org
--
View this message in context:
http://gradle.1045684.n5.nabble.com/ueber-fat-jar-tp4360935p4361386.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email