-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
86 lines (73 loc) · 2.25 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
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.hychat"
version = "2.0.0"
description = "A powerful and lightweight chat plugin for minecraft servers."
repositories {
mavenCentral()
gradlePluginPortal()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
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("me.clip:placeholderapi:2.11.2")
implementation("net.kyori:adventure-text-serializer-plain:4.13.0")
implementation("net.kyori:adventure-text-serializer-legacy:4.13.0")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("org.apache.commons:commons-text:1.10.0")
}
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 {
exclude("kotlin/**")
archiveFileName.set("HyChat-${project.version}-all.jar")
}
named("build") {
dependsOn(shadowJar)
}
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
application {
mainClass.set("me.xhyrom.hychat.HyChat")
}
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("HyChat")
}
}
}