apply plugin: 'java-library'
sourceCompatibility = 1.8
targetCompatibility = 1.8

apply plugin: 'ru.vyarus.animalsniffer'
apply plugin: 'idea'
apply plugin: 'witness'
apply from: 'witness.gradle'
apply from: '../dagger.gradle'

dependencies {
	implementation project(path: ':bramble-api', configuration: 'default')
	implementation 'com.madgag.spongycastle:core:1.58.0.0'
	implementation 'com.h2database:h2:1.4.192' // The last version that supports Java 1.6
	implementation 'org.bitlet:weupnp:0.1.4'
	implementation 'net.i2p.crypto:eddsa:0.2.0'
	implementation 'org.whispersystems:curve25519-java:0.5.0'
	implementation 'org.briarproject:jtorctl:0.3'

	annotationProcessor 'com.google.dagger:dagger-compiler:2.24'

	testImplementation project(path: ':bramble-api', configuration: 'testOutput')
	testImplementation 'org.hsqldb:hsqldb:2.3.5' // The last version that supports Java 1.6
	testImplementation 'junit:junit:4.12'
	testImplementation "org.jmock:jmock:2.8.2"
	testImplementation "org.jmock:jmock-junit4:2.8.2"
	testImplementation "org.jmock:jmock-legacy:2.8.2"

	testAnnotationProcessor 'com.google.dagger:dagger-compiler:2.24'

	signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}

// needed to make test output available to bramble-java
configurations {
	testOutput.extendsFrom(testCompile)
}
task jarTest(type: Jar, dependsOn: testClasses) {
	from sourceSets.test.output
	classifier = 'test'
}
artifacts {
	testOutput jarTest
}
