source: build.gradle @ f221e72

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

Gradle: Run ScalaTest? tests in addition to the JUnit tests

  • Property mode set to 100644
File size: 1.6 KB
Line 
1apply plugin: 'idea'
2
3// Exclude apps/ dir itself, but include its subdirs
4def javaProjects = subprojects - project(':apps')
5
6configure(javaProjects) {
7    apply plugin: 'java'
8    apply plugin: 'jacoco'
9    apply plugin: 'eclipse'
10    apply plugin: 'idea'
11
12    repositories {
13        jcenter()
14    }
15
16    dependencies {
17        testCompile 'junit:junit:4.+'
18        testCompile 'org.hamcrest:hamcrest-library:1.3'
19        testCompile 'org.mockito:mockito-core:2.11.0'
20    }
21
22    jar {
23        manifest {
24            attributes 'Implementation-Version': '0.9.31-7'
25        }
26    }
27
28    sourceCompatibility = 1.7
29    // Set i2pBootClasspath=/path/to/rt.jar:/path/to/jce.jar in ~/.gradle/gradle.properties if needed
30    if (i2pBootClasspath) {
31        tasks.withType(AbstractCompile, { AbstractCompile ac ->
32            ac.options.bootstrapClasspath = files(i2pBootClasspath)
33        })
34    }
35}
36
37task codeCoverageReport(type: JacocoReport) {
38    dependsOn(javaProjects.test)
39
40    jacocoClasspath = project(':core').configurations.jacocoAnt
41    additionalSourceDirs = files(javaProjects.sourceSets.main.allSource.srcDirs)
42    sourceDirectories = files(javaProjects.sourceSets.main.allSource.srcDirs)
43    classDirectories = files(javaProjects.sourceSets.main.output)
44    executionData = files(javaProjects.jacocoTestReport.executionData)
45
46    doFirst {
47        executionData = files(executionData.findAll { it.exists() })
48    }
49
50    reports {
51        xml.enabled true
52        xml.destination "${buildDir}/reports/jacoco/report.xml"
53        html.enabled true
54        html.destination "${buildDir}/reports/jacoco/html"
55    }
56}
57
58//apply from: file('gradle/update.gradle')
Note: See TracBrowser for help on using the repository browser.