ultrasonic-app-subsonic-and.../ultrasonic/build.gradle

159 lines
4.1 KiB
Groovy

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'jacoco'
apply from: "../gradle_scripts/code_quality.gradle"
android {
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "org.moire.ultrasonic"
versionCode 98
versionName "2.24.0"
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
resConfigs "cs", "de", "en", "es", "fr", "hu", "it", "nl", "pl", "pt", "pt-rBR", "ru", "zh-rCN", "zh-rTW"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'minify/proguard-main.pro',
'minify/proguard-okhttp.pro',
'minify/proguard-retrofit.pro',
'minify/proguard-jackson.pro',
'minify/proguard-kotlin-reflect.pro',
'minify/proguard-kotlin.pro'
}
debug {
minifyEnabled false
multiDexEnabled true
testCoverageEnabled true
applicationIdSuffix ".debug"
}
}
sourceSets {
main.java.srcDirs += "${projectDir}/src/main/kotlin"
test.java.srcDirs += "${projectDir}/src/test/kotlin"
}
packagingOptions {
exclude 'META-INF/LICENSE'
}
lintOptions {
baselineFile file("lint-baseline.xml")
ignore 'MissingTranslation'
warning 'ImpliedQuantity'
disable 'IconMissingDensityFolder', "VectorPath"
abortOnError true
warningsAsErrors true
}
kotlinOptions {
jvmTarget = "1.8"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kapt {
arguments {
arg("room.schemaLocation", "$buildDir/schemas".toString())
}
}
}
tasks.withType(Test) {
useJUnitPlatform()
}
dependencies {
implementation project(':core:domain')
implementation project(':core:subsonic-api')
api(libs.picasso) {
exclude group: "com.android.support"
}
implementation libs.core
implementation libs.support
implementation libs.design
implementation libs.multidex
implementation libs.roomRuntime
implementation libs.roomKtx
implementation libs.viewModelKtx
implementation libs.constraintLayout
implementation libs.preferences
implementation libs.media
implementation libs.navigationFragment
implementation libs.navigationUi
implementation libs.navigationFragmentKtx
implementation libs.navigationUiKtx
implementation libs.navigationFeature
implementation libs.kotlinStdlib
implementation libs.kotlinxCoroutines
implementation libs.koinAndroid
implementation libs.okhttpLogging
implementation libs.fastScroll
implementation libs.colorPickerView
implementation libs.rxJava
implementation libs.rxAndroid
implementation libs.multiType
kapt libs.room
testImplementation libs.kotlinReflect
testImplementation libs.junit
testRuntimeOnly libs.junitVintage
testImplementation libs.kotlinJunit
testImplementation libs.kluent
testImplementation libs.mockito
testImplementation libs.mockitoInline
testImplementation libs.mockitoKotlin
testImplementation libs.robolectric
implementation libs.timber
}
jacoco {
toolVersion(libs.versions.jacoco.get())
}
// Excluding all java classes and stuff that should not be covered
ext {
jacocoExclude = [
'**/activity/**',
'**/audiofx/**',
'**/fragment/**',
'**/provider/**',
'**/receiver/**',
'**/service/**',
'**/Test/**',
'**/util/**',
'**/view/**',
'**/R$*.class',
'**/R.class',
'**/BuildConfig.class',
'**/di/**',
'jdk.internal.*'
]
}
jacoco {
toolVersion(libs.versions.jacoco.get())
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes += jacocoExclude
}