110 lines
2.8 KiB
Groovy
110 lines
2.8 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'jacoco'
|
|
apply from: "../gradle_scripts/code_quality.gradle"
|
|
|
|
android {
|
|
compileSdkVersion versions.compileSdk
|
|
|
|
defaultConfig {
|
|
applicationId "org.moire.ultrasonic"
|
|
versionCode 69
|
|
versionName "2.6.0"
|
|
|
|
minSdkVersion versions.minSdk
|
|
targetSdkVersion versions.targetSdk
|
|
|
|
resConfigs "en", "es", "fr", "hu", "pt", "pt-rBR"
|
|
}
|
|
|
|
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
|
|
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")
|
|
abortOnError true
|
|
}
|
|
}
|
|
|
|
tasks.withType(Test) {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':core:menudrawer')
|
|
implementation project(':core:pulltorefresh')
|
|
implementation project(':core:library')
|
|
implementation project(':core:domain')
|
|
implementation project(':core:subsonic-api')
|
|
implementation project(':core:subsonic-api-image-loader')
|
|
implementation project(':core:cache')
|
|
|
|
implementation androidSupport.support
|
|
implementation androidSupport.design
|
|
|
|
implementation other.kotlinStdlib
|
|
implementation other.koinAndroid
|
|
implementation other.koinJava
|
|
|
|
testImplementation other.kotlinReflect
|
|
testImplementation testing.junit
|
|
testRuntimeOnly testing.junitVintage
|
|
testImplementation testing.kotlinJunit
|
|
testImplementation testing.mockitoKotlin
|
|
testImplementation testing.kluent
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion(versions.jacoco)
|
|
}
|
|
|
|
// 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/**'
|
|
]
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion(versions.jacoco)
|
|
}
|
|
|
|
tasks.withType(Test) {
|
|
jacoco.includeNoLocationClasses = true
|
|
}
|