build.gradle 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. plugins {
  2. id 'java'
  3. id 'idea'
  4. id 'org.jetbrains.kotlin.jvm' version '1.3.40'
  5. id 'org.jetbrains.kotlin.kapt' version '1.3.40'
  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 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.40'
  15. implementation 'io.javalin:javalin:3.5.0'
  16. implementation 'org.slf4j:slf4j-simple:1.7.26'
  17. implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.0'
  18. implementation 'com.github.ajalt:clikt:2.2.0'
  19. def daggerVersion = '2.24'
  20. kapt "com.google.dagger:dagger-compiler:$daggerVersion"
  21. testImplementation project(path: ':bramble-api', configuration: 'testOutput')
  22. testImplementation project(path: ':bramble-core', configuration: 'testOutput')
  23. testImplementation project(path: ':briar-core', configuration: 'testOutput')
  24. def junitVersion = '5.5.2'
  25. testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
  26. testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
  27. testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
  28. testImplementation 'io.mockk:mockk:1.9.3'
  29. testImplementation 'org.skyscreamer:jsonassert:1.5.0'
  30. testImplementation 'khttp:khttp:0.1.0'
  31. kaptTest "com.google.dagger:dagger-compiler:$daggerVersion"
  32. }
  33. jar {
  34. manifest {
  35. attributes(
  36. 'Main-Class': 'org.briarproject.briar.headless.MainKt'
  37. )
  38. }
  39. from {
  40. configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
  41. }
  42. }
  43. // At the moment for non-Android projects we need to explicitly mark the code generated by kapt
  44. // as 'generated source code' for correct highlighting and resolve in IDE.
  45. idea {
  46. module {
  47. sourceDirs += file('build/generated/source/kapt/main')
  48. testSourceDirs += file('build/generated/source/kapt/test')
  49. generatedSourceDirs += file('build/generated/source/kapt/main')
  50. }
  51. }
  52. test {
  53. useJUnitPlatform()
  54. testLogging {
  55. events "passed", "skipped", "failed"
  56. }
  57. }