@@ -126,21 +126,23 @@ Studio.
126126
127127## Using a custom build in your application
128128
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.
131131
132132### 1. Set a custom version
133133
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.
136136
137137For example, change:
138+
138139```
139140version=26.0.2
140141latestReleasedVersion=26.0.1
141142```
142143
143144To:
145+
144146```
145147version=99.99.99-MyFix1
146148latestReleasedVersion=26.0.1
@@ -149,15 +151,15 @@ latestReleasedVersion=26.0.1
149151### 2. Build the artifact
150152
151153Build and publish the artifact to your local Maven repository:
154+
152155``` bash
153156./gradlew :firebase-firestore:publishToMavenLocal
154157```
155158
156159### 3. Update your app's repositories
157160
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 ` .
161163
162164``` kotlin
163165dependencyResolutionManagement {
@@ -172,8 +174,8 @@ dependencyResolutionManagement {
172174
173175### 4. Update your app's dependencies
174176
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.
177179
178180``` kotlin
179181dependencies {
@@ -186,26 +188,26 @@ dependencies {
186188
187189### Optional: Verify the version at runtime
188190
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:
191193
192194``` kotlin
193195android.util.Log .i(" FirestoreVersion" , com.google.firebase.firestore.BuildConfig .VERSION_NAME )
194196```
195197
196198### Building with local module dependencies
197199
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.
200202
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.
2032052 . Publish the dependency to Maven Local:
204206 ``` bash
205207 ./gradlew :firebase-common:publishToMavenLocal
206208 ```
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
209211 ` api(project(" :firebase-common" ))` .
2102124. Build and publish the ` firebase-firestore` artifact as described in step 2.
211213
0 commit comments