This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
70 lines (57 loc) · 1.75 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.21"
kotlin("kapt") version "1.8.21"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("maven-publish")
}
group = "club.plutomc.talker"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
}
allprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
plugin("org.jetbrains.kotlin.kapt")
plugin("com.github.johnrengelman.shadow")
}
}
val apis = listOf("talker-api", "talker-api-client", "talker-api-server", "talker-bukkit", "talker-velocity", "talker-bungee")
val repoUser: String = System.getenv("MAVEN_USER")
val repoPwd: String = System.getenv("MAVEN_PASSWORD")
subprojects {
if (apis.contains(name)) {
apply {
apply(plugin = "maven-publish")
publishing {
configure<PublishingExtension> {
publications.create<MavenPublication>(name) {
from(components["kotlin"])
groupId = project(":$name").group.toString()
artifactId = name
version = project(":$name").version.toString()
}
}
repositories {
maven {
url = uri("https://nexus.nostaldaisuki.cc/repository/maven-releases/")
credentials {
username = repoUser
password = repoPwd
}
}
}
}
}
}
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}