source: apps/routerconsole/build.gradle @ 4512a94

Last change on this file since 4512a94 was 4512a94, checked in by str4d <str4d@…>, 4 years ago

Gradle: Run ScalaTest? tests in addition to the JUnit tests

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