forked from ProjectKorra/ProjectKorraRPG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
117 lines (101 loc) · 2.78 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
111
112
113
114
115
116
117
import com.github.spotbugs.snom.Confidence
import com.github.spotbugs.snom.Effort
plugins {
`java-library`
alias(libs.plugins.shadowPlugin)
alias(libs.plugins.generatePOMPlugin)
alias(libs.plugins.spotBugsPlugin)
//alias(libs.plugins.userdevPlugin) // NMS
}
group = "com.projectkorra"
version = "1.2.0"
description = "Rpg side-plugin for ProjectKorra core"
base.archivesName = gradle.extra["projectName"].toString()
ext.set("projectName", gradle.extra["projectName"].toString())
maven.pom {
name = gradle.extra["projectName"].toString()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
vendor = JvmVendorSpec.ORACLE
}
}
repositories {
gradlePluginPortal {
content {
includeGroup("com.gradleup")
includeGroup("io.papermc.paperweight")
}
}
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
content {
includeGroup("io.papermc")
includeGroup("io.papermc.paper")
includeGroup("com.mojang")
includeGroup("net.md-5")
}
}
maven {
url = uri("https://jitpack.io")
content {
includeGroupByRegex("com\\.github\\..*")
}
}
mavenCentral()
// mavenLocal()
}
dependencies {
//paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT") // NMS
compileOnly(libs.papermc.paperapi)
compileOnly(libs.projectkorra.core)
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filesMatching("**/plugin.yml") {
expand( project.properties )
}
}
shadowJar {
}
spotbugsMain {
reports.create("html") {
required = true
outputLocation = file("${layout.buildDirectory.get()}/reports/spotbugs.html")
setStylesheet("fancy-hist.xsl")
}
}
}
spotbugs {
ignoreFailures = false
showStackTraces = true
showProgress = true
effort = Effort.DEFAULT
reportLevel = Confidence.DEFAULT
}
// 1)
// For >=1.20.5 when you don't care about supporting spigot
//paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
// 2)
// For 1.20.4 or below, or when you care about supporting Spigot on >=1.20.5
// Configure reobfJar to run when invoking the build task
//tasks.assemble {
// dependsOn(tasks.reobfJar)
//}
// Configure plugin.yml generation
// - name, version, and description are inherited from the Gradle project.
/*
bukkitPluginYaml {
main = "io.papermc.paperweight.testplugin.TestPlugin"
load = BukkitPluginYaml.PluginLoadOrder.STARTUP
authors.add("Author")
apiVersion = "1.21"
}
*/