source: core/build.gradle @ 5786560

Last change on this file since 5786560 was 5786560, checked in by str4d <str4d@…>, 3 years ago

Don't run ScalaTests? on Java 7

  • Property mode set to 100644
File size: 1.6 KB
Line 
1apply plugin: 'java-library'
2apply plugin: 'scala'
3
4archivesBaseName = 'i2p'
5
6sourceSets {
7    main {
8        java {
9            srcDir 'java/src'
10            exclude 'gnu/getopt'
11            exclude 'gnu/gettext'
12        }
13        resources {
14            srcDir 'java/src'
15            include 'gnu/getopt/*.properties'
16        }
17    }
18    test {
19        java {
20            srcDir 'java/test/junit'
21            exclude 'net/i2p/AllCoreTests.java'
22            exclude 'net/i2p/data/DataTestSuite.java'
23            exclude 'net/i2p/data/i2cp/I2CPTestSuite.java'
24            exclude {
25                it.name.endsWith('IT.java')
26            }
27        }
28        resources {
29            srcDir 'java/test/junit'
30            include 'net/i2p/crypto/eddsa/test.data'
31            include 'net/i2p/crypto/eddsa/math/baseDblPrecmp'
32            include 'net/i2p/crypto/eddsa/math/basePrecmp'
33        }
34        scala {
35            srcDir 'java/test/scalatest'
36        }
37    }
38}
39
40dependencies {
41    implementation 'gnu.getopt:java-getopt:1.0.13'
42    implementation 'org.gnu.gettext:libintl:0.18.3'
43
44    testCompile "org.scala-lang:scala-library:2.12.4"
45    testCompile 'org.scalatest:scalatest_2.12:3.0.4'
46}
47
48if (JavaVersion.current() != JavaVersion.VERSION_1_7) {
49    task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
50        main = 'org.scalatest.tools.Runner'
51        args = ['-R', 'build/classes/scala/test', '-o']
52        classpath = sourceSets.test.runtimeClasspath
53    }
54    test.dependsOn scalaTest
55}
56
57configurations {
58    tests
59}
60task testJar(type: Jar) {
61    baseName = 'i2p-test'
62    dependsOn classes
63    from sourceSets.test.output
64}
65artifacts {
66    tests testJar
67}
Note: See TracBrowser for help on using the repository browser.