-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
104 lines (83 loc) · 2.56 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript{
ext {
bouncyCastleVersion = '1.70'
kotlinCoroutinesVersion = '1.8.1'
junit5Version = '5.11.4'
okhttpVersion = '4.12.0'
}
}
plugins {
id("org.jetbrains.kotlin.jvm") version "1.9.24"
id('java-library')
id("org.jetbrains.dokka") version "2.0.0"
id("org.jlleitschuh.gradle.ktlint") version "12.1.2"
id('jacoco')
id('idea')
id('signing')
id('maven-publish')
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
apply from: 'unitTest.gradle'
apply from: 'release.gradle'
group = "tech.relaycorp"
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom runtimeOnly
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$kotlinCoroutinesVersion")
implementation("org.bouncycastle:bcpkix-jdk15on:$bouncyCastleVersion") // Crypto
implementation("org.bouncycastle:bcprov-jdk15on:$bouncyCastleVersion") // ASN.1 serialization
implementation("com.squareup.okhttp3:okhttp:$okhttpVersion")
implementation("dnsjava:dnsjava:3.5.3")
testImplementation("org.junit.jupiter:junit-jupiter:$junit5Version")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junit5Version")
testImplementation("io.kotest:kotest-assertions-core-jvm:5.9.1")
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
testImplementation("org.mockito:mockito-inline:5.2.0")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutinesVersion")
}
kotlin {
explicitApi()
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11
kotlinOptions.freeCompilerArgs += [
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
]
}
tasks.register('integrationTest', Test) {
description = 'Integration tests'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
shouldRunAfter test
useJUnitPlatform()
}
check.dependsOn integrationTest
ktlint {
version.set("0.48.2")
}
dokkaHtml.configure {
dokkaSourceSets {
configureEach {
includes.from(project.files(), "api.md")
reportUndocumented.set(true)
}
}
}