plugins { id 'war' } sourceSets { main { java { srcDir 'java/src' srcDir 'java/build/messages-src' } } } dependencies { compile project(':core') compile project(':apps:systray') compile 'gnu.getopt:java-getopt:1.0.13' providedCompile project(':apps:ministreaming') providedCompile project(':apps:jetty') } task i2psnarkJar(type: Jar) { from sourceSets.main.output exclude 'org/klomp/snark/standalone/**' exclude 'org/klomp/snark/web/**' manifest { attributes 'Main-Class': 'org.klomp.snark.Snark' attributes 'Class-Path': 'i2p.jar mstreaming.jar streaming.jar' } } // TODO: standalone jar. This is rather involved! artifacts { archives i2psnarkJar } // Create the java files from the po files. The jar task will compile them. // This requires gettext 0.19 or higher. // We don't support the "slow way" task bundle { doLast { println "apps/i2psnark/java/bundle-messages.sh".execute().text } } war.dependsOn bundle war { rootSpec.exclude('/org/klomp/snark/*.class') rootSpec.exclude('/org/klomp/snark/bencode/**') rootSpec.exclude('/org/klomp/snark/comments/**') rootSpec.exclude('/org/klomp/snark/dht/**') rootSpec.exclude('/org/klomp/snark/standalone/**') from ('resources', { into ".resources" }) webInf { into 'classes/org/klomp/snark/web' from 'mime.properties' } webXml = file('web.xml') // TODO why is this in there? WEB-INF/lib/systray.jar }