-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
107 lines (96 loc) · 2.71 KB
/
build.gradle
File metadata and controls
107 lines (96 loc) · 2.71 KB
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
plugins {
id 'eclipse'
id 'idea'
id 'java-library'
id 'jacoco'
id 'checkstyle'
id 'maven-publish'
id "org.sonarqube" version "2.8"
id "com.github.spotbugs" version "2.0.1"
id "com.bnc.gradle.travis-ci-versioner" version "1.1.0"
}
group = 'com.bnc'
sourceCompatibility = JavaVersion.VERSION_13
targetCompatibility = JavaVersion.VERSION_13
compileJava.options.encoding = "UTF-8"
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
}
repositories {
mavenCentral()
jcenter()
maven {
url "s3://artifact.bravenewcoin.com/maven/release"
credentials(AwsCredentials) {
accessKey "${awsAccessKeyId}"
secretKey "${awsSecretAccessKey}"
if (awsSessionToken) {
sessionToken "${awsSessionToken}"
}
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
url "s3://artifact.bravenewcoin.com/maven/${project.version.endsWith('-SNAPSHOT') ? 'snapshot' : 'release'}"
credentials(AwsCredentials) {
accessKey "${awsAccessKeyId}"
secretKey "${awsSecretAccessKey}"
if (awsSessionToken) {
sessionToken "${awsSessionToken}"
}
}
}
}
}
sonarqube {
properties {
property "sonar.projectKey", "${rootProject.name}"
}
}
spotbugs {
toolVersion = '4.0.0-beta4'
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}
}
jacoco {
toolVersion = "0.8.5"
}
checkstyle {
toolVersion '8.23'
tasks.withType(Checkstyle) {
reports {
xml.enabled false
html.enabled true
}
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
dependencies {
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.5.2'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.14.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.1.0'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.1.0'
testRuntime group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.5.2'
}