Android Publisher Gradle Plugin

Additional

Language
Groovy
Version
minor/0.1.0 (Oct 29, 2015)
Created
Oct 5, 2015
Updated
Nov 15, 2018 (Retired)
Owner
Hikaru Wada (sugoi-wada)
Contributor
Hikaru Wada (sugoi-wada)
1
Activity
Badge
Generate
Download
Source code

DEPRICATED

Please use the Gradle Play Publisher or newer other libraries.

Android Publisher Gradle Plugin

This plugin integrates Google Play Developer API (Publishing API) with the Gradle build system. With this plugin, you can upload apks and listings directly via command line, IntelliJ, Android Studio and other IDEs.

Use

You have to create service account for use this plugin. Please create service account. (OAuth clients weren't supported now.) And download p12 file from Google Developers Console > [created account] > APIs & auth > Credentials.

You also have to grant update permissions as needed. Please make sure that by this help page.

Download the latest .jar and consists of adding the following to your build.gradle file.

  1. Add plugin dependency

     buildscript {
         dependencies {
             classpath files('path/to/androidpublisher-x.x.x.jar')
         }
     }
    
  2. Apply plugin

    apply plugin: 'publisher'
    
  3. Configure your publish resources

    publish {
        clientEmail "xxxx@developer.gserviceaccount.com"
        p12File file("path/to/p12File.p12")
    
        listings {
            japanese { // free word
                language 'ja-JP' // BCP-47 language tag
                title "${japaneseTitle}"
                video "https://www.youtube.com/watch?v=${jpVideo}"
                recentChangesFile file("path/to/recent-changes.txt")
                shortDescriptionFile file("path/to/short-description.txt")
                fullDescriptionFile file("path/to/full-description.txt")
                phoneScreenshotsDir file("path/to/phone-screenshots")
            }
            english { // free word
                language 'en-US' // BCP-47 language tag
                title "${englishTitle}"
                video "https://www.youtube.com/watch?v=${enVideo}"
                recentChangesFile file("path/to/recent-changes.txt")
                shortDescriptionFile file("path/to/short-description.txt")
                fullDescriptionFile file("path/to/full-description.txt")
                phoneScreenshotsDir file("path/to/phone-screenshots")
            }
    }
    
  4. Run the following from terminal. You can see new Google Play Tasks.

    ./gradlew tasks
    

Require

  • Signing
  • Product Flavor