2023-03-02 17:15:28 +01:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2021 The Calyx Institute
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2021-01-19 13:14:52 +01:00
|
|
|
plugins {
|
|
|
|
id 'com.android.library'
|
|
|
|
id 'com.google.protobuf'
|
2023-03-27 10:15:48 +02:00
|
|
|
id 'org.jetbrains.kotlin.android'
|
|
|
|
id 'org.jetbrains.kotlin.kapt'
|
|
|
|
id 'org.jetbrains.dokka'
|
|
|
|
id 'org.jlleitschuh.gradle.ktlint'
|
2021-01-19 13:14:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
|
|
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
testInstrumentationRunnerArguments disableAnalytics: 'true'
|
|
|
|
|
|
|
|
consumerProguardFiles "consumer-rules.pro"
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
all {
|
|
|
|
minifyEnabled true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
compileOptions {
|
2022-08-19 17:42:42 +02:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
targetCompatibility = JavaVersion.VERSION_11
|
2021-01-19 13:14:52 +01:00
|
|
|
}
|
|
|
|
kotlinOptions {
|
2022-08-19 17:42:42 +02:00
|
|
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
2023-03-27 09:42:56 +02:00
|
|
|
languageVersion = "1.7"
|
2023-03-27 12:20:03 +02:00
|
|
|
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
|
2021-01-19 13:14:52 +01:00
|
|
|
freeCompilerArgs += '-Xexplicit-api=strict'
|
|
|
|
}
|
|
|
|
protobuf {
|
|
|
|
protoc {
|
|
|
|
artifact = "com.google.protobuf:protoc:$protobuf_version"
|
|
|
|
}
|
|
|
|
generateProtoTasks {
|
|
|
|
all().each { task ->
|
|
|
|
task.builtins {
|
|
|
|
java {
|
|
|
|
option "lite"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-10-07 18:44:55 +02:00
|
|
|
lintOptions {
|
|
|
|
disable "DialogFragmentCallbacksDetector",
|
|
|
|
"InvalidFragmentVersionForActivityResult",
|
|
|
|
"CheckedExceptions"
|
|
|
|
}
|
2021-01-19 13:14:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
explicitApi = 'strict'
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-10-07 18:44:55 +02:00
|
|
|
implementation rootProject.ext.kotlin_libs.std
|
2021-01-19 13:14:52 +01:00
|
|
|
|
|
|
|
implementation rootProject.ext.std_libs.androidx_core
|
|
|
|
// A newer version gets pulled in with AOSP via core, so we include fragment here explicitly
|
|
|
|
implementation rootProject.ext.std_libs.androidx_fragment
|
2021-10-07 18:44:55 +02:00
|
|
|
implementation rootProject.ext.std_libs.androidx_activity
|
2021-01-19 13:14:52 +01:00
|
|
|
implementation rootProject.ext.std_libs.androidx_lifecycle_viewmodel_ktx
|
|
|
|
implementation rootProject.ext.std_libs.androidx_lifecycle_livedata_ktx
|
|
|
|
implementation rootProject.ext.std_libs.androidx_constraintlayout
|
|
|
|
implementation rootProject.ext.std_libs.androidx_documentfile
|
|
|
|
implementation rootProject.ext.std_libs.com_google_android_material
|
|
|
|
|
|
|
|
implementation rootProject.ext.storage_libs.androidx_room_runtime
|
|
|
|
implementation rootProject.ext.storage_libs.com_google_protobuf_javalite
|
|
|
|
implementation rootProject.ext.storage_libs.com_google_crypto_tink_android
|
|
|
|
kapt('androidx.room:room-compiler') {
|
|
|
|
version { strictly "$room_version" }
|
|
|
|
}
|
|
|
|
|
|
|
|
lintChecks rootProject.ext.lint_libs.exceptions
|
|
|
|
|
|
|
|
testImplementation "junit:junit:$junit4_version"
|
|
|
|
testImplementation "io.mockk:mockk:$mockk_version"
|
|
|
|
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
|
|
|
|
|
2021-10-07 18:44:55 +02:00
|
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
2021-01-19 13:14:52 +01:00
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
|
|
|
|
}
|
2021-03-03 20:06:26 +01:00
|
|
|
|
|
|
|
apply from: "${rootProject.rootDir}/gradle/ktlint.gradle"
|