source: core/build.gradle @ f1df496

Last change on this file since f1df496 was 9f11188e, checked in by meeh <meeh@…>, 3 years ago

Started on scalatests for SU3File and CertUtil?.

  • 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'
[9f11188e]30            include 'resources/*'
[7662974]31            include 'net/i2p/crypto/eddsa/test.data'
32            include 'net/i2p/crypto/eddsa/math/baseDblPrecmp'
33            include 'net/i2p/crypto/eddsa/math/basePrecmp'
34        }
[da777c1]35    }
36}
37
[9be53ec]38dependencies {
39    implementation 'gnu.getopt:java-getopt:1.0.13'
40    implementation 'org.gnu.gettext:libintl:0.18.3'
[4512a94]41
42    testCompile "org.scala-lang:scala-library:2.12.4"
43    testCompile 'org.scalatest:scalatest_2.12:3.0.4'
44}
45
[5786560]46if (JavaVersion.current() != JavaVersion.VERSION_1_7) {
[46a3421]47    sourceSets {
48        test {
49            scala {
50                srcDir 'java/test/scalatest'
51            }
52        }
53    }
[5786560]54    task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
55        main = 'org.scalatest.tools.Runner'
56        args = ['-R', 'build/classes/scala/test', '-o']
57        classpath = sourceSets.test.runtimeClasspath
58    }
59    test.dependsOn scalaTest
[9be53ec]60}
61
[aa3ac754]62configurations {
63    tests
64}
65task testJar(type: Jar) {
66    baseName = 'i2p-test'
67    dependsOn classes
68    from sourceSets.test.output
69}
70artifacts {
71    tests testJar
[da777c1]72}
Note: See TracBrowser for help on using the repository browser.