Android-Password-Store/app/build.gradle.kts

144 lines
4.9 KiB
Text
Raw Normal View History

2020-07-23 09:09:36 +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 {
2021-11-28 20:57:21 +00:00
id("com.github.android-password-store.android-application")
id("com.github.android-password-store.crowdin-plugin")
id("com.github.android-password-store.kotlin-android")
id("com.github.android-password-store.kotlin-kapt")
id("com.github.android-password-store.versioning-plugin")
id("dagger.hilt.android.plugin")
}
repositories {
val composeSnapshot = libs.versions.composeSnapshot.get()
if (composeSnapshot.length > 1) {
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-11-28 20:57:21 +00:00
configure<crowdin.CrowdinExtension> {
projectName = "android-password-store"
skipCleanup = false
}
fun isSnapshot(): Boolean {
with(project.providers) {
val workflow = environmentVariable("GITHUB_WORKFLOW").forUseAtConfigurationTime()
val snapshot = environmentVariable("SNAPSHOT").forUseAtConfigurationTime()
return workflow.isPresent || snapshot.isPresent
}
}
2020-07-23 09:09:36 +00:00
android {
if (isSnapshot()) {
applicationVariants.all {
outputs.all {
(this as BaseVariantOutputImpl).outputFileName = "aps-${flavorName}_$versionName.apk"
}
2020-07-23 09:09:36 +00:00
}
}
compileOptions { isCoreLibraryDesugaringEnabled = true }
2020-07-23 09:09:36 +00:00
defaultConfig {
applicationId = "dev.msfjarvis.aps"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
2020-07-23 09:09:36 +00:00
buildFeatures.compose = true
lint {
isAbortOnError = true
isCheckReleaseBuilds = false
disable("MissingTranslation", "PluralsCandidate", "ImpliedQuantity")
disable("CoroutineCreationDuringComposition")
}
2020-07-23 09:09:36 +00:00
composeOptions { kotlinCompilerExtensionVersion = libs.versions.compose.get() }
2020-07-23 09:09:36 +00:00
}
dependencies {
kapt(libs.dagger.hilt.compiler)
implementation(libs.androidx.annotation)
coreLibraryDesugaring(libs.android.desugarJdkLibs)
2021-04-12 12:08:06 +00:00
implementation(projects.autofillParser)
implementation(projects.coroutineUtils)
implementation(projects.cryptoPgpainless)
implementation(projects.formatCommon)
2021-04-12 12:08:06 +00:00
implementation(projects.openpgpKtx)
2021-12-10 09:22:26 +00:00
implementation(projects.passgen.diceware)
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)
implementation(libs.androidx.core.ktx)
2021-04-12 12:08:06 +00:00
implementation(libs.androidx.documentfile)
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)
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
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.androidx.compose.material3)
implementation(libs.compose.ui.core)
implementation(libs.compose.ui.viewbinding)
compileOnly(libs.compose.ui.tooling)
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.flowbinding.android)
2021-04-12 12:08:06 +00:00
implementation(libs.thirdparty.jgit) {
exclude(group = "org.apache.httpcomponents", module = "httpclient")
}
2021-04-12 12:08:06 +00:00
implementation(libs.thirdparty.kotlinResult)
implementation(libs.thirdparty.logcat)
2021-04-12 12:08:06 +00:00
implementation(libs.thirdparty.modernAndroidPrefs)
implementation(libs.thirdparty.plumber)
implementation(libs.thirdparty.sshauth)
implementation(libs.thirdparty.sshj)
2020-07-23 09:09:36 +00:00
if (isSnapshot()) {
2021-04-12 12:08:06 +00:00
implementation(libs.thirdparty.whatthestack)
} else {
2021-04-12 12:08:06 +00:00
debugImplementation(libs.thirdparty.whatthestack)
}
2020-07-23 09:09:36 +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)
testImplementation(libs.testing.robolectric)
testImplementation(libs.testing.sharedPrefsMock)
2021-04-12 12:08:06 +00:00
testImplementation(libs.bundles.testDependencies)
2020-07-23 09:09:36 +00:00
}