-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathbuild.gradle
More file actions
170 lines (148 loc) · 5.43 KB
/
build.gradle
File metadata and controls
170 lines (148 loc) · 5.43 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
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
buildscript {
ext.versions = [
'enjinCommons' : '0.3.0-SNAPSHOT',
'gson' : '2.8.5',
'pusher' : '2.0.1',
'okhttp' : '4.2.0',
'retrofit' : '2.6.2',
'supportOptional' : '1.2',
'lombok' : '1.18.6',
'junit' : '4.12',
'mockWebServer' : '4.2.0',
'truth' : '1.0',
'awaitility' : '4.0.1',
'toStringVerifier': '1.4.5',
'equalsVerifier' : '3.1.10',
'mockito' : '3.0.0',
'powermock' : '2.0.2'
]
ext.deps = [
'enjinCommons' : "com.enjin:java_commons:${versions.enjinCommons}",
'gson' : "com.google.code.gson:gson:${versions.gson}",
'pusher' : "com.pusher:pusher-java-client:${versions.pusher}",
'okhttp' : "com.squareup.okhttp3:okhttp:${versions.okhttp}",
'okhttpLoggingInterceptor': "com.squareup.okhttp3:logging-interceptor:${versions.okhttp}",
'okhttpUrlConnection' : "com.squareup.okhttp3:okhttp-urlconnection:${versions.okhttp}",
'retrofit' : "com.squareup.retrofit2:retrofit:${versions.retrofit}",
'retrofitGson' : "com.squareup.retrofit2:converter-gson:${versions.retrofit}",
'supportOptional' : "com.github.dmstocking:support-optional:${versions.supportOptional}",
'junit' : "junit:junit:${versions.junit}",
'mockWebServer' : "com.squareup.okhttp3:mockwebserver:${versions.mockWebServer}",
'truth' : "com.google.truth:truth:${versions.truth}",
'awaitility' : "org.awaitility:awaitility:${versions.awaitility}",
'toStringVerifier' : "com.jparams:to-string-verifier:${versions.toStringVerifier}",
'equalsVerifier' : "nl.jqno.equalsverifier:equalsverifier:${versions.equalsVerifier}",
'mockito' : "org.mockito:mockito-core:${versions.mockito}",
'powermockJunit4' : "org.powermock:powermock-module-junit4:${versions.powermock}",
'powermockMockito2' : "org.powermock:powermock-api-mockito2:${versions.powermock}"
]
ext.local = new Properties()
File file = project.rootProject.file('local.properties')
if (file.exists()) local.load(file.newDataInputStream())
repositories {
mavenCentral()
jcenter()
gradlePluginPortal()
}
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.8.0'
classpath 'org.ajoberstar:gradle-git-publish:2.1.1'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:3.24.3'
}
}
plugins {
id 'io.freefair.lombok' version '4.1.1'
id 'com.github.johnrengelman.shadow' version '5.0.0'
id 'com.bmuschko.nexus' version '2.3.1'
id 'io.codearte.nexus-staging' version '0.21.1'
id 'net.ltgt.errorprone' version '0.8.1'
id 'jacoco'
id 'org.sonarqube' version '2.7.1'
id 'checkstyle'
id 'com.github.ben-manes.versions' version '0.25.0'
}
sonarqube {
properties {
property 'sonar.sourceEncoding', 'UTF-8'
}
}
allprojects {
apply from: "${rootProject.rootDir}/gradle/spotless.gradle"
group = GROUP
version = VERSION_NAME
repositories {
jcenter()
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/groups/public/'
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven'
apply plugin: 'io.freefair.lombok'
apply plugin: 'net.ltgt.errorprone'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
apply from: "${rootProject.rootDir}/gradle/deploy.gradle"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile).configureEach {
options.errorprone {
enabled = JavaVersion.current() < JavaVersion.VERSION_12
disable('UnusedVariable')
}
}
javadoc {
dependsOn delombok
source = delombok.target
// exclude any implementation packages
exclude '**/impl/**'
// exclude any implementation classes
exclude '**/*Impl.java'
}
artifacts {
archives shadowJar
}
lombok {
config['lombok.addLombokGeneratedAnnotation'] = 'false'
}
test {
reports {
html.enabled = false
}
}
jacoco {
toolVersion = '0.8.4'
}
jacocoTestReport {
reports {
xml.enabled = true
html.destination file("${buildDir}/reports/tests/test")
}
}
sonarqube {
properties {
property 'sonar.sources', 'src'
property 'sonar.exclusions', '**/*{!.java},**/build/**,**/test/**'
property 'sonar.jacoco.xmlReportsPath', 'build/reports/jacoco/jacocoTestReport.xml'
}
}
checkstyle {
toolVersion = '8.24'
sourceSets = [project.sourceSets.main]
}
tasks.withType(Checkstyle) {
reports {
xml.enabled false
html.enabled true
}
}
}
wrapper {
gradleVersion = '5.6.2'
distributionType = Wrapper.DistributionType.ALL
}