Skip to content

Commit ee2dc3b

Browse files
committed
Document how to publish utils module to local maven repository for development purpose
1 parent 4b6a1cc commit ee2dc3b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ See https://jitpack.io/#elimu-ai/content-provider/ for the latest version availa
4444
> [!TIP]
4545
> To find all Android app repos that depend on this library, go to https://github.com/search?q=org%3Aelimu-ai+com.github.elimu-ai%3Acontent-provider%3A&type=code
4646
47+
### To publish a snapshot for local development & testing:
48+
49+
1. Change `versionName`, `versionCode` and publication `version` in https://github.com/elimu-ai/content-provider/blob/main/utils/build.gradle
50+
2. Under `publishing` -> `repositories` block: Replace the existing `maven` repo by `mavenLocal()`
51+
3. Run `./gradlew clean utils:publishReleasePublicationToMavenLocal` from project's root folder
52+
4. In app side: Add `mavenLocal()` to `repositsories` block in `build.gradle` script
53+
5. Implement `ai.elimu.content_provider:utils:$snapshot_version` in app's `build.gradle` file
54+
55+
4756
### Usage Example
4857

4958
For an example of another Android app using the `utils` library, see the Vitabu app's Gradle configuration:

utils/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ publishing {
5656
}
5757

5858
tasks.named("publishReleasePublicationToMavenLocal") {
59-
mustRunAfter(":utils:bundleReleaseAar")
59+
dependsOn(":utils:bundleReleaseAar")
6060
}

0 commit comments

Comments
 (0)