Gallery Publisher
is a Gradle plugin that allows the publication of an artifact to Huawei's App Gallery store, inspired by AutoPlay plugin.
- The plugin assumes that you previously assemble your APK.
- You also have the
com.android.application >= 3.0.1
plugin applied to your project.
-
Create an API Client: Please refer to Huawei's HMS Core API Documentation 'Creating an API Client' section.
-
Add the repository to your buildscript block:
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.yamilmedina:gallery-publisher:<version>"
}
}
- 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"
}
When you execute ./gradlew tasks
you will see a new publishing task appGalleryPublish<BuildVariant>
in the list.
./gradlew appGalleryPublishProdRelease
Free use of Gallery Publisher Gradle is permitted under the guidelines and in accordance with the Apache License 2.0