build.gradle 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. apply plugin: 'java-library'
  2. sourceCompatibility = 1.8
  3. targetCompatibility = 1.8
  4. apply plugin: 'ru.vyarus.animalsniffer'
  5. apply plugin: 'idea'
  6. apply plugin: 'witness'
  7. apply from: 'witness.gradle'
  8. apply from: '../dagger.gradle'
  9. dependencies {
  10. api project(':bramble-api')
  11. api 'org.briarproject:jtorctl:0.5'
  12. implementation "org.bouncycastle:bcprov-jdk15to18:$bouncy_castle_version"
  13. //noinspection GradleDependency
  14. implementation 'com.h2database:h2:1.4.192' // The last version that supports Java 1.6
  15. implementation 'org.bitlet:weupnp:0.1.4'
  16. implementation 'net.i2p.crypto:eddsa:0.2.0'
  17. implementation 'org.whispersystems:curve25519-java:0.5.0'
  18. implementation 'org.briarproject:socks-socket:0.1'
  19. implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
  20. implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
  21. annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
  22. testImplementation project(path: ':bramble-api', configuration: 'testOutput')
  23. testImplementation 'org.hsqldb:hsqldb:2.3.5' // The last version that supports Java 1.6
  24. testImplementation 'net.jodah:concurrentunit:0.4.2'
  25. testImplementation "junit:junit:$junit_version"
  26. testImplementation "org.jmock:jmock:$jmock_version"
  27. testImplementation "org.jmock:jmock-junit4:$jmock_version"
  28. testImplementation "org.jmock:jmock-imposters:$jmock_version"
  29. testImplementation "com.squareup.okhttp3:mockwebserver:$mockwebserver_version"
  30. testAnnotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
  31. signature 'org.codehaus.mojo.signature:java16:1.1@signature'
  32. }
  33. animalsniffer {
  34. // Allow requireNonNull: Android desugaring rewrites it (so it's safe for us to use),
  35. // and it gets used when passing method references instead of lambdas with Java 11.
  36. // Note that this line allows *all* methods from java.util.Objects.
  37. // That's the best that we can do with the configuration options that Animal Sniffer offers.
  38. ignore 'java.util.Objects'
  39. }
  40. // needed to make test output available to bramble-java
  41. configurations {
  42. testOutput.extendsFrom(testCompile)
  43. }
  44. task jarTest(type: Jar, dependsOn: testClasses) {
  45. from sourceSets.test.output, sourceSets.main.output
  46. classifier = 'test'
  47. }
  48. artifacts {
  49. testOutput jarTest
  50. }