Move domain entities to own module.

This allow other modules to depend on them.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
This commit is contained in:
Yahor Berdnikau 2018-03-10 18:24:37 +01:00
parent 4952e1d240
commit ad52e3ad95
21 changed files with 47 additions and 5 deletions

38
domain/build.gradle Normal file
View File

@ -0,0 +1,38 @@
apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'jacoco'
apply from: '../gradle_scripts/code_quality.gradle'
dependencies {
api other.kotlinStdlib
api other.semver
}
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
}
}

View File

@ -1,10 +1,12 @@
package org.moire.ultrasonic.domain
import org.moire.ultrasonic.domain.MusicDirectory.Entry
/**
* The result of a search. Contains matching artists, albums and songs.
*/
data class SearchResult(
val artists: List<Artist>,
val albums: List<MusicDirectory.Entry>,
val songs: List<MusicDirectory.Entry>
val albums: List<Entry>,
val songs: List<Entry>
)

View File

@ -1,4 +1,7 @@
include ':library', ':subsonic-api', ':cache'
include ':library'
include ':domain'
include ':subsonic-api'
include ':cache'
include ':menudrawer'
include ':pulltorefresh'
include ':ultrasonic'

View File

@ -47,6 +47,7 @@ dependencies {
implementation project(':menudrawer')
implementation project(':pulltorefresh')
implementation project(':library')
implementation project(':domain')
implementation project(':subsonic-api')
implementation project(':cache')
@ -55,8 +56,6 @@ dependencies {
implementation other.kotlinStdlib
implementation other.semver
testImplementation other.kotlinReflect
testImplementation testing.junit
testImplementation testing.kotlinJunit