// I am not convinced packaging of examples should be a separate project... Seems more logical to // move it to just the packaging project (?). Let's leave it for now though. configurations { packaging postJar dih } dependencies { postJar project(path: ":solr:core", configuration: "postJar") dih 'org.hsqldb:hsqldb' dih 'org.apache.derby:derby' } ext { packagingDir = file("${buildDir}/packaging") } task assemblePackaging(type: Sync) { from(projectDir, { include "example-DIH/**" include "exampledocs/**" include "files/**" include "films/**" include "README.txt" exclude "**/*.jar" }) from(configurations.postJar, { into "exampledocs/" }) from(configurations.dih, { into "example-DIH/solr/db/lib" }) into packagingDir } artifacts { packaging packagingDir, { builtBy assemblePackaging } }