-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
119 lines (98 loc) · 2.92 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
111
112
113
114
115
116
117
118
119
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
`java-library`
java
`maven-publish`
kotlin("jvm") version "1.9.22"
id("maven-publish")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.jetbrains.dokka") version "1.9.20"
}
apply(plugin = "maven-publish")
val versionVar = "0.5.94"
val groupIdVar = "com.undefined"
val artifactIdVar = "api"
version = groupIdVar
publishing {
repositories {
maven {
name = "repo.undefinedcreation.com"
url = uri("https://repo.undefinedcreation.com/repo")
credentials(PasswordCredentials::class) {
username = System.getenv("MAVEN_NAME")
password = System.getenv("MAVEN_SECRET")
}
}
}
publications {
register<MavenPublication>("maven") {
groupId = groupIdVar
artifactId = artifactIdVar
version = versionVar
from(components["java"])
}
}
}
allprojects {
apply(plugin = "java")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.dokka")
group = groupIdVar
version = versionVar
publishing {
publications {
register<MavenPublication>("pubMaven") {
groupId = groupIdVar
artifactId = artifactIdVar
version = versionVar
from(components["java"])
}
}
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.codemc.io/repository/nms/")
maven {
name = "sonatype"
url = uri("https://oss.sonatype.org/content/groups/public/")
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("net.kyori:adventure-platform-bukkit:4.3.3")
implementation("net.kyori:adventure-text-minimessage:4.17.0")
implementation("net.kyori:adventure-text-serializer-plain:4.17.0")
implementation("net.kyori:adventure-text-serializer-legacy:4.17.0")
implementation("org.json:json:20231013")
implementation("com.googlecode.json-simple:json-simple:1.1.1")
}
}
dependencies {
implementation(project(":common"))
implementation(project(":v1_20_4:", "reobf"))
implementation(project(":v1_20_6:", "reobf"))
implementation(project(":v1_21:", "reobf"))
implementation(project(":v1_21_3:", "reobf"))
implementation(project(":api"))
}
tasks {
assemble {
dependsOn("shadowJar")
}
jar.configure {
dependsOn("shadowJar")
archiveClassifier.set("dev")
}
withType<ShadowJar> {
archiveClassifier.set("mapped")
archiveFileName.set("${project.name}-${project.version}.jar")
}
compileKotlin {
kotlinOptions.jvmTarget = "21"
}
}
kotlin {
jvmToolchain(21)
}