build.gradle 2.04 KB
Newer Older
1 2 3
plugins {
	id 'java'
	id 'idea'
4 5
	id 'org.jetbrains.kotlin.jvm' version '1.3.31'
	id 'org.jetbrains.kotlin.kapt' version '1.3.31'
6 7 8 9 10 11 12 13 14 15 16
	id 'witness'
}
apply from: 'witness.gradle'

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
	implementation project(path: ':briar-core', configuration: 'default')
	implementation project(path: ':bramble-java', configuration: 'default')

17 18 19
	implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.31'
	implementation 'io.javalin:javalin:2.8.0'
	implementation 'org.slf4j:slf4j-simple:1.7.26'
akwizgran's avatar
akwizgran committed
20
	implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
21
	implementation 'com.github.ajalt:clikt:2.0.0'
22

23 24
	def daggerVersion = '2.22.1'
	kapt "com.google.dagger:dagger-compiler:$daggerVersion"
25 26 27

	testImplementation project(path: ':bramble-api', configuration: 'testOutput')
	testImplementation project(path: ':bramble-core', configuration: 'testOutput')
28
	testImplementation project(path: ':briar-core', configuration: 'testOutput')
29

30
	def junitVersion = '5.4.2'
31 32 33
	testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
	testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
	testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
34 35
	testImplementation 'io.mockk:mockk:1.9.3'
	testImplementation 'org.skyscreamer:jsonassert:1.5.0'
36 37
	testImplementation 'khttp:khttp:0.1.0'

38
	kaptTest "com.google.dagger:dagger-compiler:$daggerVersion"
39 40 41 42 43
}

jar {
	manifest {
		attributes(
44
				'Main-Class': 'org.briarproject.briar.headless.MainKt'
45 46 47 48 49 50
		)
	}
	from {
		configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
	}
}
51

52 53 54 55 56
// At the moment for non-Android projects we need to explicitly mark the code generated by kapt
// as 'generated source code' for correct highlighting and resolve in IDE.
idea {
	module {
		sourceDirs += file('build/generated/source/kapt/main')
57
		testSourceDirs += file('build/generated/source/kapt/test')
58 59 60 61
		generatedSourceDirs += file('build/generated/source/kapt/main')
	}
}

62 63 64 65 66 67
test {
	useJUnitPlatform()
	testLogging {
		events "passed", "skipped", "failed"
	}
}