2021-06-20 16:31:08 +02:00
|
|
|
/**
|
|
|
|
* This module provides a base for for submodules which depend on the Android runtime
|
|
|
|
*/
|
2018-10-06 13:52:14 +02:00
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
apply plugin: 'kotlin-android'
|
2018-10-07 21:21:49 +02:00
|
|
|
apply plugin: 'jacoco'
|
2018-10-06 13:52:14 +02:00
|
|
|
apply from: "${project.rootDir}/gradle_scripts/code_quality.gradle"
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion versions.compileSdk
|
|
|
|
|
|
|
|
defaultConfig {
|
2020-04-26 12:05:28 +02:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2018-10-06 13:52:14 +02:00
|
|
|
minSdkVersion versions.minSdk
|
|
|
|
targetSdkVersion versions.targetSdk
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
2021-04-18 22:21:34 +02:00
|
|
|
// Sets Java compatibility to Java 8
|
2018-10-06 13:52:14 +02:00
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main.java.srcDirs += "${projectDir}/src/main/kotlin"
|
|
|
|
test.java.srcDirs += "${projectDir}/src/test/kotlin"
|
|
|
|
test.java.srcDirs += "${projectDir}/src/integrationTest/kotlin"
|
|
|
|
test.resources.srcDirs += "${projectDir}/src/integrationTest/resources"
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
|
|
|
minifyEnabled false
|
|
|
|
debuggable true
|
|
|
|
}
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-18 22:18:41 +02:00
|
|
|
buildFeatures {
|
|
|
|
buildConfig = false
|
2021-12-22 13:26:58 +01:00
|
|
|
viewBinding true
|
2021-12-22 13:36:13 +01:00
|
|
|
dataBinding true
|
2018-10-06 13:52:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-10-06 14:54:28 +02:00
|
|
|
tasks.withType(Test) {
|
|
|
|
useJUnitPlatform()
|
2018-10-07 21:21:49 +02:00
|
|
|
jacoco {
|
2020-08-24 13:59:40 +02:00
|
|
|
includeNoLocationClasses = true
|
2018-10-07 21:21:49 +02:00
|
|
|
excludes += jacocoExclude
|
|
|
|
}
|
2018-10-06 14:54:28 +02:00
|
|
|
}
|
|
|
|
|
2018-10-06 13:52:14 +02:00
|
|
|
dependencies {
|
2021-12-20 21:25:51 +01:00
|
|
|
api libs.kotlinStdlib
|
2018-10-06 14:54:28 +02:00
|
|
|
|
2021-12-20 21:25:51 +01:00
|
|
|
testImplementation libs.junit
|
|
|
|
testRuntimeOnly libs.junitVintage
|
2018-10-06 13:52:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
jacoco {
|
2021-12-20 21:25:51 +01:00
|
|
|
toolVersion(libs.versions.jacoco.get())
|
2018-10-06 13:52:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ext {
|
2020-08-24 13:59:40 +02:00
|
|
|
jacocoExclude = ['jdk.internal.*']
|
2018-10-06 13:52:14 +02:00
|
|
|
}
|
|
|
|
|