forked from springfox/springfox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
133 lines (108 loc) · 3.32 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
jcenter()
}
dependencies {
classpath "com.github.adrianbk:gradle-jvmsrc-plugin:0.6.1"
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2"
classpath "com.github.adrianbk:gradle-travisci-trigger-plugin:1.0.0"
classpath 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.2'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.7.5"
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.8.1"
classpath "org.ajoberstar:gradle-git:1.7.2"
classpath 'org.ajoberstar:gradle-git-publish:1.0.1'
}
}
apply from: "$rootDir/gradle/dependencies.gradle"
apply from: "$rootDir/gradle/ide.gradle"
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'build-dashboard'
apply plugin: 'project-report'
apply plugin: 'springfox-multi-release'
ext {
apiKey = System.getenv('GIT_HUB_API_KEY')
jdkVersion = 1.8
}
allprojects {
apply plugin: 'jacoco'
}
subprojects {
//Not strictly groovy projects but useful for the IDE to recognise groovy test sources
apply plugin: 'groovy' //gradle groovy plugin extends the java plugin
apply plugin: 'com.github.adrianbk.jvmsrc'
apply plugin: 'checkstyle'
javadoc {
options.encoding = 'UTF-8'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.deprecation = true
options.compilerArgs += ["-Xlint:unchecked", "-Xlint:deprecation", "-parameters"]
}
//Commented PMD and Findbugs as its taking too much time for very little value
//Perhaps run every 20 CI builds (mod of ci build number)
// apply from: "$rootDir/gradle/code-quality.gradle"
if (springfox.gradlebuild.utils.ProjectDefinitions.publishable(it)) {
apply from: "$rootDir/gradle/publishing.gradle"
}
repositories {
jcenter()
}
checkstyle {
configFile = file("$rootDir/config/checkstyle.xml")
}
checkstyleMain.source = "src/main/java"
test {
maxParallelForks = 2
}
configurations {
provided
compile.extendsFrom provided
}
jvmsrc {
packageName "springfox"
}
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
group = 'io.springfox'
version = project.rootProject.version
task allDeps(type: DependencyReportTask) {}
jacoco {
toolVersion = "$jacocoVersion"
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
test {
jvmArgs "-Dorg.spockframework.mock.ignoreByteBuddy=true"
}
}
apply from: "$rootDir/gradle/documentation.gradle"
wrapper {
gradleVersion = '4.10.1'
}
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
xml.destination file("${buildDir}/reports/jacoco/report.xml")
html.enabled false
csv.enabled false
}
}
// always run the tests before generating the report
codeCoverageReport.dependsOn {
subprojects*.test
}