diff --git a/.gitignore b/.gitignore index 0b81ffa3c..9ad9f8ab3 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ local.properties crowdin.yaml local tmp/ +secret/ diff --git a/build.gradle b/build.gradle index 1b9bd4830..a186732fc 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,7 @@ buildscript { classpath 'org.jacoco:org.jacoco.core:+' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION" classpath 'org.ajoberstar:grgit:1.5.0' + classpath 'com.github.triplet.gradle:play-publisher:1.2.0' } } diff --git a/uhabits-android/build.gradle b/uhabits-android/build.gradle index 5235ba762..b780c2918 100644 --- a/uhabits-android/build.gradle +++ b/uhabits-android/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'jacoco' +apply plugin: 'com.github.triplet.play' import org.ajoberstar.grgit.Grgit ext { @@ -15,6 +16,21 @@ android { compileSdkVersion COMPILE_SDK_VERSION as Integer buildToolsVersion BUILD_TOOLS_VERSION + signingConfigs { + release { + storeFile file(LOOP_STORE_FILE) + storePassword LOOP_STORE_PASSWORD + keyAlias LOOP_KEY_ALIAS + keyPassword LOOP_KEY_PASSWORD + } + } + + playAccountConfigs { + defaultAccountConfig { + jsonFile = file('../secret/playstore.json') + } + } + defaultConfig { versionCode VERSION_CODE as Integer versionName "$VERSION_NAME ($GIT_BRANCH $GIT_COMMIT)" @@ -29,12 +45,15 @@ android { includeCompileClasspath false } } + + playAccountConfig = playAccountConfigs.defaultAccountConfig } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + signingConfig signingConfigs.release } debug { @@ -165,3 +184,6 @@ task coverageReport(type: JacocoReport) { } } +play { + track = 'alpha' +}