自动发布测试版Android应用程序的谷歌Play商店 [英] Automatic publish Beta Android app to the Google Play store

查看:181
本文介绍了自动发布测试版Android应用程序的谷歌Play商店的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找,我可以使用一个应用程序自动发布到无论是在谷歌Play商店的alpha和beta测试流,从我的CI服务器的方法。

I am looking for a method that I can use to automatically publish an application to both the alpha and beta testing streams on the Google Play store, from my CI server.

我的CI设置如下:

  1. 在Android的应用程序使用的Andr​​oid工作室编写的(使用Eclipse真不是我们的选择)。
  2. 在构建脚本都写在耙,并运行摇篮任务,还有葫芦,Android的测试。
  3. 在构建服务器TeamCity的8+,当前本地(虽然我们可以传达给詹金斯朝着云)主办。

已经通过计算器扫描回答这个问题时,发现只有一个是<一个href="http://stackoverflow.com/questions/14665518/api-to-automatically-upload-apk-to-google-play">API自动上传APK到谷歌播放?的这个问题的答案是不过一岁多,而大家都知道,一年就是软件开发一辈子,所以我希望事情会改善一些东西。

Having scanned through stackoverflow for an answer to this question, the only one found is API to automatically upload apk to Google Play? the answer to this is however over a year old, and as we all know a year is a lifetime in software development, so I hope things may have improved some what.

我也有一个子问题,发布到这两个流后,多长时间应为测试人员看到他们在店里?我听到24到48个小时,其中考虑发布到生产只需要几个小时的应用程序似乎有些奇怪。

I also have a sub-question, after publishing to these two streams, how long should it take for testers to see them in the store? I'm hearing 24 to 48 hours, which considering apps published to production only take a couple of hours seems a little odd.

推荐答案

更新:插件现在可作为 com.savillians.gradle:Android的发布者:0.4 从Maven的中央。将它添加到您的buildscripts定义,build.gradle并应用它,因为我说下面。

Update: The plugin is now available as com.savillians.gradle:android-publisher:0.4 from maven central. Add it to your buildscripts definition in build.gradle and apply it as I stated below.

我有相同的问题,并感谢@ edovino的评论和谷歌播放API的样品,我能创造一个摇篮插件,它发布到你希望的任何你想要的味道/变种任何轨迹。

I had the exact same question, and thanks to @edovino's comment and the Google Play API samples, I was able to create a gradle plugin that does the publishing to any track you wish for any flavor/variant you wish.

查看源在这里: https://github.com/bluesliverx/gradle-android-publisher

我的工作发布此到Maven的中央,因此它可以在构建脚本中使用,但现在你可以抓住 Android的发行子目录回购,把它放在你的摇篮构建根,重命名文件夹 buildSrc 。要发布使用于 build.gradle 文件的Andr​​oid项目下面一行:

I'm working on publishing this to maven central so it can be used in a build script, but for now you can grab the android-publisher subdirectory in the repo, put it in the root of your gradle build, and rename the folder to buildSrc. Use the following line in the build.gradle file for the android project you want to publish:

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

您可以使用,然后在 build.gradle 文件中的 androidPublisher 块设置您的发布设置。

You can then set your publishing settings using an androidPublisher block in the build.gradle file.

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
}

请确保您创建的服务帐户发行经理的权限,下载P12密钥文件,并把它放在项目的目录。然后运行这个命令:

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

这是将其发送给谷歌播放使用您指定的凭据。祝你好运,让我知道,如果你有任何问题,因为这是全新的。

That will send it to Google Play using the credentials you specified. Good luck and let me know if you have questions since this is brand new.

这篇关于自动发布测试版Android应用程序的谷歌Play商店的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆