Skip to content

Makhosh/storepublisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Play and Huawei App Gallery APK/AAB Uploader

Maven Central Version License

Experimental Build

The plugin allows you to publish the android release build file (*.apk or *.aab) to the Google Play and HUAWEI AppGallery.

Features

The following features are available:

  • Upload APK or AAB build file in HUAWEI AppGallery
  • Publish APK or AAB build file in Google Play on any track(alpha, release...)

The following features are missing:

  • Waits for feedback..

Test

The plugin tested Java 11 - AGP 4.2.2 - Gradle 8.2.1.

Adding the plugin to your project

in application module ./build.gradle

Using the apply method

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath "io.github.makhosh:storepublisher:1.0.6"
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.github.makhosh.storepublisher'

Configuring Plugin

Groovy
storePublisher{
    artifactFile = file('')

    googlePlay{
            applicationId = ''
            track = ''
            credential = file('')
    }

    huaweiAppGallery{
            appId = ''
            clientId = ''
            clientSecret = ''
    }
}

How to get credentials for HUAWEI AppGallery, please see AppGallery Connect API Getting Started.

How to get credentials for Google Play, please see How to create a Service Account for the Google Play Store.

Parameter P Default Value Description
apkFile Mandatory null File path of artifact
applicationId Mandatory null Defined your application default config. Example: com.facebook.katana
track Optional "alpha" Target stage for Google Play, i.e. internal/alpha/beta/production
credential Mandatory null Google Play service account credential. Add JSON file path.
appId Mandatory null HUAWEI AppGallery Application ID. Example: Tiktok App ID: 100315379
clientId Mandatory null HUAWEI AppGallery Connect API Client Id
clientSecret Mandatory null HUAWEI AppGallery Connect API Cliend Secret

Note for Google Play: If you commit unencrypted Service Account keys to source, you run the risk of letting anyone access your Google Play account. To circumvent this issue, put the contents of your JSON file in the ANDROID_PUBLISHER_CREDENTIALS environment variable and don't specify the credential property.

Note for HUAWEI AppGallery: If you commit unencrypted client secret to source, you run the risk of letting anyone access your Huawei App Gallery account. To circumvent this issue, put client secret value in the HUAWEI_PUBLISHER_CREDENTIALS environment variable and don't specify the clientSecret property.

Usage

Gradle generate storePublisher task. You can upload a pre-existing artifact.

./gradlew storePublisher

If you want to upload after build, you can finalize your build task with storePublisher Example:

project.afterEvaluate {
    tasks.findByName("assembleRelease").finalizedBy(tasks.findByName("storePublisher"))
}

License

Free use of this plugin is permitted under the guidelines and in accordance with the Apache License 2.0

About

Google Play and Huawei App Gallery APK uploader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published