build.gradle 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. plugins {
  2. id 'java'
  3. id 'idea'
  4. id 'org.jetbrains.kotlin.jvm' version '1.2.71'
  5. id 'org.jetbrains.kotlin.kapt' version '1.2.71'
  6. id 'witness'
  7. }
  8. apply from: 'witness.gradle'
  9. sourceCompatibility = 1.8
  10. targetCompatibility = 1.8
  11. dependencies {
  12. implementation project(path: ':briar-core', configuration: 'default')
  13. implementation project(path: ':bramble-java', configuration: 'default')
  14. implementation 'io.javalin:javalin:2.4.0'
  15. implementation 'org.slf4j:slf4j-simple:1.7.25'
  16. implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
  17. implementation 'com.github.ajalt:clikt:1.5.0'
  18. kapt 'com.google.dagger:dagger-compiler:2.19'
  19. testImplementation project(path: ':bramble-api', configuration: 'testOutput')
  20. testImplementation project(path: ':bramble-core', configuration: 'testOutput')
  21. def junitVersion = '5.3.1'
  22. testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
  23. testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
  24. testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
  25. testImplementation "io.mockk:mockk:1.8.12"
  26. testImplementation "org.skyscreamer:jsonassert:1.5.0"
  27. testImplementation 'khttp:khttp:0.1.0'
  28. kaptTest 'com.google.dagger:dagger-compiler:2.19'
  29. }
  30. jar {
  31. manifest {
  32. attributes(
  33. 'Main-Class': 'org.briarproject.briar.headless.MainKt'
  34. )
  35. }
  36. from {
  37. configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
  38. }
  39. }
  40. // At the moment for non-Android projects we need to explicitly mark the code generated by kapt
  41. // as 'generated source code' for correct highlighting and resolve in IDE.
  42. idea {
  43. module {
  44. sourceDirs += file('build/generated/source/kapt/main')
  45. testSourceDirs += file('build/generated/source/kapt/test')
  46. generatedSourceDirs += file('build/generated/source/kapt/main')
  47. }
  48. }
  49. test {
  50. useJUnitPlatform()
  51. testLogging {
  52. events "passed", "skipped", "failed"
  53. }
  54. }