dependencies {
    api project(':logging')
}

test {
    systemProperty 'java.util.logging.manager', 'org.xbib.logging.LogManager'
    systemProperty 'javax.net.ssl.keyStore', 'src/test/resources/org/xbib/logging/ext/test/server-keystore.jks'
    systemProperty 'javax.net.ssl.keyStorePassword', 'testpassword'
    systemProperty 'javax.net.ssl.trustStore', 'src/test/resources/org/xbib/logging/ext/test/client-keystore.jks'
    systemProperty 'javax.net.ssl.trustStorePassword', 'testpassword'
}

def moduleName = 'org.xbib.logging.ext.test'
def patchArgs = ['--patch-module', "$moduleName=" + files(sourceSets.test.resources.srcDirs).asPath ]

tasks.named('compileTestJava') {
    options.compilerArgs += patchArgs
}

tasks.named('test') {
    jvmArgs += patchArgs
}
