source: core/build.gradle @ 96185d0

Last change on this file since 96185d0 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.7 KB
RevLine 
[3acb7a5]1apply plugin: 'java-library'
[4512a94]2apply plugin: 'scala'
[3acb7a5]3
[da777c1]4archivesBaseName = 'i2p'
5
6sourceSets {
7    main {
8        java {
9            srcDir 'java/src'
[9be53ec]10            exclude 'gnu/getopt'
11            exclude 'gnu/gettext'
[da777c1]12        }
[367ab28]13        resources {
14            srcDir 'java/src'
15            include 'gnu/getopt/*.properties'
16        }
[da777c1]17    }
18    test {
19        java {
20            srcDir 'java/test/junit'
[60efd0b]21            exclude 'net/i2p/AllCoreTests.java'
22            exclude 'net/i2p/data/DataTestSuite.java'
23            exclude 'net/i2p/data/i2cp/I2CPTestSuite.java'
[b6298dc]24            exclude {
25                it.name.endsWith('IT.java')
26            }
[da777c1]27        }
[7662974]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        }
[da777c1]34    }
35}
36
[9be53ec]37dependencies {
38    implementation 'gnu.getopt:java-getopt:1.0.13'
39    implementation 'org.gnu.gettext:libintl:0.18.3'
[4512a94]40
41    testCompile "org.scala-lang:scala-library:2.12.4"
42    testCompile 'org.scalatest:scalatest_2.12:3.0.4'
43}
44
[5786560]45if (JavaVersion.current() != JavaVersion.VERSION_1_7) {
[46a3421]46    sourceSets {
47        test {
48            scala {
49                srcDir 'java/test/scalatest'
50            }
51        }
52    }
[5786560]53    task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
54        main = 'org.scalatest.tools.Runner'
55        args = ['-R', 'build/classes/scala/test', '-o']
56        classpath = sourceSets.test.runtimeClasspath
57    }
58    test.dependsOn scalaTest
[9be53ec]59}
60
[aa3ac754]61configurations {
62    tests
63}
64task testJar(type: Jar) {
65    baseName = 'i2p-test'
66    dependsOn classes
67    from sourceSets.test.output
68}
69artifacts {
70    tests testJar
[da777c1]71}
Note: See TracBrowser for help on using the repository browser.