-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
108 lines (92 loc) · 3.15 KB
/
build.gradle.kts
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
105
106
107
plugins {
kotlin("jvm") version "1.7.10"
kotlin("plugin.serialization") version "1.7.10"
kotlin("kapt") version "1.7.10"
id("org.jetbrains.kotlinx.kover") version "0.5.1"
id("org.jetbrains.dokka") version "1.7.0"
id("org.sonarqube") version "3.3"
jacoco
id("com.github.hierynomus.license") version "0.16.1"
`java-library`
`maven-publish`
}
repositories {
mavenCentral()
}
val okHttpVersion = "4.10.0"
val kotestVersion = "5.3.2"
val coroutineVersion = "1.6.3-native-mt"
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
extensions.configure(kotlinx.kover.api.KoverTaskExtension::class) {
isEnabled = true
excludes = listOf(
"com\\.philips\\.hsdp\\.apis\\..*\\.domain\\.sdk\\..*",
"com\\.philips\\.hsdp\\.apis\\..*\\.domain\\.hsdp\\..*",
)
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.7.10")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutineVersion")
implementation("com.squareup.okhttp3:okhttp:$okHttpVersion")
compileOnly("io.jsonwebtoken:jjwt-api:0.11.5")
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.11.5")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.11.5")
implementation("com.thinkinglogic.builder:kotlin-builder-annotation:1.2.1")
kapt("com.thinkinglogic.builder:kotlin-builder-processor:1.2.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutineVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-json:$kotestVersion")
testImplementation("io.mockk:mockk:1.12.4")
testImplementation("com.squareup.okhttp3:mockwebserver:$okHttpVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
}
license {
header = file("copyright-header")
skipExistingHeaders = true
strictCheck = true
includes(listOf("**/*.kt", "**/*.java"))
}
downloadLicenses {
includeProjectDependencies = true
dependencyConfiguration = "default"
}
tasks.check {
dependsOn(tasks["license"])
}
tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
dokkaSourceSets {
named("main") {
includes.from("Module.md")
}
}
}
publishing {
publications {
create<MavenPublication>("kotlin-hsdp-sdk") {
from(components["kotlin"])
pom {
licenses {
license {
name.set("The MIT License")
url.set("https://opensource.org/licenses/MIT")
distribution.set("repo")
}
}
}
}
}
}