From 24e7804417fd581323cb2ada5807ebc037a72781 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 7 Aug 2018 19:08:50 +0200 Subject: Configure release signing --- .gitignore | 3 +-- app/build.gradle | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 747a787..d6ac763 100644 --- a/.gitignore +++ b/.gitignore @@ -23,5 +23,4 @@ /captures .externalNativeBuild /app/release -/keyring - +keystore.properties diff --git a/app/build.gradle b/app/build.gradle index 4c911c3..03ff88b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,6 +21,10 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'com.github.triplet.play' +def keystorePropertiesFile = rootProject.file("keystore.properties") +def keystoreProperties = new Properties() +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + android { compileSdkVersion 27 @@ -37,8 +41,18 @@ android { } } + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile file(keystoreProperties['storeFile']) + storePassword keystoreProperties['storePassword'] + } + } + buildTypes { release { + signingConfig signingConfigs.release minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } @@ -73,7 +87,7 @@ repositories { } play { - jsonFile = file('../keyring/api-key.json') + jsonFile = file(keystoreProperties['apiKeyFile']) track = 'beta' untrackOld = true uploadImages = true -- cgit v1.2.3