-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
127 lines (109 loc) · 4.01 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
/* Copyright 2020 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.
*/
buildscript { // Configuration for building
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.google.cloud.tools:appengine-gradle-plugin:2.4.5'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
}
}
plugins {
// id 'com.github.sherter.google-java-format' version '0.8'
id "com.google.cloud.artifactregistry.gradle-plugin" version "2.1.5"
}
repositories { // repositories for Jar's you access in your code
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots' // SNAPSHOT repository (if needed)
}
mavenCentral()
}
repositories {
maven {
url "artifactregistry://us-maven.pkg.dev/fleetengine-gapic/maven"
}
}
apply plugin: 'java' // standard Java tasks
apply plugin: 'war' // standard Web Archive plugin
apply plugin: 'com.google.cloud.tools.appengine' // App Engine tasks
apply plugin: 'com.google.protobuf'
dependencies {
compileOnly 'com.google.appengine:appengine-api-1.0-sdk:2.0.26'
compileOnly 'javax.servlet:javax.servlet-api:3.1.0' // Use compileOnly for provided dependencies
compileOnly 'jstl:jstl:1.2'
// Add dependencies here
implementation 'com.google.maps:fleetengine-auth:1.11.0'
implementation 'com.google.api:gax:1.65.1'
implementation 'com.google.maps:gapic-google-maps-fleetengine-v1-java:0.0.197'
implementation 'com.auth0:java-jwt:3.10.2'
implementation 'com.google.inject:guice:5.1.0'
implementation 'com.google.inject.extensions:guice-servlet:5.1.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.google.auto.value:auto-value-annotations:1.6.2'
implementation 'com.google.guava:guava:30.1-jre'
implementation 'io.grpc:grpc-protobuf:1.28.0'
implementation 'io.grpc:grpc-stub:1.28.0'
implementation 'io.grpc:grpc-netty:1.28.0'
implementation 'javax.ws.rs:jsr311-api:1.1.1'
implementation 'com.google.protobuf:protobuf-java:3.25.3'
implementation 'javax.annotation:javax.annotation-api:1.2'
annotationProcessor 'com.google.auto.value:auto-value:1.6.2'
testImplementation 'junit:junit:4.12'
testImplementation 'com.google.truth:truth:0.33'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'com.google.appengine:appengine-testing:+'
testImplementation 'com.google.appengine:appengine-api-stubs:+'
testImplementation 'com.google.appengine:appengine-tools-sdk:+'
}
configurations.all {
withDependencies {
resolutionStrategy.eachDependency {
if (it.requested.group == 'com.google.guava' && it.requested.name == 'guava') {
it.useTarget("com.google.guava:guava:30.1-jre")
}
}
}
}
// Always run unit tests
appengineDeploy.dependsOn test
appengineStage.dependsOn test
appengine { // App Engine tasks configuration
run {
automaticRestart = true
}
deploy { // deploy configuration
projectId = 'YOUR-CLOUD-PROJECT'
version = '1'
}
}
test {
useJUnit()
testLogging.showStandardStreams = true
beforeTest { descriptor ->
logger.lifecycle("test: " + descriptor + " Running")
}
onOutput { descriptor, event ->
logger.lifecycle("test: " + descriptor + ": " + event.message )
}
afterTest { descriptor, result ->
logger.lifecycle("test: " + descriptor + ": " + result )
}
}
group = "com.example.appenginej11" // Generated output GroupId
version = "1.0-SNAPSHOT" // Version in generated output
sourceCompatibility = 11
targetCompatibility = 11