-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
88 lines (73 loc) · 2.29 KB
/
build.gradle.kts
File metadata and controls
88 lines (73 loc) · 2.29 KB
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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.shadow)
alias(libs.plugins.kapt)
`maven-publish`
}
val baseVersion = "0.0.2"
val commitHash = System.getenv("COMMIT_HASH")
val snapshotversion = "${baseVersion}-dev.$commitHash"
allprojects {
group = "app.simplecloud.plugin.command"
version = if (commitHash != null) snapshotversion else baseVersion
repositories {
mavenCentral()
maven("https://buf.build/gen/maven")
maven("https://repo.papermc.io/repository/maven-public/")
}
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "com.gradleup.shadow")
apply(plugin = "org.jetbrains.kotlin.kapt")
apply(plugin = "maven-publish")
dependencies {
testImplementation(rootProject.libs.kotlin.test)
implementation(rootProject.libs.kotlin.jvm)
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
kotlin {
jvmToolchain(21)
compilerOptions {
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0)
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
}
}
tasks.named("shadowJar", ShadowJar::class) {
dependencies {
exclude(dependency("com.velocitypowered:velocity-api"))
relocate("org.incendo", "app.simplecloud.plugin.command.external")
}
/* dependsOn("processResources")
dependencies {
include(project(":command-shared"))
/**
* TODO: Add dependencies ADDED BY YOU like this:
* include(dependency(libs.your.dependency.get()))
*/
include(dependency(libs.cloud.core.get()))
// TODO: only include the velocity dependency in the velocity plugin
include(dependency(libs.cloud.velocity.get()))
} */
archiveFileName.set("${project.name}.jar")
}
}
tasks.test {
useJUnitPlatform()
}
tasks.processResources {
expand(
"version" to project.version,
"name" to project.name
)
}