-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathbuild.gradle
92 lines (78 loc) · 2.55 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
/*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'java'
id 'war'
id 'com.diffplug.gradle.spotless' version '3.27.1'
id 'net.ltgt.errorprone' version '1.1.1'
id 'org.gretty' version '3.0.1'
}
apply from: 'build-aws.gradle'
apply from: 'build-gcp.gradle'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
implementation 'org.jetbrains:annotations:13.0'
implementation 'com.google.actions:actions-on-google:1.8.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.protobuf:protobuf-java:3.10.0'
implementation 'com.google.protobuf:protobuf-java-util:3.10.0'
implementation 'com.google.firebase:firebase-admin:6.12.0'
implementation 'com.google.cloud:google-cloud-firestore:1.31.0'
implementation 'com.google.auth:google-auth-library-oauth2-http:0.18.0'
implementation 'com.google.api:api-common:1.8.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
testImplementation 'io.rest-assured:rest-assured:4.2.0'
testImplementation 'org.hamcrest:hamcrest:2.2'
errorprone 'com.google.errorprone:error_prone_core:2.3.4'
errorproneJavac 'com.google.errorprone:javac:9+181-r4173-1'
}
test {
if (project.hasProperty('restassuredBaseUri')) {
systemProperty 'restassuredBaseUri', project.restassuredBaseUri
}
useJUnitPlatform()
}
gretty {
integrationTestTask = 'test'
contextPath = '/'
}
spotless {
java {
googleJavaFormat()
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'
}
}
tasks.withType(JavaCompile).configureEach {
options.errorprone {
// TODO(proppy): Fix requires JDK 9+.
disable('DoubleBraceInitialization')
error('CatchAndPrintStackTrace')
error('SystemExitOutsideMain')
error('ModifiedButNotUsed')
error('UnusedMethod')
error('UnusedVariable')
}
}