File tree Expand file tree Collapse file tree 6 files changed +79
-14
lines changed Expand file tree Collapse file tree 6 files changed +79
-14
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,36 @@ language: android
3
3
jdk : oraclejdk8
4
4
android :
5
5
components :
6
- - platform-tools
7
- - tools
8
- - build-tools-25.0.2
9
- - android-25
10
- - extra-google-m2repository
11
- - extra-android-m2repository
12
- script : ' ./gradlew build check'
6
+ - platform-tools
7
+ - tools
8
+ - build-tools-25.0.2
9
+ - android-25
10
+ - extra-google-m2repository
11
+ - extra-android-m2repository
12
+ env :
13
+ global :
14
+ - ANDROID_PLAY_JSON_FILE="../creds/google-play.json"
15
+ - ANDROID_RELEASE_STORE_FILE="../creds/platypus-android.jks"
16
+ - secure : eHqN5ncAt4zJMM5OR+wQqn6WRiNEJx/MKZtO1BpkfOQVW67U0a7ZDQ2LF3tqlfJBRnW/4E9BJysi15WKigjHpeaPNVZh2V9cb2vejUd0P/DZZHYYcFvyoXh9R0ZnfJNr1Ui9q6Ll7kgSxgsOa5UrNMP4Q8vraw+fijEdMyh4yvU=
17
+ - secure : D0uqmhG2Rit16cbHwjvZhXG0caS0RxOZvQaP1nQtLIfq0uPWU/mDqv6gVHnpuZpxIuIKuMRe+MOZvSDuT6LhZLzXVs43Ikzrq7Yr4yNr16Nwo2//qv9B2OxuepunlduCv8B95lJQX5S9zjAAl7e1eQMXphC3IsDs4nbd7pDpRmk=
18
+ - secure : VKHCNY+p91IDd3AZl/FGUHkokAZLkx0tlwRh9u9jHksVky2PFLDrOYU9yF2BPvs2QlSbCdVF/+/TyaImZmZ0e5XJAocjM4Ew2z9QbMiuo8KMtzixni/iINRQlEVNOZRCOHcOhnBCccteYk9kQ1oRB56AXoukzmscco2d1Bx7sgk=
19
+ before_install :
20
+ - openssl aes-256-cbc -K $encrypted_3a18627f5297_key -iv $encrypted_3a18627f5297_iv
21
+ -in secrets.tar.enc -out secrets.tar -d
22
+ - tar xvf secrets.tar
23
+ script : " ./gradlew build check"
24
+ deploy :
25
+ - provider : releases
26
+ api_key :
27
+ secure : SzonDecstyEHJuiuYeHisXsXWPIRFvIdali89uGo4lfzQ5E0+zqzyMJR4B8eyFiVn0VXCCGaUj9IUFRHGjlEafWmv+YFyAC2doZwOk4EKq2ZcK85XAUyLQEA6X1RrKUx11VSxn5gxtXA/4fyarv139PzELQw3liNIVPx44CipiA=
28
+ file : app/build/outputs/apk/app-release.apk
29
+ skip_cleanup : true
30
+ on :
31
+ repo : platypusllc/server
32
+ tags : true
33
+ - provider : script
34
+ script : " ./gradlew publishApkRelease"
35
+ skip_cleanup : true
36
+ on :
37
+ repo : platypusllc/server
38
+ tags : true
Original file line number Diff line number Diff line change @@ -8,5 +8,20 @@ controlling the platforms using high-level commands.
8
8
9
9
----
10
10
11
- Code in this repository is automatically built by Travis-CI. The ` master `
12
- branch is compiled to an APK and uploaded to the Google Play store.
11
+ Code in this repository is automatically built by Travis-CI. Any tags of this
12
+ repostory will be automatically compiled to an APK and uploaded both named
13
+ Github Releases and the ` alpha ` channel on the Google Play store.
14
+
15
+ In order to do signed builds, the following environment variables must be set:
16
+ ```
17
+ ANDROID_PLAY_JSON_FILE
18
+ ANDROID_RELEASE_STORE_FILE
19
+ ANDROID_RELEASE_STORE_PASSWORD
20
+ ANDROID_RELEASE_KEY_ALIAS
21
+ ANDROID_RELEASE_KEY_PASSWORD
22
+ ```
23
+
24
+ This deployment is based on the following setups:
25
+ - https://github.com/codepath/android_guides/wiki/Automating-Publishing-to-the-Play-Store
26
+ - https://github.com/larsgrefer/bpm-meter-android/blob/master/.travis.yml
27
+ - https://github.com/Triple-T/gradle-play-publisher
Original file line number Diff line number Diff line change 1
1
apply plugin : ' com.android.application'
2
+ apply plugin : ' com.github.triplet.play'
2
3
3
4
repositories {
4
5
mavenCentral()
@@ -11,32 +12,52 @@ android {
11
12
compileSdkVersion 25
12
13
buildToolsVersion " 25.0.2"
13
14
15
+ playAccountConfigs {
16
+ release {
17
+ jsonFile = file(System . getenv(" ANDROID_PLAY_JSON_FILE" ) ?: " ." )
18
+ }
19
+ }
20
+ signingConfigs {
21
+ release {
22
+ keyAlias System . getenv(" ANDROID_RELEASE_KEY_ALIAS" ) ?: " EXAMPLE_ALIAS"
23
+ keyPassword System . getenv(" ANDROID_RELEASE_KEY_PASSWORD" ) ?: " EXAMPLE_PASSWORD"
24
+ storeFile file(System . getenv(" ANDROID_RELEASE_STORE_FILE" ) ?: " ." )
25
+ storePassword System . getenv(" ANDROID_RELEASE_STORE_PASSWORD" ) ?: " EXAMPLE_PASSWORD"
26
+ v2SigningEnabled true
27
+ }
28
+ }
14
29
defaultConfig {
15
30
applicationId " com.platypus.android.server"
16
31
minSdkVersion 21
17
32
targetSdkVersion 25
18
- versionCode 1
19
- versionName " 1.0"
33
+ versionCode 3
34
+ versionName " 1.3"
35
+ playAccountConfig = playAccountConfigs. release
20
36
}
21
37
buildTypes {
22
38
release {
23
39
minifyEnabled false
24
40
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
41
+ signingConfig signingConfigs. release
25
42
}
26
43
}
27
44
lintOptions {
28
45
abortOnError false
29
46
}
30
47
dexOptions {
31
- javaMaxHeapSize ' 3g '
48
+ javaMaxHeapSize ' 4g '
32
49
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
33
50
// See: https://guides.codepath.com/android/Setting-up-Travis-CI
34
51
preDexLibraries = preDexEnabled && ! travisBuild
35
52
}
36
53
}
37
54
55
+ play {
56
+ track = ' alpha'
57
+ untrackOld = true
58
+ }
59
+
38
60
dependencies {
39
- compile fileTree(dir : ' libs' , include : [' *.jar' ])
40
61
testCompile ' junit:junit:4.12'
41
62
compile ' com.android.support:appcompat-v7:24.0.0'
42
63
compile ' com.android.support:support-v13:24.0.0'
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ buildscript {
12
12
13
13
// Google Services are required to support Firebase.
14
14
classpath ' com.google.gms:google-services:3.0.0'
15
+
16
+ // Add gradle-play-publisher to deploy to Google Play store.
17
+ classpath ' com.github.triplet.gradle:play-publisher:1.2.0'
15
18
}
16
19
}
17
20
Original file line number Diff line number Diff line change 11
11
# The setting is particularly useful for tweaking memory settings.
12
12
# Default value: -Xmx10248m -XX:MaxPermSize=256m
13
13
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14
- org.gradle.jvmargs =-Xmx3g
14
+ org.gradle.jvmargs =-Xmx4g
15
15
16
16
# When configured, Gradle will run in incubating parallel mode.
17
17
# This option should only be used with decoupled projects. More details, visit
You can’t perform that action at this time.
0 commit comments