Skip to content

Commit 7895d54

Browse files
committed
feat(app/build): add Google Play deployment
Signed-off-by: Trumeet <[email protected]>
1 parent b429ead commit 7895d54

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ deploy:
3535
file: app/build/outputs/apk/release/app.apk
3636
on:
3737
repo: Trumeet/MiPushTester
38+
after_deploy:
39+
- ./gradlew :app:promoteReleaseArtifact --daemon

app/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/build
2-
xmpush.properties
2+
xmpush.properties
3+
play-store-api.json

app/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
33

4+
if (file("play-store-api.json").exists()) {
5+
apply plugin: 'com.github.triplet.play'
6+
play {
7+
serviceAccountCredentials = file("play-store-api.json")
8+
track = "beta"
9+
userFraction = 1.0
10+
resolutionStrategy = "ignore"
11+
}
12+
}
13+
414
def xmpushProperties = new Properties()
515
def conf = project.file("xmpush.properties")
616
if (conf.exists()) xmpushProperties.load(conf.newDataInputStream())

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ buildscript {
55
google()
66
jcenter()
77
maven { url 'https://maven.fabric.io/public' }
8+
maven { url "https://plugins.gradle.org/m2/" }
89
}
910
dependencies {
1011
classpath 'com.android.tools.build:gradle:3.3.0-rc03'
1112
classpath 'com.google.android.gms:oss-licenses-plugin:0.9.4'
1213
classpath 'io.fabric.tools:gradle:1.27.0'
14+
classpath "com.github.triplet.gradle:play-publisher:2.0.0-rc2"
1315
// NOTE: Do not place your application dependencies here; they belong
1416
// in the individual module build.gradle files
1517
}

0 commit comments

Comments
 (0)