2019-11-06 15:11:15 +01:00
|
|
|
/*
|
2020-01-29 20:30:20 +01:00
|
|
|
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
|
2019-11-06 15:11:15 +01:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
*/
|
|
|
|
plugins {
|
|
|
|
id 'kotlin-android'
|
|
|
|
id 'kotlin-android-extensions'
|
|
|
|
}
|
|
|
|
|
2019-12-15 22:49:18 +01: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 15:11:15 +01:00
|
|
|
android {
|
2019-12-15 22:49:18 +01:00
|
|
|
if (isSnapshot()) {
|
|
|
|
android.applicationVariants.all { final variant ->
|
|
|
|
variant.outputs.all {
|
2020-04-21 10:24:24 +02:00
|
|
|
outputFileName = "aps_${defaultConfig.versionName}.apk"
|
2019-12-15 22:49:18 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-10 21:37:49 +02:00
|
|
|
viewBinding.enabled = true
|
|
|
|
|
2019-11-06 15:11:15 +01:00
|
|
|
defaultConfig {
|
2020-05-12 11:17:08 +02:00
|
|
|
applicationId 'dev.msfjarvis.aps'
|
2020-05-24 12:52:07 +02:00
|
|
|
versionCode 10802
|
|
|
|
versionName '1.9.0-SNAPSHOT'
|
2019-11-06 15:11:15 +01: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 18:13:41 +02:00
|
|
|
proguardFiles 'proguard-android-optimize.txt', 'proguard-rules.pro'
|
2020-01-27 18:54:04 +01:00
|
|
|
buildConfigField 'boolean', 'ENABLE_DEBUG_FEATURES', isSnapshot() ? 'true' : 'false'
|
2019-11-06 15:11:15 +01:00
|
|
|
}
|
|
|
|
debug {
|
|
|
|
applicationIdSuffix = '.debug'
|
|
|
|
versionNameSuffix = '-debug'
|
|
|
|
minifyEnabled = false
|
2020-01-27 18:54:04 +01:00
|
|
|
buildConfigField 'boolean', 'ENABLE_DEBUG_FEATURES', 'true'
|
2019-11-06 15:11:15 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-15 22:49:18 +01:00
|
|
|
if (keystorePropertiesFile.exists()) {
|
|
|
|
final def keystoreProperties = new Properties()
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
2019-11-06 15:11:15 +01:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
2019-12-15 22:49:18 +01:00
|
|
|
keyAlias = keystoreProperties['keyAlias']
|
|
|
|
keyPassword = keystoreProperties['keyPassword']
|
|
|
|
storeFile = rootProject.file keystoreProperties['storeFile']
|
|
|
|
storePassword = keystoreProperties['storePassword']
|
2019-11-06 15:11:15 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
buildTypes.release.signingConfig = signingConfigs.release
|
2019-12-15 22:49:18 +01:00
|
|
|
buildTypes.debug.signingConfig = signingConfigs.release
|
2019-11-06 15:11:15 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2019-11-26 19:18:18 +01:00
|
|
|
implementation deps.androidx.annotation
|
2020-04-06 22:56:52 +02:00
|
|
|
implementation deps.androidx.activity_ktx
|
2019-11-26 19:18:18 +01:00
|
|
|
implementation deps.androidx.appcompat
|
|
|
|
implementation deps.androidx.biometric
|
|
|
|
implementation deps.androidx.constraint_layout
|
2020-03-05 16:35:50 +01:00
|
|
|
implementation deps.androidx.core_ktx
|
2019-11-26 19:18:18 +01:00
|
|
|
implementation deps.androidx.documentfile
|
2020-04-06 22:56:52 +02:00
|
|
|
implementation deps.androidx.fragment_ktx
|
2020-05-26 20:44:10 +02:00
|
|
|
implementation deps.androidx.lifecycle_common
|
2020-04-06 22:56:52 +02:00
|
|
|
implementation deps.androidx.lifecycle_livedata_ktx
|
2020-04-10 13:18:42 +02:00
|
|
|
implementation deps.androidx.lifecycle_viewmodel_ktx
|
2020-03-05 16:35:50 +01:00
|
|
|
implementation deps.androidx.local_broadcast_manager
|
|
|
|
implementation deps.androidx.material
|
2019-11-26 19:18:18 +01:00
|
|
|
implementation deps.androidx.preference
|
2020-04-10 13:18:42 +02:00
|
|
|
implementation deps.androidx.recycler_view
|
|
|
|
implementation deps.androidx.recycler_view_selection
|
2020-04-17 15:06:07 +02:00
|
|
|
implementation deps.androidx.security
|
|
|
|
implementation deps.androidx.swiperefreshlayout
|
2020-01-30 15:31:06 +01:00
|
|
|
|
|
|
|
implementation deps.kotlin.coroutines.android
|
|
|
|
implementation deps.kotlin.coroutines.core
|
|
|
|
|
2019-11-26 19:18:18 +01:00
|
|
|
implementation deps.third_party.commons_io
|
|
|
|
implementation deps.third_party.commons_codec
|
2020-01-26 07:19:45 +01:00
|
|
|
implementation deps.third_party.fastscroll
|
2019-11-26 19:18:18 +01:00
|
|
|
implementation(deps.third_party.jgit) {
|
2019-11-06 15:11:15 +01:00
|
|
|
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
|
|
|
|
}
|
2019-11-26 19:18:18 +01:00
|
|
|
implementation deps.third_party.jsch
|
2020-05-28 06:27:30 +02:00
|
|
|
implementation deps.third_party.sshj
|
|
|
|
implementation deps.third_party.bouncycastle
|
2019-11-26 19:18:18 +01:00
|
|
|
implementation deps.third_party.openpgp_ktx
|
|
|
|
implementation deps.third_party.ssh_auth
|
2020-01-26 07:05:10 +01:00
|
|
|
implementation deps.third_party.timber
|
2020-03-24 14:03:40 +01:00
|
|
|
implementation deps.third_party.timberkt
|
2020-01-27 18:54:04 +01:00
|
|
|
implementation deps.third_party.whatthestack
|
|
|
|
|
|
|
|
if (isSnapshot()) {
|
|
|
|
implementation deps.third_party.leakcanary
|
|
|
|
} else {
|
|
|
|
debugImplementation deps.third_party.leakcanary
|
|
|
|
}
|
2019-11-06 15:11:15 +01:00
|
|
|
|
|
|
|
// Testing-only dependencies
|
2019-11-26 19:18:18 +01:00
|
|
|
androidTestImplementation deps.testing.junit
|
2020-04-15 17:12:28 +02:00
|
|
|
androidTestImplementation deps.testing.kotlin_test_junit
|
2019-11-26 19:18:18 +01: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
|
2019-11-06 15:11:15 +01:00
|
|
|
}
|