generated from xenondevs/Nova-Addon-Template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
56 lines (47 loc) · 1.48 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "com.expectale"
version = "2.0.0"
val mojangMapped = project.hasProperty("mojang-mapped")
plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.paperweight)
alias(libs.plugins.nova)
}
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://repo.xenondevs.xyz/releases")
}
dependencies {
paperweight.paperDevBundle(libs.versions.paper)
implementation(libs.nova)
compileOnly("xyz.xenondevs.nova:nova-api:0.16")
}
addon {
id.set("deep_storage")
name.set("Deep-Storage")
version.set(project.version.toString())
novaVersion.set(libs.versions.nova)
main.set("com.expectale.DeepStorage")
authors.add("CptBeffHeart")
}
tasks {
register<Copy>("addonJar") {
group = "build"
if (mojangMapped) {
dependsOn("jar")
from(File(buildDir, "libs/${project.name}-${project.version}-dev.jar"))
} else {
dependsOn("reobfJar")
from(File(buildDir, "libs/${project.name}-${project.version}.jar"))
}
from(File(project.buildDir, "libs/${project.name}-${project.version}.jar"))
into((project.findProperty("outDir") as? String)?.let(::File) ?: project.buildDir)
rename { "${addonMetadata.get().addonName.get()}-${project.version}.jar" }
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}
}