2020-07-23 09:09:36 +00:00
|
|
|
/*
|
2021-03-09 09:15:27 +00:00
|
|
|
* Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
|
2020-07-23 09:09:36 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
*/
|
|
|
|
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
|
|
|
|
|
|
|
plugins {
|
2020-10-16 15:18:11 +00:00
|
|
|
id("com.android.application")
|
2020-07-23 09:09:36 +00:00
|
|
|
kotlin("android")
|
2021-04-17 22:22:41 +00:00
|
|
|
kotlin("kapt")
|
|
|
|
id("dagger.hilt.android.plugin")
|
2021-01-20 14:57:04 +00:00
|
|
|
`versioning-plugin`
|
2020-10-16 15:18:11 +00:00
|
|
|
`aps-plugin`
|
2020-12-30 10:06:51 +00:00
|
|
|
`crowdin-plugin`
|
|
|
|
}
|
|
|
|
|
2021-07-15 06:44:05 +00:00
|
|
|
/*
|
2021-05-25 09:45:26 +00:00
|
|
|
repositories {
|
|
|
|
val composeSnapshot = libs.versions.composeSnapshot.get()
|
2021-06-04 06:00:30 +00:00
|
|
|
if (composeSnapshot.length > 1) {
|
2021-05-25 09:45:26 +00:00
|
|
|
maven("https://androidx.dev/snapshots/builds/$composeSnapshot/artifacts/repository/") {
|
|
|
|
content {
|
|
|
|
includeGroup("androidx.compose.animation")
|
|
|
|
includeGroup("androidx.compose.compiler")
|
|
|
|
includeGroup("androidx.compose.foundation")
|
|
|
|
includeGroup("androidx.compose.material")
|
|
|
|
includeGroup("androidx.compose.runtime")
|
|
|
|
includeGroup("androidx.compose.ui")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-07-15 06:44:05 +00:00
|
|
|
*/
|
2021-05-25 09:45:26 +00:00
|
|
|
|
2020-12-30 10:06:51 +00:00
|
|
|
configure<CrowdinExtension> { projectName = "android-password-store" }
|
2020-07-23 09:09:36 +00:00
|
|
|
|
|
|
|
android {
|
|
|
|
if (isSnapshot()) {
|
|
|
|
applicationVariants.all {
|
|
|
|
outputs.all {
|
|
|
|
(this as BaseVariantOutputImpl).outputFileName = "aps-${flavorName}_$versionName.apk"
|
|
|
|
}
|
|
|
|
}
|
2021-03-09 09:23:11 +00:00
|
|
|
}
|
2021-04-17 22:22:41 +00:00
|
|
|
compileOptions { isCoreLibraryDesugaringEnabled = true }
|
2020-07-23 09:09:36 +00:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId = "dev.msfjarvis.aps"
|
2020-10-16 15:18:11 +00:00
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
2020-07-23 09:09:36 +00:00
|
|
|
}
|
|
|
|
|
2021-07-15 06:44:05 +00:00
|
|
|
// buildFeatures.compose = true
|
2021-05-25 09:45:26 +00:00
|
|
|
|
2020-07-23 09:09:36 +00:00
|
|
|
lintOptions {
|
|
|
|
isAbortOnError = true
|
|
|
|
isCheckReleaseBuilds = false
|
2020-09-22 03:48:00 +00:00
|
|
|
disable("MissingTranslation", "PluralsCandidate", "ImpliedQuantity")
|
2021-05-22 16:46:52 +00:00
|
|
|
// https://issuetracker.google.com/issues/187524311
|
|
|
|
disable("DialogFragmentCallbacksDetector")
|
2021-05-25 09:45:26 +00:00
|
|
|
disable("CoroutineCreationDuringComposition")
|
2020-07-23 09:09:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
flavorDimensions("free")
|
|
|
|
productFlavors {
|
|
|
|
create("free") {}
|
|
|
|
create("nonFree") {}
|
|
|
|
}
|
2021-05-22 08:11:51 +00:00
|
|
|
testOptions { unitTests.isReturnDefaultValues = true }
|
2021-05-25 09:45:26 +00:00
|
|
|
|
|
|
|
composeOptions {
|
|
|
|
kotlinCompilerVersion = libs.versions.kotlin.get()
|
|
|
|
kotlinCompilerExtensionVersion = libs.versions.compose.get()
|
|
|
|
}
|
2020-07-23 09:09:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-04-17 22:22:41 +00:00
|
|
|
kapt(libs.dagger.hilt.compiler)
|
2021-05-12 10:41:32 +00:00
|
|
|
implementation(libs.androidx.annotation)
|
2021-04-17 22:22:41 +00:00
|
|
|
coreLibraryDesugaring(libs.android.desugarJdkLibs)
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(projects.autofillParser)
|
2021-07-11 17:22:26 +00:00
|
|
|
implementation(projects.cryptoPgp)
|
2021-04-17 22:42:13 +00:00
|
|
|
implementation(projects.formatCommon)
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(projects.openpgpKtx)
|
2021-06-04 06:00:30 +00:00
|
|
|
implementation(libs.androidx.activity.ktx)
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(libs.androidx.appcompat)
|
|
|
|
implementation(libs.androidx.autofill)
|
|
|
|
implementation(libs.androidx.biometricKtx)
|
|
|
|
implementation(libs.androidx.constraintlayout)
|
2021-06-04 06:00:30 +00:00
|
|
|
implementation(libs.androidx.core.ktx)
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(libs.androidx.documentfile)
|
2021-06-04 06:00:30 +00:00
|
|
|
implementation(libs.androidx.fragment.ktx)
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(libs.bundles.androidxLifecycle)
|
|
|
|
implementation(libs.androidx.material)
|
|
|
|
implementation(libs.androidx.preference)
|
|
|
|
implementation(libs.androidx.recyclerview)
|
|
|
|
implementation(libs.androidx.recyclerviewSelection)
|
|
|
|
implementation(libs.androidx.security)
|
|
|
|
implementation(libs.androidx.swiperefreshlayout)
|
2021-04-17 22:22:41 +00:00
|
|
|
implementation(libs.dagger.hilt.android)
|
2020-07-23 09:09:36 +00:00
|
|
|
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(libs.kotlin.coroutines.android)
|
|
|
|
implementation(libs.kotlin.coroutines.core)
|
2020-07-23 09:09:36 +00:00
|
|
|
|
2021-07-15 06:44:05 +00:00
|
|
|
// implementation(libs.androidx.activity.compose)
|
|
|
|
// implementation(libs.androidx.hilt.compose)
|
|
|
|
// implementation(libs.compose.foundation.core)
|
|
|
|
// implementation(libs.compose.foundation.layout)
|
|
|
|
// implementation(libs.compose.material)
|
|
|
|
// implementation(libs.compose.ui.core)
|
|
|
|
// implementation(libs.compose.ui.viewbinding)
|
|
|
|
// compileOnly(libs.compose.ui.tooling)
|
2021-05-25 09:45:26 +00:00
|
|
|
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(libs.aps.sublimeFuzzy)
|
|
|
|
implementation(libs.aps.zxingAndroidEmbedded)
|
2020-07-23 09:09:36 +00:00
|
|
|
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(libs.thirdparty.bouncycastle)
|
|
|
|
implementation(libs.thirdparty.eddsa)
|
|
|
|
implementation(libs.thirdparty.fastscroll)
|
|
|
|
implementation(libs.thirdparty.jgit) {
|
2020-07-23 09:09:36 +00:00
|
|
|
exclude(group = "org.apache.httpcomponents", module = "httpclient")
|
|
|
|
}
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(libs.thirdparty.kotlinResult)
|
|
|
|
implementation(libs.thirdparty.modernAndroidPrefs)
|
|
|
|
implementation(libs.thirdparty.plumber)
|
|
|
|
implementation(libs.thirdparty.sshauth)
|
|
|
|
implementation(libs.thirdparty.sshj)
|
|
|
|
implementation(libs.thirdparty.timber)
|
|
|
|
implementation(libs.thirdparty.timberkt)
|
2020-07-23 09:09:36 +00:00
|
|
|
|
|
|
|
if (isSnapshot()) {
|
2021-04-12 12:08:06 +00:00
|
|
|
implementation(libs.thirdparty.whatthestack)
|
2020-07-23 09:09:36 +00:00
|
|
|
} else {
|
2021-04-12 12:08:06 +00:00
|
|
|
debugImplementation(libs.thirdparty.whatthestack)
|
2020-07-23 09:09:36 +00:00
|
|
|
}
|
|
|
|
|
2021-06-07 17:18:17 +00:00
|
|
|
debugImplementation(libs.thirdparty.leakcanary)
|
|
|
|
add("nonFreeImplementation", libs.thirdparty.nonfree.googlePlayAuthApiPhone)
|
2020-07-23 09:09:36 +00:00
|
|
|
|
2021-04-12 12:08:06 +00:00
|
|
|
androidTestImplementation(libs.bundles.testDependencies)
|
|
|
|
androidTestImplementation(libs.bundles.androidTestDependencies)
|
2021-04-19 11:43:12 +00:00
|
|
|
testImplementation(libs.testing.robolectric)
|
2021-05-17 08:49:02 +00:00
|
|
|
testImplementation(libs.testing.sharedPrefsMock)
|
2021-04-12 12:08:06 +00:00
|
|
|
testImplementation(libs.bundles.testDependencies)
|
2020-07-23 09:09:36 +00:00
|
|
|
}
|