Skip to content

Commit b282612

Browse files
committed
2.2.1 Release
1 parent fee2b1f commit b282612

File tree

3 files changed

+85
-39
lines changed

3 files changed

+85
-39
lines changed

Changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Changelog for versions since 2.0.0.
44

5+
## 2.2.1
6+
7+
### Bug Fixes
8+
- Fix cannot measure distance error in PositionHandler
9+
- Fix logs table not being created
10+
511
## 2.2.0
612

713
### New Features

bukkit/build.gradle.kts

+77-38
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
44
plugins {
55
`java-library`
66
id("com.github.johnrengelman.shadow") version "7.1.2"
7+
id("io.papermc.hangar-publish-plugin") version "0.1.2"
78
}
89

10+
java.sourceCompatibility = JavaVersion.VERSION_17
11+
912
repositories {
1013
mavenCentral()
1114
mavenLocal()
@@ -51,57 +54,93 @@ dependencies {
5154
compileOnly("io.th0rgal:oraxen:1.173.0")
5255
}
5356

54-
tasks.withType<ShadowJar> {
55-
val projectVersion: String by project
56-
archiveFileName.set("AuraSkills-${projectVersion}.jar")
57-
58-
relocate("co.aikar.commands", "dev.aurelium.auraskills.acf")
59-
relocate("co.aikar.locales", "dev.aurelium.auraskills.locales")
60-
relocate("de.tr7zw.changeme.nbtapi", "dev.aurelium.auraskills.nbtapi")
61-
relocate("org.bstats", "dev.aurelium.auraskills.bstats")
62-
relocate("com.ezylang.evalex", "dev.aurelium.auraskills.evalex")
63-
relocate("net.kyori", "dev.aurelium.auraskills.kyori")
64-
relocate("com.zaxxer.hikari", "dev.aurelium.auraskills.hikari")
65-
relocate("dev.aurelium.slate", "dev.aurelium.auraskills.slate")
66-
relocate("org.spongepowered.configurate", "dev.aurelium.auraskills.configurate")
67-
relocate("io.leangen.geantyref", "dev.aurelium.auraskills.geantyref")
68-
relocate("net.querz", "dev.aurelium.auraskills.querz")
69-
relocate("com.archyx.polyglot", "dev.aurelium.auraskills.polyglot")
70-
relocate("org.atteo.evo.inflector", "dev.aurelium.auraskills.inflector")
71-
72-
exclude("acf-*.properties")
73-
74-
finalizedBy("copyJar")
75-
}
57+
tasks {
58+
withType<ShadowJar> {
59+
val projectVersion: String by project
60+
archiveFileName.set("AuraSkills-${projectVersion}.jar")
7661

77-
java.sourceCompatibility = JavaVersion.VERSION_17
62+
relocate("co.aikar.commands", "dev.aurelium.auraskills.acf")
63+
relocate("co.aikar.locales", "dev.aurelium.auraskills.locales")
64+
relocate("de.tr7zw.changeme.nbtapi", "dev.aurelium.auraskills.nbtapi")
65+
relocate("org.bstats", "dev.aurelium.auraskills.bstats")
66+
relocate("com.ezylang.evalex", "dev.aurelium.auraskills.evalex")
67+
relocate("net.kyori", "dev.aurelium.auraskills.kyori")
68+
relocate("com.zaxxer.hikari", "dev.aurelium.auraskills.hikari")
69+
relocate("dev.aurelium.slate", "dev.aurelium.auraskills.slate")
70+
relocate("org.spongepowered.configurate", "dev.aurelium.auraskills.configurate")
71+
relocate("io.leangen.geantyref", "dev.aurelium.auraskills.geantyref")
72+
relocate("net.querz", "dev.aurelium.auraskills.querz")
73+
relocate("com.archyx.polyglot", "dev.aurelium.auraskills.polyglot")
74+
relocate("org.atteo.evo.inflector", "dev.aurelium.auraskills.inflector")
7875

79-
tasks.register<Copy>("copyJar") {
80-
val projectVersion : String by project
81-
from("build/libs/AuraSkills-${projectVersion}.jar")
82-
into("../build/libs")
83-
}
76+
exclude("acf-*.properties")
77+
78+
finalizedBy("copyJar")
79+
}
80+
81+
register<Copy>("copyJar") {
82+
val projectVersion : String by project
83+
from("build/libs/AuraSkills-${projectVersion}.jar")
84+
into("../build/libs")
85+
}
8486

85-
tasks {
8687
build {
8788
dependsOn(shadowJar)
8889
}
90+
8991
javadoc {
9092
options {
9193
(this as CoreJavadocOptions).addStringOption("Xdoclint:none", "-quiet")
9294
}
9395
}
94-
}
9596

96-
tasks.withType<JavaCompile> {
97-
options.encoding = "UTF-8"
98-
options.compilerArgs.add("-parameters")
99-
options.isFork = true
100-
options.forkOptions.executable = "javac"
97+
withType<JavaCompile> {
98+
options.encoding = "UTF-8"
99+
options.compilerArgs.add("-parameters")
100+
options.isFork = true
101+
options.forkOptions.executable = "javac"
102+
}
103+
104+
processResources {
105+
filesMatching("plugin.yml") {
106+
expand("projectVersion" to project.version)
107+
}
108+
}
101109
}
102110

103-
tasks.processResources {
104-
filesMatching("plugin.yml") {
105-
expand("projectVersion" to project.version)
111+
val supportedVersions = (project.property("supportedMCVersions") as String).split(",").map { it.trim() }
112+
113+
if (project.hasProperty("hangarApiKey")) {
114+
hangarPublish {
115+
publications.register("AuraSkills") {
116+
val projectVersion = project.version as String
117+
118+
version.set(projectVersion)
119+
id.set("AuraSkills")
120+
channel.set("Release")
121+
changelog.set(extractChangelog(projectVersion))
122+
123+
apiKey.set(project.property("hangarApiKey") as String)
124+
125+
platforms {
126+
paper {
127+
jar.set(tasks.shadowJar.flatMap { it.archiveFile })
128+
platformVersions.set(supportedVersions)
129+
}
130+
}
131+
}
106132
}
107133
}
134+
135+
fun extractChangelog(version: String): String {
136+
val heading = Regex.escape(version)
137+
val path = if (System.getProperty("user.dir").endsWith("bukkit")) "../Changelog.md" else "Changelog.md"
138+
139+
val fullChangelog = File(path).readText()
140+
val headingPattern = Regex("## $heading\\R+([\\s\\S]*?)\\R+##\\s", RegexOption.DOT_MATCHES_ALL)
141+
val result = headingPattern.find(fullChangelog)
142+
143+
return result?.groupValues?.get(1)?.trim()
144+
?: throw IllegalArgumentException("Failed to extract changelog section for version $version")
145+
}
146+

gradle.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
projectVersion = 2.2.0
1+
projectVersion=2.2.1
2+
supportedMCVersions=1.17,1.17.1,1.18,1.18.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,1.20.3,1.20.4,1.20.5,1.20.6,1.21

0 commit comments

Comments
 (0)