-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
104 lines (83 loc) · 2.54 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 {
kotlinCoroutinesVersion = '1.9.0'
ktorVersion = '3.0.3'
junit5Version = '5.11.4'
okhttpVersion = '4.12.0'
}
}
plugins {
id("org.jetbrains.kotlin.jvm") version "2.0.21"
id('java-library')
id("org.jetbrains.dokka") version "2.0.0"
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
id('jacoco')
id('idea')
id('signing')
id('maven-publish')
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
apply from: 'jacoco.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("io.ktor:ktor-client-okhttp:$ktorVersion")
implementation("com.squareup.okhttp3:okhttp:$okhttpVersion")
implementation("dnsjava:dnsjava:3.6.2")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.junit.jupiter:junit-jupiter:$junit5Version")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junit5Version")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutinesVersion")
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
testImplementation("org.mockito:mockito-inline:5.2.0")
testImplementation("io.ktor:ktor-client-mock:$ktorVersion")
testImplementation("io.ktor:ktor-client-mock-jvm:$ktorVersion")
}
kotlin {
explicitApi()
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions.freeCompilerArgs = 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
// Documentation
dokkaHtml.configure {
dokkaSourceSets {
configureEach {
reportUndocumented.set(true)
}
}
}