-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
87 lines (77 loc) · 1.85 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("multiplatform") version "1.7.10"
`maven-publish`
}
group = "com.martmists.kotpack"
version = "1.0.5"
repositories {
mavenCentral()
maven("https://maven.martmists.com/releases")
}
kotlin {
jvm()
js(IR) {
browser()
nodejs()
}
linuxX64()
linuxArm64()
mingwX64()
macosX64()
macosArm64()
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.martmists.commons:commons-mpp-datastructures:1.0.4")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
}
}
tasks {
named("publish") {
dependsOn("allTests")
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
if (project.ext.has("mavenToken")) {
publishing {
repositories {
maven {
name = "Host"
url = uri("https://maven.martmists.com/releases")
credentials {
username = "admin"
password = project.ext["mavenToken"]!! as String
}
}
}
}
} else if (System.getenv("CI") == "true") {
publishing {
repositories {
maven {
name = "Host"
url = uri(System.getenv("GITHUB_TARGET_REPO")!!)
credentials {
username = "github-actions"
password = System.getenv("DEPLOY_KEY")!!
}
}
}
publications.withType<MavenPublication> {
if (System.getenv("DEPLOY_TYPE") == "snapshot") {
version = System.getenv("GITHUB_SHA")!!
}
}
}
}