apply plugin: 'java' sourceCompatibility = 1.8 targetCompatibility = 1.8 apply plugin: 'witness' dependencies { compile "com.google.dagger:dagger:2.0.2" compile 'com.google.code.findbugs:jsr305:3.0.2' testCompile 'junit:junit:4.12' testCompile "org.jmock:jmock:2.8.2" testCompile "org.jmock:jmock-junit4:2.8.2" testCompile "org.jmock:jmock-legacy:2.8.2" testCompile "org.hamcrest:hamcrest-library:1.3" testCompile "org.hamcrest:hamcrest-core:1.3" } dependencyVerification { verify = [ 'com.google.dagger:dagger:84c0282ed8be73a29e0475d639da030b55dee72369e58dd35ae7d4fe6243dcf9', 'com.google.code.findbugs:jsr305:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7', 'javax.inject:javax.inject:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff', ] } // needed to make test output available to bramble-core and briar-core configurations { testOutput.extendsFrom(testCompile) } task jarTest(type: Jar, dependsOn: testClasses) { from sourceSets.test.output classifier = 'test' } artifacts { testOutput jarTest } // If a Java 6 JRE is available, check we're not using any Java 7 or 8 APIs tasks.withType(JavaCompile) { doFirst { def home = System.env.JAVA_6_HOME; if (home != null && !home.isEmpty()) { options.bootstrapClasspath = files("${home}/jre/lib/rt.jar", "${home}/jre/lib/jsse.jar") } } }