source: build.gradle @ f9eaf41

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

Enable SonarCloud? in Travis CI

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