forked from Netflix/photon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
129 lines (112 loc) · 3.19 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE"
}
}
plugins {
id 'nebula.netflixoss' version '8.8.1'
id 'java'
id 'pmd'
id 'com.github.spotbugs' version "4.4.4"
id 'jacoco'
}
apply plugin: "io.spring.dependency-management"
group = 'com.netflix.photon'
repositories {
mavenCentral()
jcenter()
/**
* Following represents the location of SNAPSHOTS of RegXMLLib. It should be enabled only when
* necessary to verify changes to the library that are not yet committed to Maven Central.
*/
/*maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}*/
}
spotbugsMain {
enabled = true
excludeFilter = file("codequality/findbugs-excludeFilter-GeneratedCode.xml")
reports {
xml.enabled = false
html.enabled = true
}
}
spotbugsTest {
enabled = false
}
pmd {
ignoreFailures = false
ruleSets = [] // This overwrites the rules that are being added
ruleSetFiles = files("${project.rootDir}/codequality/pmd/ruleset.xml")
}
sourceSets {
main {
java {
srcDir 'generated'
}
}
}
javadoc {
/**
* Following suppresses creation of javadoc for auto-generated code
*/
exclude "**/org/smpte_ra/schemas/**"
exclude "**/org/w3/_2000/_09/xmldsig_/**"
}
dependencies {
compileOnly "com.github.spotbugs:spotbugs-annotations:${spotbugs.toolVersion.get()}"
implementation "org.slf4j:slf4j-api:2.0.3"
implementation "org.slf4j:slf4j-log4j12:2.0.3"
//noinspection GradlePackageVersionRange
implementation platform('software.amazon.awssdk:bom:2.17.+')
implementation 'software.amazon.awssdk:s3'
implementation 'software.amazon.awssdk:sts'
/**
* Following includes the RegXMLLib dependency from Maven Central.
*/
implementation "com.sandflow:regxmllib:1.1.3"
/**
* Following should be enabled and the above should be disabled
* when necessary to verify changes to the RegXMLLib library that are
* not yet committed to Maven Central.
*/
/*compile "com.sandflow:regxmllib:${revRegXMLSNAPSHOT}"*/
testImplementation "org.mockito:mockito-core:3.3+"
testImplementation 'org.testng:testng:7.4.+'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
test {
useTestNG()
testLogging {
events 'started', 'skipped', 'passed', 'failed'
}
}
/**
* This task should include all the dependencies as a part of the build process
*/
task getDependencies(type: Copy) {
from sourceSets.main.runtimeClasspath
into 'build/libs/'
}
task fatJar(type: Jar) {
archiveBaseName.set('photon')
archiveVersion.set('4.9.2')
archiveClassifier.set('phat')
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
//Following line will enable including compile time dependencies as a part of the
//compile and build process.
//assemble.dependsOn getDependencies