@@ -126,21 +126,23 @@ Studio.
126
126
127
127
## Using a custom build in your application
128
128
129
- To build ` firebase-firestore ` from source and use the resulting artifact in your
130
- Android application, follow these steps.
129
+ To build ` firebase-firestore ` from source and use the resulting artifact in your Android
130
+ application, follow these steps.
131
131
132
132
### 1. Set a custom version
133
133
134
- In ` firebase-firestore/gradle.properties ` , change the ` version ` to a unique
135
- value. Appending a suffix makes it easy to identify your custom build.
134
+ In ` firebase-firestore/gradle.properties ` , change the ` version ` to a unique value. Appending a
135
+ suffix makes it easy to identify your custom build.
136
136
137
137
For example, change:
138
+
138
139
```
139
140
version=26.0.2
140
141
latestReleasedVersion=26.0.1
141
142
```
142
143
143
144
To:
145
+
144
146
```
145
147
version=99.99.99-MyFix1
146
148
latestReleasedVersion=26.0.1
@@ -149,15 +151,15 @@ latestReleasedVersion=26.0.1
149
151
### 2. Build the artifact
150
152
151
153
Build and publish the artifact to your local Maven repository:
154
+
152
155
``` bash
153
156
./gradlew :firebase-firestore:publishToMavenLocal
154
157
```
155
158
156
159
### 3. Update your app's repositories
157
160
158
- In your application's ` settings.gradle ` or ` settings.gradle.kts ` file, add
159
- ` mavenLocal() ` to the ` repositories ` block within
160
- ` dependencyResolutionManagement ` .
161
+ In your application's ` settings.gradle ` or ` settings.gradle.kts ` file, add ` mavenLocal() ` to the
162
+ ` repositories ` block within ` dependencyResolutionManagement ` .
161
163
162
164
``` kotlin
163
165
dependencyResolutionManagement {
@@ -172,8 +174,8 @@ dependencyResolutionManagement {
172
174
173
175
### 4. Update your app's dependencies
174
176
175
- In your application's ` build.gradle ` or ` build.gradle.kts ` file, update the
176
- ` firebase-firestore ` dependency to use the custom version you set in step 1.
177
+ In your application's ` build.gradle ` or ` build.gradle.kts ` file, update the ` firebase-firestore `
178
+ dependency to use the custom version you set in step 1.
177
179
178
180
``` kotlin
179
181
dependencies {
@@ -186,26 +188,26 @@ dependencies {
186
188
187
189
### Optional: Verify the version at runtime
188
190
189
- To confirm that your application is using the custom artifact, you can log its
190
- version. Add the following code to your application:
191
+ To confirm that your application is using the custom artifact, you can log its version. Add the
192
+ following code to your application:
191
193
192
194
``` kotlin
193
195
android.util.Log .i(" FirestoreVersion" , com.google.firebase.firestore.BuildConfig .VERSION_NAME )
194
196
```
195
197
196
198
### Building with local module dependencies
197
199
198
- If your changes require building other modules in this repository (like
199
- ` firebase-common ` ), you must build and publish them locally as well.
200
+ If your changes require building other modules in this repository (like ` firebase-common ` ), you must
201
+ build and publish them locally as well.
200
202
201
- 1 . In the dependency's directory (e.g., ` firebase-common/ ` ), edit
202
- ` gradle.properties ` to set a unique version.
203
+ 1 . In the dependency's directory (e.g., ` firebase-common/ ` ), edit ` gradle.properties ` to set a
204
+ unique version.
203
205
2 . Publish the dependency to Maven Local:
204
206
``` bash
205
207
./gradlew :firebase-common:publishToMavenLocal
206
208
```
207
- 3. In ` firebase-firestore/firebase-firestore.gradle` , ensure the dependency is a
208
- project dependency. For example, change ` api(libs.firebase.common)` to
209
+ 3. In ` firebase-firestore/firebase-firestore.gradle` , ensure the dependency is a project
210
+ dependency. For example, change ` api(libs.firebase.common)` to
209
211
` api(project(" :firebase-common" ))` .
210
212
4. Build and publish the ` firebase-firestore` artifact as described in step 2.
211
213
0 commit comments