-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
197 lines (163 loc) · 5.56 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
buildscript {
repositories {
maven {
url 'http://artifactory.bcbsfl.com/artifactory/libs-release'
}
maven {
url 'http://artifactory.bcbsfl.com/artifactory/maven-libs/'
}
maven {
url 'http://artifactory.bcbsfl.com/artifactory/gradle-test-libs-release'
}
maven {
url 'http://artifactory.bcbsfl.com/artifactory/plugins-gradle-org'
}
}
dependencies {
configurations.all {
exclude group: 'amazon', module: 'aws-java-sdk'
exclude group: 'com.thoughtworks.xstream', module: 'xstream'
exclude group: 'io.netty', module: 'netty-resolver-dns'
exclude group: 'com.squareup.okhttp', module: 'okhttp'
exclude group: 'com.google.protobuf', module: 'protobuf-java'
resolutionStrategy {
force 'net.java.dev.jna:jna:+'
force 'commons-beanutils:commons-beanutils:+'
force 'commons-collections:commons-collections:+'
force 'io.netty:netty-common:4.1.48.Final'
force 'io.netty:netty-transport:4.1.48.Final'
force 'io.netty:netty-codec:4.1.48.Final'
force 'io.netty:netty-codec-http:4.1.53.Final'
force 'io.netty:netty-codec-http2:4.1.48.Final'
force 'xerces:xercesImpl:2.12.0'
force 'org.apache.httpcomponents:httpclient-cache:+'
force 'net.java.dev.jna:jna-platform:+'
force 'com.amazonaws:aws-java-sdk-sqs:+'
force "org.apache.thrift:libthrift:+"
force "net.minidev:json-smart:+"
force "org.apache.logging.log4j:log4j-api:2.17.0"
force "org.apache.logging.log4j:log4j-core:2.17.0"
force "xerces:xercesImpl:2.12.2"
force "org.jetbrains.kotlin:kotlin-stdlib:1.6.10"
force "com.netflix.nebula:gradle-metrics-plugin:10.1.8"
force "org.mozilla:rhino:1.7.13"
force "com.google.protobuf:protobuf-java:3.13.0"
}
}
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:4.0.1'
classpath 'org.apache.ant:ant:1.9.7'
}
}
plugins {
id 'nebula.netflixoss' version '5.1.1'
id 'com.github.kt3k.coveralls' version '2.8.2'
}
// Establish version and status
ext.githubProjectName = rootProject.name // Change if github project name is not the same as the root project's name
apply plugin: 'project-report'
apply from: "$rootDir/versionsOfDependencies.gradle"
import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask
allprojects {
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'eclipse'
repositories {
maven {
url 'http://artifactory.bcbsfl.com/artifactory/libs-release'
}
maven {
url 'http://artifactory.bcbsfl.com/artifactory/maven-libs/'
}
maven {
url 'http://artifactory.bcbsfl.com/artifactory/gradle-test-libs-release'
}
maven {
url 'http://artifactory.bcbsfl.com/artifactory/plugins-gradle-org'
}
maven {
url 'http://artifactory.bcbsfl.com/artifactory/bintray-netflix-dyno/'
}
}
tasks.withType(ArtifactoryTask) {
skip = true
}
}
def javaProjects = subprojects.findAll {
it.name != "ui"
}
configure(javaProjects) {
apply plugin: 'nebula.netflixoss'
apply plugin: 'java'
apply plugin: 'project-report'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
testCompile "junit:junit:${revJUnit}"
testCompile("org.mockito:mockito-core:${revMockito}") {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
}
group = "com.netflix.${githubProjectName}"
tasks.withType(Test) {
maxParallelForks = 100
}
license {
excludes(['**/*.txt', '**/*.conf', '**/*.properties', '**/*.json', '**/swagger-ui/*'])
}
task licenseFormatTests (type:nl.javadude.gradle.plugins.license.License) {
source = fileTree(dir: "src/test").include("**/*")
}
licenseFormat.dependsOn licenseFormatTests
tasks.withType(Test) {
task ->
// set heap size for the test JVM(s)
minHeapSize = "256m"
maxHeapSize = "2g"
jacocoTestReport.executionData += files("$buildDir/jacoco/${task.name}.exec")
}
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
}
/**********************************
* Coverage Tasks
**********************************/
task codeCoverageReport(type: JacocoReport, group: "Coverage reports") {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
dependsOn subprojects*.test
subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.enabled = true
xml.destination new File("${buildDir}/reports/jacoco/report.xml")
html.enabled = true
html.destination new File("${buildDir}/reports/jacoco/html")
csv.enabled = false
}
afterEvaluate {
// Exclude generated files from top-level coverage report
classDirectories = files(
classDirectories.files.collect {
fileTree(
dir: it,
// Exclude es modules from code coverage reports
exclude: 'com/netflix/conductor/elasticsearch'
)
}
)
}
}
coveralls {
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${project.buildDir}/reports/jacoco/report.xml"
}
tasks.coveralls {
group = "Coverage reports"
description = "Uploads the aggregated coverage report to Coveralls"
dependsOn codeCoverageReport
}