-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
98 lines (86 loc) · 2.89 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
plugins {
`java-library`
id("xyz.jpenilla.run-paper") version "2.0.1" // Adds runServer and runMojangMappedServer tasks for testing
id("maven-publish")
id("com.github.johnrengelman.shadow") version "8.1.1";
}
group = "de.oliver"
description = "Simple plugin that adds perks to your server"
version = "1.1.1"
val mcVersion = "1.20.4"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
repositories {
mavenLocal()
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
maven("https://repo.alessiodp.com/releases/")
maven("https://repo.fancyplugins.de/releases")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:$mcVersion-R0.1-SNAPSHOT")
implementation("de.oliver:FancyLib:1.0.4")
compileOnly("net.kyori:adventure-text-minimessage:4.13.1")
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1")
compileOnly("net.luckperms:api:5.4")
}
tasks {
runServer {
minecraftVersion(mcVersion)
}
shadowJar {
archiveClassifier.set("")
}
publishing {
repositories {
maven {
name = "fancypluginsReleases"
url = uri("https://repo.fancyplugins.de/releases")
credentials(PasswordCredentials::class)
authentication {
isAllowInsecureProtocol = true
create<BasicAuthentication>("basic")
}
}
maven {
name = "fancypluginsSnapshots"
url = uri("https://repo.fancyplugins.de/snapshots")
credentials(PasswordCredentials::class)
authentication {
isAllowInsecureProtocol = true
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
from(project.components["java"])
}
}
}
compileJava {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
// See https://openjdk.java.net/jeps/247 for more information.
options.release.set(17)
}
javadoc {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
}
processResources {
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
val props = mapOf(
"version" to project.version,
"description" to project.description,
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
}