2023-10-13 07:42:24 +02:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2020 The Calyx Institute
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
plugins {
|
2024-05-30 08:07:16 +02:00
|
|
|
alias(libs.plugins.android.application)
|
|
|
|
alias(libs.plugins.jetbrains.kotlin.android)
|
2023-10-13 07:42:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
namespace = "org.calyxos.backup.contacts"
|
|
|
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId = "org.calyxos.backup.contacts"
|
|
|
|
minSdk = libs.versions.minSdk.get().toInt()
|
|
|
|
targetSdk = libs.versions.targetSdk.get().toInt()
|
|
|
|
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
2024-05-30 06:21:13 +02:00
|
|
|
testInstrumentationRunnerArguments["disableAnalytics"] = "true"
|
2023-10-13 07:42:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
}
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
|
|
}
|
|
|
|
|
2024-05-30 06:21:13 +02:00
|
|
|
packaging {
|
|
|
|
resources {
|
|
|
|
excludes += listOf("META-INF/LICENSE.md", "META-INF/LICENSE-notice.md")
|
|
|
|
}
|
2023-10-13 07:42:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
testOptions.unitTests {
|
|
|
|
isReturnDefaultValues = true
|
|
|
|
}
|
|
|
|
|
2024-09-27 18:42:38 +02:00
|
|
|
signingConfigs {
|
|
|
|
create("aosp") {
|
|
|
|
keyAlias = "android"
|
|
|
|
keyPassword = "android"
|
|
|
|
storePassword = "android"
|
|
|
|
storeFile = file("testkey.jks")
|
2023-10-13 07:42:24 +02:00
|
|
|
}
|
2024-09-27 18:42:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
getByName("release").signingConfig = signingConfigs.getByName("aosp")
|
|
|
|
getByName("debug").signingConfig = signingConfigs.getByName("aosp")
|
2023-10-13 07:42:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
val aospDeps = fileTree(mapOf("include" to listOf("com.android.vcard.jar"), "dir" to "libs"))
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(aospDeps)
|
|
|
|
|
|
|
|
testImplementation(libs.kotlin.stdlib.jdk8)
|
|
|
|
testImplementation("junit:junit:${libs.versions.junit4.get()}")
|
|
|
|
testImplementation("io.mockk:mockk:${libs.versions.mockk.get()}")
|
|
|
|
|
|
|
|
androidTestImplementation(libs.kotlin.stdlib.jdk8)
|
|
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
2023-10-19 06:23:06 +02:00
|
|
|
androidTestImplementation(
|
2024-09-27 18:42:38 +02:00
|
|
|
"androidx.test.espresso:espresso-core:${libs.versions.espresso.get()}"
|
|
|
|
)
|
2023-10-13 07:42:24 +02:00
|
|
|
androidTestImplementation("io.mockk:mockk-android:${libs.versions.mockk.get()}")
|
|
|
|
}
|