source: build.gradle @ 7dae4eb

Last change on this file since 7dae4eb 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
RevLine 
[4512a94]1apply plugin: 'idea'
2
[36a313cc]3// Exclude apps/ dir itself, but include its subdirs
[19016ed]4def javaProjects = subprojects - project(':apps')
5
6configure(javaProjects) {
[da777c1]7    apply plugin: 'java'
[19016ed]8    apply plugin: 'jacoco'
[a3df4a3]9    apply plugin: 'eclipse'
[e011d60]10    apply plugin: 'idea'
[da777c1]11
[aa3ac754]12    repositories {
[041f547]13        jcenter()
[aa3ac754]14    }
15
16    dependencies {
17        testCompile 'junit:junit:4.+'
[c78af82]18        testCompile 'org.hamcrest:hamcrest-library:1.3'
[bf63947]19        testCompile 'org.mockito:mockito-core:2.11.0'
[aa3ac754]20    }
21
[da777c1]22    jar {
23        manifest {
[7b221fa]24            attributes 'Implementation-Version': '0.9.31-7'
[da777c1]25        }
26    }
[3eef793b]27
28    sourceCompatibility = 1.7
[49d970c]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    }
[da777c1]35}
[0bfe45be]36
[19016ed]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
[0bfe45be]58//apply from: file('gradle/update.gradle')
Note: See TracBrowser for help on using the repository browser.