Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 30 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ plugins {
id("com.github.spotbugs").version("6.0.12")
id("org.cadixdev.licenser").version("0.6.1")
id("com.gradleup.shadow").version("8.3.6")
id("xyz.jpenilla.run-velocity") version "2.3.1"
}

setGroup("net.elytrium")
setVersion("1.1.7")
setVersion("1.1.8")

compileJava {
getOptions().setEncoding("UTF-8")
Expand Down Expand Up @@ -47,6 +48,17 @@ shadowJar {
relocate("net.elytrium.commons.kyori", "net.elytrium.limboapi.thirdparty.commons.kyori")
}

tasks {
runVelocity {
velocityVersion("3.4.0-SNAPSHOT")

downloadPlugins {
github("Elytrium", "LimboAPI", "dev-build", "limboapi-1.1.27-SNAPSHOT.jar")

}
}
}

license {
setHeader(file("HEADER.txt"))
}
Expand All @@ -67,7 +79,7 @@ spotbugsMain {
reports {
html {
getRequired().set(true)
getOutputLocation().set(file("${this.getBuildDir()}/reports/spotbugs/main/spotbugs.html"))
getOutputLocation().set(file("${this.getRootDir()}/${this.DEFAULT_BUILD_DIR_NAME}/reports/spotbugs/main/spotbugs.html"))
setStylesheet("fancy-hist.xsl")
}
}
Expand All @@ -88,17 +100,23 @@ sourceSets.main.getJava().srcDir(

assemble.dependsOn(shadowJar)

String getCurrentShortRevision() {
OutputStream outputStream = new ByteArrayOutputStream()
exec {
if (System.getProperty("os.name").toLowerCase().contains("win")) {
commandLine("cmd", "/c", "git rev-parse --short HEAD")
} else {
commandLine("bash", "-c", "git rev-parse --short HEAD")
}
static String getCurrentShortRevision() {
def command = System.getProperty("os.name").toLowerCase().contains("win")
? ["cmd", "/c", "git rev-parse --short HEAD"]
: ["bash", "-c", "git rev-parse --short HEAD"]

def process = new ProcessBuilder(command)
.redirectErrorStream(true)
.start()

def output = process.inputStream.withStream {
it.readLines().join("\n").trim()
}

setStandardOutput(outputStream)
process.waitFor()
if (process.exitValue() != 0) {
throw new GradleException("Failed to get git revision: ${output}")
}

return outputStream.toString().trim()
return output
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
limboapiVersion=1.1.26
limboapiVersion=1.1.27
velocityVersion=3.4.0-SNAPSHOT
nettyVersion=4.1.114.Final
serializerVersion=1.1.1
nettyVersion=4.1.118.Final
serializerVersion=1.1.1
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public void reload() {
new PacketMapping(0x68, ProtocolVersion.MINECRAFT_1_20_5, true),
new PacketMapping(0x6f, ProtocolVersion.MINECRAFT_1_21_2, true),
new PacketMapping(0x6e, ProtocolVersion.MINECRAFT_1_21_5, true),
new PacketMapping(0x6e, ProtocolVersion.MINECRAFT_1_21_7, true)
});

this.offlineTitles.clear();
Expand Down