source: apps/routerconsole/build.gradle @ 2de36ee

Last change on this file since 2de36ee was 46a3421, checked in by str4d <str4d@…>, 3 years ago

Don't compile ScalaTests? on Java 7

  • Property mode set to 100644
File size: 1.8 KB
Line 
1apply plugin: 'war'
2apply plugin: 'scala'
3
4sourceSets {
5    main {
6        java {
7            srcDir 'java/src'
8        }
9    }
10}
11
12dependencies {
13    compile project(':core')
14    compile project(':router')
15    compile project(':installer')
16    providedCompile project(':apps:desktopgui')
17    providedCompile project(':apps:systray')
18    providedCompile project(':apps:jetty')
19    providedCompile project(':apps:jrobin')
20
21    testCompile "org.scala-lang:scala-library:2.12.4"
22    testCompile 'org.scalatest:scalatest_2.12:3.0.4'
23}
24
25if (JavaVersion.current() != JavaVersion.VERSION_1_7) {
26    sourceSets {
27        test {
28            scala {
29                srcDir 'java/test/scalatest'
30            }
31        }
32    }
33    task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
34        main = 'org.scalatest.tools.Runner'
35        args = ['-R', 'build/classes/scala/test', '-o']
36        classpath = sourceSets.test.runtimeClasspath
37    }
38    test.dependsOn scalaTest
39}
40
41jar {
42    manifest {
43        // Top level installer will rename to jrobin.jar
44        // DTG added in 0.8.4, not in the classpath for very old installs,
45        // before we changed wrapper.config to specify *
46        // very old installs don't have i2psnark,jstl,standard in the classpath...
47        // not added in WebAppConfiguration any more
48        // All new jetty 7 jars should have been in 0.9.6, added in 0.9.7
49        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'
50    }
51}
52
53war {
54    from 'jsp'
55    // Remove classes from the classpath, they are in the jar.
56    // If we return to precompiling jsps this needs to change.
57    classpath = []
58    webXml = file('jsp/web.xml')
59}
Note: See TracBrowser for help on using the repository browser.