Publish Android AAR package to Github

Thursday, September 29th 2022  — 


Generate a personal access token with read/write packages enabled in your Github settings.

Edit build.gradle

Add maven-publish plugin to the top of your build.gradle file:

apply plugin: 'maven-publish' // Apply at the top of build.gradle

Define articact properties:

publishing {
    publications {
        scdevlibrary(MavenPublication) {
            groupId ''
            artifactId 'changeArtifcactId'
            version 'changeVersionNumber'

Add repository info to publishing > repositories:

publishing {
    publications {
   repositories {
        maven {
            name = "REPONAME"
            url 'GH-REPO-URL'
            credentials {
                /** Create in root project folder file with
                 ** gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN
                 ** Or set env variable GPR_USER & GPR_API_KEY if not adding a properties file**/
                // SC user token
                username = //read from GPR_USER
                password = // read from GPR_API_KEY

Publishing package

To publish the package, run this gradle goal:

$ gradle clean build publish

  Related Pages

Zaitoun Store
September 2022

Google Playstore:

Through this succint tutorial, we will go through the design and development of a small expense manager in React Native. This app will help a user save and tag expenses on a remote server using a REST API. It will need to store data locally when no Internet connection is available and sync it when a connection is detected.

On some android devices, specifically those that has x64 architecture, you might run into the following error: