source: build.gradle @ a67ea4b

Last change on this file since a67ea4b was 7f673bb, checked in by str4d <str4d@…>, 3 years ago

Travis CI: Dynamically add SonarQube? plugin to build.gradle

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