source: core/build.gradle @ 56c1739d

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

Gradle: Use plugins DSL where possible

  • Property mode set to 100644
File size: 1.7 KB
Line 
1plugins {
2    id 'java-library'
3    id 'scala'
4}
5
6archivesBaseName = 'i2p'
7
8sourceSets {
9    main {
10        java {
11            srcDir 'java/src'
12            exclude 'gnu/getopt'
13            exclude 'gnu/gettext'
14        }
15        resources {
16            srcDir 'java/src'
17            include 'gnu/getopt/*.properties'
18        }
19    }
20    test {
21        java {
22            srcDir 'java/test/junit'
23            exclude 'net/i2p/AllCoreTests.java'
24            exclude 'net/i2p/data/DataTestSuite.java'
25            exclude 'net/i2p/data/i2cp/I2CPTestSuite.java'
26            exclude {
27                it.name.endsWith('IT.java')
28            }
29        }
30        resources {
31            srcDir 'java/test/junit'
32            include 'resources/*'
33            include 'net/i2p/crypto/eddsa/test.data'
34            include 'net/i2p/crypto/eddsa/math/baseDblPrecmp'
35            include 'net/i2p/crypto/eddsa/math/basePrecmp'
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    sourceSets {
50        test {
51            scala {
52                srcDir 'java/test/scalatest'
53            }
54        }
55    }
56    task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
57        main = 'org.scalatest.tools.Runner'
58        args = ['-R', 'build/classes/scala/test', '-o']
59        classpath = sourceSets.test.runtimeClasspath
60    }
61    test.dependsOn scalaTest
62}
63
64configurations {
65    tests
66}
67task testJar(type: Jar) {
68    baseName = 'i2p-test'
69    dependsOn classes
70    from sourceSets.test.output
71}
72artifacts {
73    tests testJar
74}
Note: See TracBrowser for help on using the repository browser.