2014-06-24 22:48:05 +00:00
|
|
|
apply plugin: 'war'
|
2017-12-09 01:43:09 +00:00
|
|
|
apply plugin: 'scala'
|
2014-06-24 22:48:05 +00:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
srcDir 'java/src'
|
|
|
|
}
|
|
|
|
}
|
2017-12-09 01:43:09 +00:00
|
|
|
test {
|
|
|
|
scala {
|
|
|
|
srcDir 'java/test/scalatest'
|
|
|
|
}
|
|
|
|
}
|
2014-06-24 22:48:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(':core')
|
|
|
|
compile project(':router')
|
2014-06-24 23:26:51 +00:00
|
|
|
compile project(':installer')
|
|
|
|
providedCompile project(':apps:desktopgui')
|
|
|
|
providedCompile project(':apps:systray')
|
2014-06-24 22:48:05 +00:00
|
|
|
providedCompile project(':apps:jetty')
|
2017-10-31 07:16:07 +00:00
|
|
|
providedCompile project(':apps:jrobin')
|
2017-12-09 01:43:09 +00:00
|
|
|
|
|
|
|
testCompile "org.scala-lang:scala-library:2.12.4"
|
|
|
|
testCompile 'org.scalatest:scalatest_2.12:3.0.4'
|
|
|
|
}
|
|
|
|
|
2017-12-09 02:28:01 +00:00
|
|
|
if (JavaVersion.current() != JavaVersion.VERSION_1_7) {
|
|
|
|
task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
|
|
|
|
main = 'org.scalatest.tools.Runner'
|
|
|
|
args = ['-R', 'build/classes/scala/test', '-o']
|
|
|
|
classpath = sourceSets.test.runtimeClasspath
|
|
|
|
}
|
|
|
|
test.dependsOn scalaTest
|
2014-06-24 22:48:05 +00:00
|
|
|
}
|
|
|
|
|
2014-06-26 22:37:42 +00:00
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
// Top level installer will rename to jrobin.jar
|
|
|
|
// DTG added in 0.8.4, not in the classpath for very old installs,
|
|
|
|
// before we changed wrapper.config to specify *
|
|
|
|
// very old installs don't have i2psnark,jstl,standard in the classpath...
|
|
|
|
// not added in WebAppConfiguration any more
|
|
|
|
// All new jetty 7 jars should have been in 0.9.6, added in 0.9.7
|
|
|
|
attributes 'Class-Path': 'i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar jetty-continuation.jar jetty-http.jar jetty-io.jar jetty-security.jar jetty-servlet.jar jetty-servlets.jar jetty-util.jar jetty-webapp.jar'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-24 22:48:05 +00:00
|
|
|
war {
|
|
|
|
from 'jsp'
|
2014-06-26 22:37:42 +00:00
|
|
|
// Remove classes from the classpath, they are in the jar.
|
|
|
|
// If we return to precompiling jsps this needs to change.
|
|
|
|
classpath = []
|
2014-06-24 22:48:05 +00:00
|
|
|
webXml = file('jsp/web.xml')
|
|
|
|
}
|