Coder Social home page Coder Social logo

kingsongchen / gradle-android-publisher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bluesliverx/gradle-android-publisher

0.0 2.0 0.0 408 KB

Gradle plugin to publish APKs to Google Play

License: Apache License 2.0

Java 91.56% Groovy 7.94% Shell 0.50%

gradle-android-publisher's Introduction

A simple gradle plugin that publishes android builds to any track in the Google Play store. Flavors and variants are supported as well.

To use, add the following to your build.gradle file:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.savillians.gradle:android-publisher:0.4'
        // May need to add guava if you have problems with com.google.common.hash.HashCode.fromString(Ljava/lang/String;)Lcom/google/common/hash/HashCode;
        //classpath 'com.google.guava:guava:18.0'
    }
}

apply plugin: com.savillians.gradle.androidpublisher.AndroidPublisherPlugin

android {
    ...
}
androidPublisher {
    applicationName = "Company-Name-Product-Name/1.0"
    packageName = "<package name>"
    serviceAccountEmail = "<service account email>"
    serviceAccountKeyFile = file('<p12 keyfile - NOT the json file>')
    track = "alpha" // default, don't need to specify
    variantName = "release" // default, don't need to specify
}

Make sure the service account you create has "release manager" permissions, download the p12 key file and put it in the project's directory. Then run this command:

gradle androidPublish OR ./gradlew androidPublish

That will send it to Google Play using the credentials you specified.

Flavors

The variantName parameter is a combination of the flavor and build type. If no flavors are used, it is comprised entirely of the build type. For example, if there are 2 flavors, "full" and "demo", and two build types, "debug" and "release", then the potential variant names are:

  • fullDebug
  • fullRelease
  • demoDebug
  • demoRelease

Changelog

0.5

  • Fix issues with latest version of Gradle Android plugin (#6)

0.3

  • Fix bug with not finding the correct APK file for publishing

0.2

  • Compatible with android gradle plugin 0.14

0.1

  • Initial release

gradle-android-publisher's People

Contributors

bluesliverx avatar

Watchers

James Cloos avatar Kingsong Chen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.