-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
110 lines (100 loc) · 3.03 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
108
109
110
import java.net.URI
plugins {
kotlin("multiplatform") version libs.versions.kotlin.asProvider()
kotlin("plugin.serialization") version libs.versions.kotlin.asProvider()
id("xyz.wagyourtail.commons-gradle") version libs.versions.commons
`maven-publish`
}
allprojects {
apply(plugin = "base")
version = if (project.hasProperty("version_snapshot")) project.properties["version"] as String + "-SNAPSHOT" else project.properties["version"] as String
group = project.properties["group"] as String
base {
archivesName.set(project.properties["archives_base_name"] as String)
}
repositories {
mavenCentral()
maven("https://maven.wagyourtail.xyz/releases")
maven("https://maven.wagyourtail.xyz/snapshots")
}
}
kotlin {
jvmToolchain(8)
jvm {
withJava()
compilations.all {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}
}
js {
browser {
useCommonJs()
}
nodejs {
useCommonJs()
}
binaries.executable()
}
sourceSets {
val commonMain by getting {
dependencies {
api(libs.commons.kt)
api(libs.kotlin.logging)
api(libs.okio)
api(libs.jetbrains.annotations.kmp)
api(libs.kotlin.coroutines)
api(libs.kotlin.serialization.json)
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation(libs.kotlin.coroutines.tests)
}
}
val jvmMain by getting {
dependencies {
api(libs.appache.commons.compress)
api(libs.asm)
api(libs.asm.tree)
api(libs.slf4j.api)
api(libs.slf4j.simple)
}
}
val jvmTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-junit"))
}
}
val jsMain by getting {
dependencies {
implementation(npm("jszip", libs.versions.jszip.get()))
}
}
val jsTest by getting {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}
publishing {
repositories {
maven {
name = "WagYourMaven"
url = if (project.hasProperty("version_snapshot")) {
URI.create("https://maven.wagyourtail.xyz/snapshots/")
} else {
URI.create("https://maven.wagyourtail.xyz/releases/")
}
credentials {
username = project.findProperty("mvn.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("mvn.key") as String? ?: System.getenv("TOKEN")
}
}
}
}