-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
103 lines (90 loc) · 2.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
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
plugins {
id 'eclipse'
id 'idea'
id "org.sonarqube" version "2.8" apply false
id "com.github.spotbugs" version "3.0.0" apply false
id "com.bnc.gradle.travis-ci-versioner" version "1.1.1"
}
ext {
awsAccessKeyId = properties.containsKey('AWS_ACCESS_KEY_ID') ? AWS_ACCESS_KEY_ID : System.getenv('AWS_ACCESS_KEY_ID')
awsSecretAccessKey = properties.containsKey('AWS_SECRET_ACCESS_KEY') ? AWS_SECRET_ACCESS_KEY : System.getenv('AWS_SECRET_ACCESS_KEY')
awsSessionToken = System.getenv('AWS_SESSION_TOKEN')
}
travisVersioner {
major 0
minor 0
}
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs'
apply plugin: 'org.sonarqube'
group = 'com.bnc'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
repositories {
mavenCentral()
jcenter()
maven {
// This repository is only used for Brave New Coin artifacts. It is not required to build this project.
url "s3://artifact.bravenewcoin.com/maven/release"
content {
includeGroup "com.bnc"
}
credentials(AwsCredentials) {
accessKey "${awsAccessKeyId}"
secretKey "${awsSecretAccessKey}"
if (awsSessionToken) {
sessionToken "${awsSessionToken}"
}
}
}
}
spotbugs {
toolVersion = '4.0.0-beta5'
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}
}
jacoco {
toolVersion = "0.8.5"
}
jacocoTestReport {
reports {
xml.enabled true
}
}
checkstyle {
toolVersion '8.28'
tasks.withType(Checkstyle) {
reports {
xml.enabled false
html.enabled true
}
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
dependencies {
implementation group: 'com.bnc', name: 'market-data-api', version: '0.2.10'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.6.0'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.14.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.2.4'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.2.4'
}
}
sonarqube {
properties {
property "sonar.projectKey", "${rootProject.name}"
}
}