-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
110 lines (94 loc) · 3.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.diffplug.gradle.spotless.SpotlessPlugin
plugins {
java
`java-library`
alias(libs.plugins.shadow)
alias(libs.plugins.pluginyml)
alias(libs.plugins.spotless)
alias(libs.plugins.minotaur)
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
tasks {
compileJava.configure {
options.release.set(17)
}
withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
}
configurations.all {
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
}
version = "6.0.2-SNAPSHOT"
repositories {
mavenCentral()
maven { url = uri("https://repo.papermc.io/repository/maven-public/") }
maven { url = uri("https://repo.dmulloy2.net/nexus/repository/public/") }
maven { url = uri("https://maven.enginehub.org/repo/") }
}
dependencies {
implementation(platform("com.intellectualsites.bom:bom-newest:1.47"))
compileOnly("io.papermc.paper:paper-api")
compileOnly("com.intellectualsites.plotsquared:plotsquared-core")
compileOnly("com.intellectualsites.plotsquared:plotsquared-bukkit") { isTransitive = false }
compileOnly(libs.protocollib)
compileOnly(libs.worldedit)
implementation("org.bstats:bstats-bukkit")
implementation("org.bstats:bstats-base")
}
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER.txt"))
target("**/*.java")
endWithNewline()
trimTrailingWhitespace()
removeUnusedImports()
}
}
bukkit {
name = "PlotHider"
main = "com.plotsquared.plothider.PlotHiderPlugin"
authors = listOf("Empire92", "dordsor21")
apiVersion = "1.13"
description = "Hide plots from other players"
version = rootProject.version.toString()
depend = listOf("ProtocolLib", "PlotSquared")
website = "https://www.spigotmc.org/resources/20701/"
permissions {
register("plots.plothider.bypass") {
default = BukkitPluginDescription.Permission.Default.OP
}
}
}
tasks.named<ShadowJar>("shadowJar") {
archiveClassifier.set(null as String?)
dependencies {
relocate("org.bstats", "com.plotsquared.plothider.metrics") {
include(dependency("org.bstats:bstats-base"))
include(dependency("org.bstats:bstats-bukkit"))
}
}
minimize()
}
tasks.named("build").configure {
dependsOn("shadowJar")
}
val supportedVersions = listOf("1.16.5", "1.17.1", "1.18.2", "1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4", "1.20", "1.20.1", "1.20.2")
modrinth {
token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set("plothider")
versionName.set("${project.version}")
versionNumber.set("${project.version}")
versionType.set("release")
uploadFile.set(file("build/libs/${rootProject.name}-${project.version}.jar"))
gameVersions.addAll(supportedVersions)
loaders.addAll(listOf("paper", "purpur", "spigot"))
syncBodyFrom.set(rootProject.file("README.md").readText())
changelog.set("The changelog is available on GitHub: https://github" +
".com/IntellectualSites/plothider/releases/tag/${project.version}")
}