/
build.gradle.kts
70 lines (59 loc) · 1.17 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
@file:Suppress("UNUSED_VARIABLE")
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("maven-publish")
}
kotlin {
jvm()
js(IR) {
browser()
nodejs()
}
sourceSets {
val commonMain by getting {
dependencies {
api(project(":backbone"))
api(KotlinX.serialization.core)
implementation(project(":logger"))
}
}
val commonTest by getting {
dependencies {
implementation(project(":tester"))
api(KotlinX.coroutines.test)
implementation(KotlinX.serialization.json)
}
}
}
}
publishing {
repositories {
val projectId = System.getenv("CI_PROJECT_ID")
val token = System.getenv("CI_JOB_TOKEN")
if (projectId != null && token != null)
maven {
name = "GitLab"
url = uri("https://gitlab.com/api/v4/projects/$projectId/packages/maven")
credentials(HttpHeaderCredentials::class.java) {
name = "Job-Token"
value = token
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
else
println("The GitLab registry is disabled because credentials are missing.")
}
}
kover {
verify {
rule {
name = "Minimal code coverage"
bound {
minValue = 80
}
}
}
}