diff --git a/README.md b/README.md
index a6dc5815..08a4cd47 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# elimu.ai Content Provider
+[](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.
@@ -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:
@@ -210,7 +199,7 @@ To perform a release, follow these steps:
- elimu.ai - Free open-source learning software for out-of-school children ✨🚀 + elimu.ai - Free open-source learning software for out-of-school children 🚀✨
Website 🌐 diff --git a/app/build.gradle b/app/build.gradle index 9e8f7f64..4f53fedb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.kotlin.android) + id 'maven-publish' } apply plugin: 'com.android.application' apply plugin: 'org.ajoberstar.grgit' @@ -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 { @@ -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) { diff --git a/build.gradle b/build.gradle index a4314668..fb32ee37 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e6441136..a4b76b95 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e2847c82..37f853b1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/gradlew b/gradlew index 1aa94a42..f5feea6d 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 7101f8e4..9b42019c 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## diff --git a/utils/build.gradle b/utils/build.gradle index 339240f3..3798a918 100644 --- a/utils/build.gradle +++ b/utils/build.gradle @@ -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}") } @@ -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") } }