diff --git a/cache/build.gradle b/cache/build.gradle new file mode 100644 index 00000000..336add8d --- /dev/null +++ b/cache/build.gradle @@ -0,0 +1,40 @@ +apply plugin: 'java-library' +apply plugin: 'kotlin' +apply plugin: 'jacoco' +apply from: '../gradle_scripts/code_quality.gradle' + +sourceSets { + main.java.srcDirs += "${projectDir}/src/main/kotlin" +} +dependencies { + api other.kotlinStdlib +} + +jacoco { + toolVersion(versions.jacoco) +} + +ext { + jacocoExclude = [] +} + +jacocoTestReport { + reports { + html.enabled true + csv.enabled false + xml.enabled true + } + + afterEvaluate { + classDirectories = files(classDirectories.files.collect { + fileTree(dir: it, excludes: jacocoExclude) + }) + } +} + +test.finalizedBy jacocoTestReport +test { + jacoco { + excludes += jacocoExclude + } +} diff --git a/settings.gradle b/settings.gradle index 7601205f..8fa424c2 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,4 @@ -include ':library', ':subsonic-api' +include ':library', ':subsonic-api', ':cache' include ':menudrawer' include ':pulltorefresh' include ':ultrasonic' diff --git a/ultrasonic/build.gradle b/ultrasonic/build.gradle index e4050434..fbe94eca 100644 --- a/ultrasonic/build.gradle +++ b/ultrasonic/build.gradle @@ -48,6 +48,7 @@ dependencies { implementation project(':pulltorefresh') implementation project(':library') implementation project(':subsonic-api') + implementation project(':cache') implementation androidSupport.support implementation androidSupport.design