-
Notifications
You must be signed in to change notification settings - Fork 559
/
firebase-firestore.gradle
148 lines (134 loc) · 4.9 KB
/
firebase-firestore.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// Copyright 2018 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
//
// http://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 'firebase-library'
id 'com.google.protobuf'
}
firebaseLibrary {
testLab.enabled = true
publishJavadoc = true
}
protobuf {
// Configure the protoc executable
protoc {
// Download from repositories
artifact = 'com.google.protobuf:protoc:3.4.0'
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.16.1'
}
javalite {
// The codegen for lite comes as a separate artifact
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
// In most cases you don't need the full Java output
// if you use the lite output.
remove java
}
task.plugins {
grpc {
option 'lite'
}
javalite {}
}
}
}
}
android {
adbOptions {
timeOutInMs 60 * 1000
}
compileSdkVersion project.targetSdkVersion
defaultConfig {
targetSdkVersion project.targetSdkVersion
minSdkVersion project.minSdkVersion
versionName version
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
sourceSets {
main {
proto {
srcDir 'src/proto'
}
java {
}
}
test {
java {
srcDir 'src/testUtil/java'
srcDir 'src/roboUtil/java'
}
}
androidTest {
java {
srcDir 'src/testUtil/java'
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
testOptions.unitTests.includeAndroidResources = true
}
dependencies {
implementation project(':firebase-common')
implementation project(':protolite-well-known-types')
implementation project(':firebase-database-collection')
//To provide @Generated annotations
compileOnly 'javax.annotation:jsr250-api:1.0'
implementation 'io.grpc:grpc-stub:1.16.1'
implementation 'io.grpc:grpc-protobuf-lite:1.16.1'
implementation 'io.grpc:grpc-okhttp:1.16.1'
implementation 'io.grpc:grpc-android:1.16.1'
implementation "com.google.android.gms:play-services-basement:$playServicesVersion"
implementation "com.google.android.gms:play-services-tasks:$playServicesVersion"
implementation "com.google.android.gms:play-services-base:$playServicesVersion"
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
implementation 'com.squareup.okhttp:okhttp:2.7.5'
implementation('com.google.firebase:firebase-auth-interop:16.0.1') {
exclude group: "com.google.firebase", module: "firebase-common"
}
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.21.0'
testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.6'
testImplementation 'com.google.guava:guava-testlib:12.0-rc2'
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
androidTestImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.6'
androidTestImplementation "com.android.support:support-annotations:$supportAnnotationsVersion"
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
// TODO(rsgowman): Also add "-Xlint:unchecked". But currently that
// enables 100+ warnings due to our generated source code.
options.compilerArgs << "-Xlint:deprecation"
}
}
// ==========================================================================
// Copy from here down if you want to use the google-services plugin in your
// androidTest integration tests.
// ==========================================================================
ext.packageName = "com.google.firebase.firestore"
apply from: '../gradle/googleServices.gradle'