2019-02-17 01:27:05 +00:00
|
|
|
plugins {
|
|
|
|
id 'war'
|
|
|
|
}
|
2014-06-25 02:04:06 +00:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
srcDir 'java/src'
|
2021-01-03 09:55:42 -05:00
|
|
|
srcDir 'java/build/messages-src'
|
2021-01-03 09:08:21 -05:00
|
|
|
srcDir 'java/build/messages-proxy-src'
|
2014-06-25 02:04:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
test {
|
|
|
|
java {
|
|
|
|
srcDir 'java/test/junit'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2017-11-03 00:11:51 +00:00
|
|
|
compile project(':core')
|
|
|
|
compile project(':apps:ministreaming')
|
2017-11-27 15:36:09 +00:00
|
|
|
compile 'gnu.getopt:java-getopt:1.0.13'
|
2014-06-25 02:04:06 +00:00
|
|
|
providedCompile project(':apps:jetty')
|
|
|
|
}
|
|
|
|
|
2021-01-03 09:08:21 -05:00
|
|
|
// 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 bundleProxy {
|
|
|
|
doLast {
|
|
|
|
println "apps/i2ptunnel/java/bundle-messages-proxy.sh".execute().text
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-03 09:55:42 -05:00
|
|
|
task bundle {
|
|
|
|
doLast {
|
|
|
|
println "apps/i2ptunnel/java/bundle-messages.sh".execute().text
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-26 00:00:38 +00:00
|
|
|
task i2ptunnelJar(type: Jar) {
|
2017-11-03 00:11:51 +00:00
|
|
|
from sourceSets.main.output
|
2021-01-03 09:55:42 -05:00
|
|
|
exclude '**/web/*.class'
|
2017-11-03 00:11:51 +00:00
|
|
|
exclude '**/ui/*.class'
|
|
|
|
exclude '**/EditBean.class'
|
|
|
|
exclude '**/IndexBean.class'
|
2014-06-26 00:00:38 +00:00
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class': 'net.i2p.i2ptunnel.I2PTunnel'
|
|
|
|
attributes 'Class-Path': 'i2p.jar mstreaming.jar'
|
|
|
|
}
|
2021-01-01 10:17:00 -05:00
|
|
|
from ('resources', {
|
|
|
|
into "net/i2p/i2ptunnel/resources"
|
|
|
|
})
|
|
|
|
from ('../routerconsole/jsp', {
|
|
|
|
include 'themes/console/*/*.css'
|
|
|
|
include 'themes/console/images/i2plogo.png'
|
|
|
|
include 'themes/console/images/favicon.ico'
|
|
|
|
include 'themes/console/images/itoopie_sm.png'
|
|
|
|
into "net/i2p/i2ptunnel/resources"
|
|
|
|
})
|
2014-06-26 00:00:38 +00:00
|
|
|
}
|
2021-01-03 09:08:21 -05:00
|
|
|
i2ptunnelJar.dependsOn bundleProxy
|
2021-01-03 09:55:42 -05:00
|
|
|
war.dependsOn bundle
|
2014-06-26 00:00:38 +00:00
|
|
|
|
2021-01-03 09:55:42 -05:00
|
|
|
// not needed unless we're building for both android and regular
|
2017-11-03 00:11:51 +00:00
|
|
|
task tempBeansJar(type: Jar) {
|
|
|
|
from sourceSets.main.output
|
|
|
|
include '**/EditBean.class'
|
|
|
|
include '**/ui/*.class'
|
|
|
|
include '**/IndexBean.class'
|
|
|
|
baseName = 'temp-beans'
|
|
|
|
}
|
|
|
|
|
2021-01-03 09:55:42 -05:00
|
|
|
// only for android
|
2017-11-03 00:11:51 +00:00
|
|
|
task uiJar(type: Jar) {
|
2017-11-03 00:33:09 +00:00
|
|
|
baseName = 'i2ptunnel-ui'
|
2017-11-03 00:11:51 +00:00
|
|
|
from sourceSets.main.output
|
|
|
|
include '**/ui/*.class'
|
|
|
|
manifest {
|
|
|
|
attributes 'Class-Path' : 'i2p.jar mstreaming.jar i2ptunnel.jar'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-26 00:00:38 +00:00
|
|
|
artifacts {
|
2021-01-03 09:55:42 -05:00
|
|
|
archives i2ptunnelJar //, tempBeansJar, uiJar
|
2014-06-26 00:00:38 +00:00
|
|
|
}
|
|
|
|
|
2014-06-25 02:04:06 +00:00
|
|
|
war {
|
2021-01-03 09:55:42 -05:00
|
|
|
include '**/EditBean.class'
|
|
|
|
include '**/ui/*.class'
|
|
|
|
include '**/IndexBean.class'
|
2014-06-25 02:04:06 +00:00
|
|
|
from 'jsp'
|
2021-01-01 10:17:00 -05:00
|
|
|
rootSpec.exclude('/net/i2p/i2ptunnel/*.class')
|
|
|
|
rootSpec.exclude('/net/i2p/i2ptunnel/access')
|
|
|
|
rootSpec.exclude('/net/i2p/i2ptunnel/irc')
|
|
|
|
rootSpec.exclude('/net/i2p/i2ptunnel/localServer')
|
2021-01-03 09:55:42 -05:00
|
|
|
rootSpec.exclude('/net/i2p/i2ptunnel/proxy')
|
2021-01-01 10:17:00 -05:00
|
|
|
rootSpec.exclude('/net/i2p/i2ptunnel/socks')
|
|
|
|
rootSpec.exclude('/net/i2p/i2ptunnel/streamr')
|
|
|
|
rootSpec.exclude('/net/i2p/i2ptunnel/udp')
|
|
|
|
rootSpec.exclude('/net/i2p/i2ptunnel/udpTunnel')
|
2014-06-25 02:04:06 +00:00
|
|
|
exclude 'jsp/web.xml'
|
2021-01-01 10:17:00 -05:00
|
|
|
exclude '*.jsi'
|
|
|
|
exclude '*.jsp'
|
2014-06-25 02:04:06 +00:00
|
|
|
webXml = file('jsp/web.xml')
|
2021-01-01 10:17:00 -05:00
|
|
|
// FIXME why is this in there? WEB-INF/lib/mstreaming.jar
|
2014-06-25 02:04:06 +00:00
|
|
|
}
|
2017-11-03 00:11:51 +00:00
|
|
|
|