Files
i2p.i2p/apps/i2psnark/build.gradle
2021-05-11 17:50:14 +00:00

64 lines
1.6 KiB
Groovy

plugins {
id 'war'
}
sourceSets {
main {
java {
srcDir 'java/src'
srcDir 'java/build/messages-src'
}
}
}
dependencies {
compile project(':core')
providedCompile 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,war
}
// 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 {
if (!(new File("$buildDir/classes/java/main/org/klomp/snark/web/messages_de.class")).exists())
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')
}