2023-08-23 00:03:42 +03:00
|
|
|
plugins {
|
|
|
|
alias(libs.plugins.android.application)
|
|
|
|
alias(libs.plugins.detekt)
|
|
|
|
alias(libs.plugins.hilt)
|
|
|
|
alias(libs.plugins.kotlin.android)
|
2023-09-05 23:44:50 +03:00
|
|
|
alias(libs.plugins.kotlin.parcelize)
|
2023-08-23 00:03:42 +03:00
|
|
|
alias(libs.plugins.kotlin.serialization)
|
|
|
|
alias(libs.plugins.ksp)
|
|
|
|
kotlin("kapt")
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
namespace = "com.x8bit.bitwarden"
|
|
|
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId = "com.x8bit.bitwarden"
|
|
|
|
minSdk = libs.versions.minSdk.get().toInt()
|
|
|
|
targetSdk = libs.versions.targetSdk.get().toInt()
|
|
|
|
versionCode = 1
|
|
|
|
versionName = "1.0"
|
|
|
|
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
}
|
|
|
|
|
2023-09-19 21:17:29 +03:00
|
|
|
signingConfigs {
|
|
|
|
getByName("debug") {
|
|
|
|
keyAlias = "androiddebugkey"
|
|
|
|
keyPassword = "android"
|
|
|
|
storeFile = file("../keystores/debug.keystore")
|
|
|
|
storePassword = "android"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-23 00:03:42 +03:00
|
|
|
buildTypes {
|
2023-09-06 19:38:04 +03:00
|
|
|
debug {
|
|
|
|
applicationIdSuffix = ".dev"
|
2023-09-19 21:17:29 +03:00
|
|
|
signingConfig = signingConfigs.getByName("debug")
|
2023-09-06 19:38:04 +03:00
|
|
|
isDebuggable = true
|
2023-08-23 00:03:42 +03:00
|
|
|
isMinifyEnabled = false
|
2023-09-06 19:38:04 +03:00
|
|
|
}
|
|
|
|
release {
|
|
|
|
isDebuggable = false
|
|
|
|
isMinifyEnabled = true
|
2023-08-23 00:03:42 +03:00
|
|
|
proguardFiles(
|
|
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
|
|
"proguard-rules.pro"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility(libs.versions.jvmTarget.get())
|
|
|
|
targetCompatibility(libs.versions.jvmTarget.get())
|
|
|
|
}
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = libs.versions.jvmTarget.get()
|
|
|
|
}
|
|
|
|
buildFeatures {
|
|
|
|
compose = true
|
|
|
|
}
|
|
|
|
composeOptions {
|
|
|
|
kotlinCompilerExtensionVersion = libs.versions.kotlinCompilerExtensionVersion.get()
|
|
|
|
}
|
|
|
|
packaging {
|
|
|
|
resources {
|
|
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@Suppress("UnstableApiUsage")
|
|
|
|
testOptions {
|
|
|
|
// Required for Robolectric
|
|
|
|
unitTests.isIncludeAndroidResources = true
|
|
|
|
unitTests.isReturnDefaultValues = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(libs.androidx.activity.compose)
|
|
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
|
|
implementation(libs.androidx.compose.animation)
|
|
|
|
implementation(libs.androidx.compose.material3)
|
|
|
|
implementation(libs.androidx.compose.runtime)
|
|
|
|
implementation(libs.androidx.compose.ui)
|
|
|
|
implementation(libs.androidx.compose.ui.graphics)
|
|
|
|
implementation(libs.androidx.compose.ui.tooling.preview)
|
|
|
|
implementation(libs.androidx.core.ktx)
|
|
|
|
implementation(libs.androidx.hilt.navigation.compose)
|
2023-08-25 16:54:18 +03:00
|
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
2023-08-23 00:03:42 +03:00
|
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
|
|
implementation(libs.androidx.navigation.compose)
|
|
|
|
ksp(libs.androidx.room.compiler)
|
|
|
|
implementation(libs.androidx.room.ktx)
|
|
|
|
implementation(libs.androidx.room.runtime)
|
|
|
|
implementation(platform(libs.google.firebase.bom))
|
2023-09-15 00:27:34 +03:00
|
|
|
implementation(libs.bitwarden.sdk)
|
2023-08-23 00:03:42 +03:00
|
|
|
implementation(libs.bumptech.glide)
|
|
|
|
implementation(libs.google.firebase.cloud.messaging)
|
|
|
|
implementation(libs.google.firebase.crashlytics)
|
|
|
|
implementation(libs.google.hilt.android)
|
|
|
|
kapt(libs.google.hilt.compiler)
|
|
|
|
implementation(libs.jakewharton.retrofit.kotlinx.serialization)
|
|
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
|
|
implementation(libs.kotlinx.serialization)
|
|
|
|
implementation(libs.nulab.zxcvbn4j)
|
|
|
|
implementation(libs.square.okhttp)
|
|
|
|
implementation(libs.square.okhttp.logging)
|
|
|
|
implementation(libs.square.retrofit)
|
|
|
|
implementation(libs.zxing.zxing.core)
|
|
|
|
|
|
|
|
// For now we are restricted to running Compose tests for debug builds only
|
|
|
|
debugImplementation(libs.androidx.compose.ui.test.manifest)
|
|
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
|
|
|
|
|
|
testImplementation(libs.androidx.compose.ui.test)
|
|
|
|
testImplementation(libs.google.hilt.android.testing)
|
|
|
|
testImplementation(libs.junit.junit5)
|
|
|
|
testImplementation(libs.junit.vintage)
|
|
|
|
testImplementation(libs.kotlinx.coroutines.test)
|
|
|
|
testImplementation(libs.mockk.mockk)
|
|
|
|
testImplementation(libs.robolectric.robolectric)
|
2023-08-25 16:54:47 +03:00
|
|
|
testImplementation(libs.square.okhttp.mockwebserver)
|
2023-08-23 00:03:42 +03:00
|
|
|
testImplementation(libs.square.turbine)
|
|
|
|
|
|
|
|
detektPlugins(libs.detekt.detekt.formatting)
|
|
|
|
detektPlugins(libs.detekt.detekt.rules)
|
|
|
|
}
|
|
|
|
|
|
|
|
detekt {
|
|
|
|
autoCorrect = true
|
|
|
|
config.from(files("$rootDir/detekt-config.yml"))
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
getByName("check") {
|
|
|
|
// Add detekt with type resolution to check
|
|
|
|
dependsOn("detektMain")
|
|
|
|
}
|
|
|
|
|
|
|
|
withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
|
|
|
|
jvmTarget = libs.versions.jvmTarget.get()
|
|
|
|
}
|
|
|
|
withType<io.gitlab.arturbosch.detekt.DetektCreateBaselineTask>().configureEach {
|
|
|
|
jvmTarget = libs.versions.jvmTarget.get()
|
|
|
|
}
|
|
|
|
|
|
|
|
withType<Test> {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
}
|