Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Latest commit

 

History

History
58 lines (43 loc) · 1.9 KB

README.md

File metadata and controls

58 lines (43 loc) · 1.9 KB

Gallery Publisher Gradle Plugin

CircleCI

Gallery Publisher is a Gradle plugin that allows the publication of an artifact to Huawei's App Gallery store, inspired by AutoPlay plugin.

Assumptions and features

  • The plugin assumes that you previously assemble your APK.
  • You also have the com.android.application >= 3.0.1 plugin applied to your project.

Configuration and requirements

  1. Create an API Client: Please refer to Huawei's HMS Core API Documentation 'Creating an API Client' section.

  2. Add the repository to your buildscript block:

buildscript {
  repositories {
    maven {
        url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.yamilmedina:gallery-publisher:<version>"
  }
}
  1. Then, add your configuration accordingly in your app module build.gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.yamilmedina.gallery-publisher'

galleryPublisher {
    appId = "YOUR_APP_ID_FROM_CONSOLE"
    clientId = "YOUR_CLIENT_ID_FROM_CONSOLE"
    clientSecret = "YOUR_CLIENT_SECRET_FROM_CONSOLE"
    artifactPath = "PATH_TO_YOUR_APK_LOCATION"
}

Usage

When you execute ./gradlew tasks you will see a new publishing task appGalleryPublish<BuildVariant> in the list.

./gradlew appGalleryPublishProdRelease

License

Free use of Gallery Publisher Gradle is permitted under the guidelines and in accordance with the Apache License 2.0