forked from I2P_Developers/i2p.i2p

Add resources to jars and wars remove .jsi and .jsp files from wars remove classes that are in jars from the wars for apps that have both compile jsps in routerconsole.war build routerconsole.jar
53 lines
1.2 KiB
Groovy
53 lines
1.2 KiB
Groovy
plugins {
|
|
id 'war'
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir 'java/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
|
|
}
|
|
|
|
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
|
|
}
|