From f538bf6a335e8d64f0e00242b50923a1fd7a4b10 Mon Sep 17 00:00:00 2001 From: Karim Abou Zeid Date: Sat, 29 Aug 2015 13:13:43 +0200 Subject: [PATCH] Build and push APKs directly to Google Play via gradle task. This won't be available for people without the matching .p12 key. --- .gitignore | 3 ++- app/build.gradle | 7 +++++++ .../gramophone/ui/activities/AlbumDetailActivity.java | 2 +- app/src/main/play/en-US/whatsnew | 1 + build.gradle | 1 + 5 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 app/src/main/play/en-US/whatsnew diff --git a/.gitignore b/.gitignore index 2d723ace..d6b27d4b 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,5 @@ captures/ .DS_Store # Private Keys -keystore.properties \ No newline at end of file +keystore.properties +play-developer-key.p12 \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 70a74fff..4b023a9d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,11 +13,18 @@ buildscript { apply plugin: 'com.android.application' apply plugin: 'io.fabric' apply plugin: 'com.jakewharton.hugo' +apply plugin: 'com.github.triplet.play' repositories { maven { url 'https://maven.fabric.io/public' } } +// For pushing APKs directly to Google Play. Won't work without the .p12 key. +play { + serviceAccountEmail = '992499570703-57nnnb8m7ha6sri9tcov8nhgkg3fc9i9@developer.gserviceaccount.com' + pk12File = file('../play-developer-key.p12') +} + android { signingConfigs { debug { diff --git a/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AlbumDetailActivity.java b/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AlbumDetailActivity.java index 1f1be7ff..655691db 100644 --- a/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AlbumDetailActivity.java +++ b/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AlbumDetailActivity.java @@ -360,7 +360,7 @@ public class AlbumDetailActivity extends AbsSlidingMusicPanelActivity implements startActivityForResult(intent, TAG_EDITOR_REQUEST); return true; case R.id.action_go_to_artist: - Pair[] artistPairs = addPlayPauseFabToSharedViews(null); + Pair[] artistPairs = addPlayPauseFabToSharedViews(); NavigationUtil.goToArtist(this, album.artistId, artistPairs); return true; } diff --git a/app/src/main/play/en-US/whatsnew b/app/src/main/play/en-US/whatsnew new file mode 100644 index 00000000..ea5beeb5 --- /dev/null +++ b/app/src/main/play/en-US/whatsnew @@ -0,0 +1 @@ +Changelog within the app. \ No newline at end of file diff --git a/build.gradle b/build.gradle index 63bb5a88..c2a224fc 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.github.triplet.gradle:play-publisher:1.1.2' } }