forked from jxlsteam/jxls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (63 loc) · 1.79 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
allprojects {
apply plugin: 'jacoco'
apply plugin: 'org.owasp.dependencycheck'
version = '2.12.0-SNAPSHOT'
group = 'org.jxls'
repositories {
mavenCentral()
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'windows-1252'
compileTestJava.options.encoding = 'windows-1252'
java {
withJavadocJar()
withSourcesJar()
}
if (findProperty('url') != null && findProperty('url') != '') {
publishing {
publications {
artifactory(MavenPublication) {
from components.java
}
}
repositories {
maven {
url = findProperty('url')
allowInsecureProtocol = true
credentials {
username findProperty('user')
password findProperty('pass')
}
}
}
}
}
test {
doFirst {
mkdir 'target'
}
}
}
task codeCoverageReport(type: JacocoReport) {
// Gather execution data from all subprojects
// (change this if you e.g. want to calculate unit test/integration test coverage separately)
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
// Add all relevant sourcesets from the subprojects
subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.enabled true
}
}
// always run the tests before generating the report
codeCoverageReport.dependsOn {
subprojects*.test
}