-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
88 lines (73 loc) · 2.21 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
plugins {
id("java-library")
id("java")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "7.1.2"
kotlin("jvm") version "1.6.21"
application
}
group = "me.xhyrom.hyx"
version = "2.0.0"
description = "A powerful and lightweight plugin"
repositories {
mavenCentral()
gradlePluginPortal()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://repo.jopga.me/releases")
maven("https://jitpack.io")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT")
compileOnly("me.xhyrom.hylib:hylib-bukkit:2.0.0")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
compileOnly("dev.jorel:commandapi-annotations:9.0.1")
annotationProcessor("dev.jorel:commandapi-annotations:9.0.1")
}
tasks.processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(sourceSets.main.get().resources.srcDirs) {
filter(
org.apache.tools.ant.filters.ReplaceTokens::class, "tokens" to mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description,
)
)
}
}
tasks {
shadowJar {
relocate("dev.jorel.commandapi", "me.xhyrom.hylib.libs.commandapi")
exclude("kotlin/**")
archiveFileName.set("HyX-${project.version}-all.jar")
}
named("build") {
dependsOn(shadowJar)
}
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
application {
mainClass.set("me.xhyrom.hyx.HyX")
}
publishing {
publications.create<MavenPublication>("maven") {
artifact(tasks["shadowJar"])
repositories.maven {
url = uri("https://repo.jopga.me/releases")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
groupId = rootProject.group as String
artifactId = project.name
version = rootProject.version as String
pom {
name.set("HyX")
}
}
}