source: core/build.gradle @ 4ca12d1

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

Started on scalatests for SU3File and CertUtil?.

  • Property mode set to 100644
File size: 1.7 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 'resources/*'
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        }
35    }
36}
37
38dependencies {
39    implementation 'gnu.getopt:java-getopt:1.0.13'
40    implementation 'org.gnu.gettext:libintl:0.18.3'
41
42    testCompile "org.scala-lang:scala-library:2.12.4"
43    testCompile 'org.scalatest:scalatest_2.12:3.0.4'
44}
45
46if (JavaVersion.current() != JavaVersion.VERSION_1_7) {
47    sourceSets {
48        test {
49            scala {
50                srcDir 'java/test/scalatest'
51            }
52        }
53    }
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
60}
61
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
72}
Note: See TracBrowser for help on using the repository browser.