Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 9 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# elimu.ai Content Provider

[![Release](https://jitpack.io/v/elimu-ai/content-provider.svg)](https://jitpack.io/#elimu-ai/content-provider)

Android application which downloads educational content (e.g. letters, words, audios, storybooks, videos, etc) to the
device and provides it to other elimu.ai apps.

Expand Down Expand Up @@ -176,25 +178,12 @@ migration succeeded:

To perform a release, follow these steps:

1. Create a new branch for the release
1. Remove `-SNAPSHOT`
- from the `versionName` in `app/build.gradle`
- from the `versionName` in `utils/build.gradle`
- from the `version` in `utils/build.gradle` under `publishing`
1. Commit the changes
1. Click "Draft a new release" at https://github.com/elimu-ai/content-provider/releases
1. Pick the new branch you created as the target branch
1. Create a new tag (e.g. `1.2.19`)
1. Choose a release title, and click "Publish release"
1. Ensure that the release appears at https://jitpack.io/#elimu-ai/content-provider with "Status: ok"
1. Prepare for next development iteration by bumping the version and adding `-SNAPSHOT`
- in the `versionCode` in `app/build.gradle`
- in the `versionName` in `app/build.gradle`
- in the `versionCode` in `utils/build.gradle`
- in the `versionName` in `utils/build.gradle`
- in the `version` in `utils/build.gradle` under `publishing`
1. Commit the changes
- Create a pull request for merging your branch into `main`
1. Go to https://github.com/elimu-ai/content-provider/actions/workflows/gradle-release.yml
2. Press "Run workflow"
3. Once the new release version has been tagged, go to https://github.com/elimu-ai/content-provider/tags
4. Select your tag, and press "Create release"
5. Go to https://jitpack.io/#elimu-ai/content-provider
6. Ensure that your release version appears with "Status: ok"

> [!IMPORTANT]
> After you publish a new release, remember to also bump the version in all Android app repos that depend on the `utils` library:
Expand All @@ -210,7 +199,7 @@ To perform a release, follow these steps:
<img src="https://github.com/elimu-ai/webapp/blob/main/src/main/webapp/static/img/logo-text-256x78.png" />
</p>
<p align="center">
elimu.ai - Free open-source learning software for out-of-school children ✨🚀
elimu.ai - Free open-source learning software for out-of-school children 🚀✨
</p>
<p align="center">
<a href="https://elimu.ai">Website 🌐</a>
Expand Down
21 changes: 19 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.kotlin.android)
id 'maven-publish'
}
apply plugin: 'com.android.application'
apply plugin: 'org.ajoberstar.grgit'
Expand All @@ -12,8 +13,8 @@ android {
applicationId "ai.elimu.content_provider"
minSdkVersion 26
targetSdkVersion 35
versionCode 1002039
versionName "1.2.39-SNAPSHOT"
versionCode 1002040
versionName "1.2.40-SNAPSHOT"
setProperty("archivesBaseName", "${applicationId}-${versionCode}")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
Expand Down Expand Up @@ -79,6 +80,22 @@ dependencies {
androidTestImplementation(libs.androidx.espresso)
}

/**
* Enable `publishApkPublicationToMavenLocal` on JitPack, which uses the following command:
*
* ./gradlew clean -P group=com.github.elimu-ai -P version=1.2.38 -xtest -xlint assemble publishToMavenLocal
*/
publishing {
publications {
apk(MavenPublication) {
artifact("${buildDir}/outputs/apk/release/${android.defaultConfig.applicationId}-${android.defaultConfig.versionCode}-release-unsigned.apk")
}
}
}
tasks.named("publishApkPublicationToMavenLocal") {
mustRunAfter(":app:bundleRelease")
}

task ensureCleanRepo {
doLast {
if (!grgit.repository.jgit.status().call().clean) {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.9.1'
classpath 'com.android.tools.build:gradle:8.8.1'
classpath 'org.ajoberstar.grgit:grgit-gradle:5.0.0'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
defaultConfig {
minSdkVersion 26
targetSdkVersion 35
versionCode 1002039
versionName "1.2.39-SNAPSHOT"
versionCode 1002040
versionName "1.2.40-SNAPSHOT"
setProperty("archivesBaseName", "utils-${versionName}")
}

Expand Down Expand Up @@ -44,7 +44,7 @@ publishing {
release(MavenPublication) {
groupId 'ai.elimu.content_provider'
artifactId 'utils'
version '1.2.39-SNAPSHOT'
version '1.2.40-SNAPSHOT'
artifact("${buildDir}/outputs/aar/utils-${version}-release.aar")
}
}
Expand Down
Loading