apply plugin: 'java-library'

//sourceSets {
    //main.java.srcDirs += "${buildDir}/generated/sources/annotationProcessor/java/main/"
//    test.java.srcDirs += "${buildDir}/generated/sources/annotationProcessor/java/test/"
//}

dependencies {

    implementation project(':entity')

    // Smack
    // Not all of those are needed, but it may be a good idea to define those versions explicitly
    api "org.igniterealtime.smack:smack-core:$smackCoreVersion"
    api "org.igniterealtime.smack:smack-experimental:$smackExperimentalVersion"
    api "org.igniterealtime.smack:smack-extensions:$smackExtensionsVersion"
    api "org.igniterealtime.smack:smack-im:$smackImVersion"
    api "org.igniterealtime.smack:smack-tcp:$smackTcpVersion"
    api "org.igniterealtime.smack:smack-openpgp:$smackOpenpgpVersion"
    api "org.igniterealtime.smack:smack-omemo:$smackOmemoVersion"
    api "org.igniterealtime.smack:smack-omemo-signal:$smackOmemoSignalVersion"

    api "org.jxmpp:jxmpp-core:1.0.1"
    api "org.jxmpp:jxmpp-jid:1.0.1"

    testImplementation "org.igniterealtime.smack:smack-java7:$smackJava7Version"

    // RxJava2
    implementation "io.reactivex.rxjava2:rxjava:$rxJava2Version"

    // Dagger 2 for dependency injection
    implementation "com.google.dagger:dagger:$daggerVersion"
    testImplementation "com.google.dagger:dagger:$daggerVersion"
    annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
    testAnnotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"

    compileOnly "org.projectlombok:lombok:$lombokVersion"
    annotationProcessor "org.projectlombok:lombok:$lombokVersion"

    // JUnit for testing
    testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
    testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
    testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"

    // The smack-extensions subproject uses mockito in its fest
    // fixtures, and we want to have mockito also available in
    // test, so we use API here.
    testImplementation "org.mockito:mockito-core:3.3.3"

    // To mock final classes
    testImplementation 'org.mockito:mockito-inline:3.3.3'
    testImplementation 'com.jamesmurty.utils:java-xmlbuilder:1.2'
}

sourceCompatibility = "8"
targetCompatibility = "8"
