2019-11-06 14:11:15 +00:00
|
|
|
/*
|
2020-01-29 19:30:20 +00:00
|
|
|
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
|
2019-11-06 14:11:15 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
*/
|
|
|
|
plugins {
|
|
|
|
id 'kotlin-android'
|
|
|
|
}
|
|
|
|
|
2019-12-15 21:49:18 +00:00
|
|
|
final def keystorePropertiesFile = rootProject.file 'keystore.properties'
|
|
|
|
|
|
|
|
static final def isSnapshot() {
|
|
|
|
return System.env['GITHUB_WORKFLOW'] != null && System.env['SNAPSHOT'] != null
|
|
|
|
}
|
|
|
|
|
2019-11-06 14:11:15 +00:00
|
|
|
android {
|
2019-12-15 21:49:18 +00:00
|
|
|
if (isSnapshot()) {
|
|
|
|
android.applicationVariants.all { final variant ->
|
|
|
|
variant.outputs.all {
|
2020-04-21 08:24:24 +00:00
|
|
|
outputFileName = "aps_${defaultConfig.versionName}.apk"
|
2019-12-15 21:49:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-31 07:42:15 +00:00
|
|
|
buildFeatures.viewBinding = true
|
2020-04-10 19:37:49 +00:00
|
|
|
|
2019-11-06 14:11:15 +00:00
|
|
|
defaultConfig {
|
2020-05-12 09:17:08 +00:00
|
|
|
applicationId 'dev.msfjarvis.aps'
|
2020-07-01 07:38:55 +00:00
|
|
|
versionCode 10921
|
2020-06-21 21:16:03 +00:00
|
|
|
versionName '1.10.0-SNAPSHOT'
|
2019-11-06 14:11:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
abortOnError = true // make sure build fails with lint errors!
|
|
|
|
disable 'MissingTranslation', 'PluralsCandidate'
|
|
|
|
}
|
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
exclude '.readme'
|
|
|
|
exclude 'META-INF/LICENSE.txt'
|
|
|
|
exclude 'META-INF/NOTICE.txt'
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled = true
|
2020-05-26 16:13:41 +00:00
|
|
|
proguardFiles 'proguard-android-optimize.txt', 'proguard-rules.pro'
|
2020-01-27 17:54:04 +00:00
|
|
|
buildConfigField 'boolean', 'ENABLE_DEBUG_FEATURES', isSnapshot() ? 'true' : 'false'
|
2019-11-06 14:11:15 +00:00
|
|
|
}
|
|
|
|
debug {
|
|
|
|
applicationIdSuffix = '.debug'
|
|
|
|
versionNameSuffix = '-debug'
|
|
|
|
minifyEnabled = false
|
2020-01-27 17:54:04 +00:00
|
|
|
buildConfigField 'boolean', 'ENABLE_DEBUG_FEATURES', 'true'
|
2019-11-06 14:11:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-15 21:49:18 +00:00
|
|
|
if (keystorePropertiesFile.exists()) {
|
|
|
|
final def keystoreProperties = new Properties()
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
2019-11-06 14:11:15 +00:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
2019-12-15 21:49:18 +00:00
|
|
|
keyAlias = keystoreProperties['keyAlias']
|
|
|
|
keyPassword = keystoreProperties['keyPassword']
|
|
|
|
storeFile = rootProject.file keystoreProperties['storeFile']
|
|
|
|
storePassword = keystoreProperties['storePassword']
|
2019-11-06 14:11:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
buildTypes.release.signingConfig = signingConfigs.release
|
2019-12-15 21:49:18 +00:00
|
|
|
buildTypes.debug.signingConfig = signingConfigs.release
|
2019-11-06 14:11:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-04-06 20:56:52 +00:00
|
|
|
implementation deps.androidx.activity_ktx
|
2020-06-29 08:12:19 +00:00
|
|
|
implementation deps.androidx.annotation
|
|
|
|
implementation deps.androidx.autofill
|
2019-11-26 18:18:18 +00:00
|
|
|
implementation deps.androidx.appcompat
|
|
|
|
implementation deps.androidx.biometric
|
|
|
|
implementation deps.androidx.constraint_layout
|
2020-03-05 15:35:50 +00:00
|
|
|
implementation deps.androidx.core_ktx
|
2019-11-26 18:18:18 +00:00
|
|
|
implementation deps.androidx.documentfile
|
2020-04-06 20:56:52 +00:00
|
|
|
implementation deps.androidx.fragment_ktx
|
2020-05-26 18:44:10 +00:00
|
|
|
implementation deps.androidx.lifecycle_common
|
2020-04-06 20:56:52 +00:00
|
|
|
implementation deps.androidx.lifecycle_livedata_ktx
|
2020-04-10 11:18:42 +00:00
|
|
|
implementation deps.androidx.lifecycle_viewmodel_ktx
|
2020-03-05 15:35:50 +00:00
|
|
|
implementation deps.androidx.material
|
2019-11-26 18:18:18 +00:00
|
|
|
implementation deps.androidx.preference
|
2020-04-10 11:18:42 +00:00
|
|
|
implementation deps.androidx.recycler_view
|
|
|
|
implementation deps.androidx.recycler_view_selection
|
2020-04-17 13:06:07 +00:00
|
|
|
implementation deps.androidx.security
|
|
|
|
implementation deps.androidx.swiperefreshlayout
|
2020-01-30 14:31:06 +00:00
|
|
|
|
|
|
|
implementation deps.kotlin.coroutines.android
|
|
|
|
implementation deps.kotlin.coroutines.core
|
|
|
|
|
2020-06-30 13:51:49 +00:00
|
|
|
implementation deps.first_party.openpgp_ktx
|
|
|
|
implementation deps.first_party.zxing_android_embedded
|
|
|
|
|
2020-06-29 06:38:59 +00:00
|
|
|
implementation deps.third_party.commons_codec
|
2020-01-26 06:19:45 +00:00
|
|
|
implementation deps.third_party.fastscroll
|
2019-11-26 18:18:18 +00:00
|
|
|
implementation(deps.third_party.jgit) {
|
2019-11-06 14:11:15 +00:00
|
|
|
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
|
|
|
|
}
|
2019-11-26 18:18:18 +00:00
|
|
|
implementation deps.third_party.jsch
|
2020-05-28 04:27:30 +00:00
|
|
|
implementation deps.third_party.sshj
|
|
|
|
implementation deps.third_party.bouncycastle
|
2020-06-11 09:38:10 +00:00
|
|
|
implementation deps.third_party.plumber
|
2019-11-26 18:18:18 +00:00
|
|
|
implementation deps.third_party.ssh_auth
|
2020-01-26 06:05:10 +00:00
|
|
|
implementation deps.third_party.timber
|
2020-03-24 13:03:40 +00:00
|
|
|
implementation deps.third_party.timberkt
|
2020-01-27 17:54:04 +00:00
|
|
|
|
|
|
|
if (isSnapshot()) {
|
|
|
|
implementation deps.third_party.leakcanary
|
2020-05-31 07:42:15 +00:00
|
|
|
implementation deps.third_party.whatthestack
|
2020-01-27 17:54:04 +00:00
|
|
|
} else {
|
|
|
|
debugImplementation deps.third_party.leakcanary
|
2020-05-31 07:42:15 +00:00
|
|
|
debugImplementation deps.third_party.whatthestack
|
2020-01-27 17:54:04 +00:00
|
|
|
}
|
2019-11-06 14:11:15 +00:00
|
|
|
|
|
|
|
// Testing-only dependencies
|
2019-11-26 18:18:18 +00:00
|
|
|
androidTestImplementation deps.testing.junit
|
2020-04-15 15:12:28 +00:00
|
|
|
androidTestImplementation deps.testing.kotlin_test_junit
|
2019-11-26 18:18:18 +00:00
|
|
|
androidTestImplementation deps.testing.androidx.runner
|
|
|
|
androidTestImplementation deps.testing.androidx.rules
|
|
|
|
androidTestImplementation deps.testing.androidx.junit
|
|
|
|
androidTestImplementation deps.testing.androidx.espresso_core
|
|
|
|
androidTestImplementation deps.testing.androidx.espresso_intents
|
2020-05-28 17:12:13 +00:00
|
|
|
|
|
|
|
testImplementation deps.testing.junit
|
|
|
|
testImplementation deps.testing.kotlin_test_junit
|
2019-11-06 14:11:15 +00:00
|
|
|
}
|