diff options
Diffstat (limited to 'wallet/build.gradle')
-rw-r--r-- | wallet/build.gradle | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/wallet/build.gradle b/wallet/build.gradle index d93b8b9..5b28c6c 100644 --- a/wallet/build.gradle +++ b/wallet/build.gradle @@ -25,6 +25,18 @@ plugins { def walletCoreVersion = "v0.7.1-dev.10" +static def versionCodeEpoch() { + return (new Date().getTime() / 1000).toInteger() +} +def gitCommit = { -> + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'rev-parse', '--short=7', 'HEAD' + standardOutput = stdout + } + return stdout.toString().trim() +} + android { compileSdkVersion 29 //noinspection GradleDependency @@ -45,6 +57,22 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + flavorDimensions "distributionChannel" + productFlavors { + fdroid { + dimension "distributionChannel" + applicationIdSuffix ".fdroid" + } + google { + dimension "distributionChannel" + } + nightly { + dimension "distributionChannel" + applicationIdSuffix ".nightly" + versionCode versionCodeEpoch() + versionNameSuffix " ($gitCommit)" + } + } compileOptions { sourceCompatibility = 1.8 |