Skip to content

Commit

Permalink
🔥 gradle update
Browse files Browse the repository at this point in the history
  • Loading branch information
xGab0 committed Oct 5, 2023
1 parent 4a6b425 commit 2bbdd05
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 49 deletions.
39 changes: 26 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

group = "com.thecrownstudios"
version = "1.2.3"
version = "1.2.4"

plugins {
id("java")
id("com.github.johnrengelman.shadow") version "8.1.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
}

java {
Expand All @@ -27,16 +27,16 @@ java {

exclude("**/resources/server.json")
}

tasks.withType<ProcessResources> {
filteringCharset = "UTF-8"
}
}

shadow {
tasks.withType<ShadowJar> {
exclude("server.json")

//dependencies {
// exclude(dependency("it.unimi.dsi:fastutil"))
//}

println(message = "SHADOWJAR INFORMATION")
println(message = "- project_name: ${rootProject.name}")
println(message = "- module_name: ${archiveBaseName.get()}")
Expand All @@ -51,18 +51,31 @@ shadow {
repositories {
mavenCentral()

maven(url = "https://repo.spongepowered.org/maven")
maven(url = "https://libraries.minecraft.net")
maven(url = "https://jitpack.io")
maven {
name = "JitPack"
url = uri("https://jitpack.io")
}
maven {
name = "Sponge"
url = uri("https://repo.spongepowered.org/maven")
}
maven {
name = "Sonatype"
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
maven {
name = "Minecraft"
url = uri("https://libraries.minecraft.net")
}
}

dependencies {
val minestom_version = project.properties["minestom_version"] ?: "9abb3079f6"
val jnoise_version = project.properties["jnoise_version"] ?: "b93008e35e"
val minimessage_version = project.properties["minimessage_version"] ?: "4.13.0"
val minestom_version = project.property("minestom_version")!! as String
val jnoise_version = project.property("jnoise_version")!! as String
val minimessage_version = project.property("minimessage_version")!! as String

implementation("com.github.Minestom:Minestom:$minestom_version")
implementation("com.github.Articdive:JNoise:$jnoise_version")
implementation("de.articdive:jnoise-pipeline:$jnoise_version")
implementation("com.github.CatDevz:SlimeLoader:master-SNAPSHOT")
implementation("net.kyori:adventure-text-minimessage:$minimessage_version")
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ systemProp.file.encoding = UTF-8

# project config
group = com.thecrownstudios
version = 1.2.3
version = 1.2.4
description = A launcher made for Minestom

# libraries versions
minestom_version = 9abb3079f6
jnoise_version = b93008e35e
minimessage_version = 4.13.0
minestom_version = 2cdb3911b0
jnoise_version = 4.1.0-SNAPSHOT
minimessage_version = 4.14.0
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
15 changes: 10 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,10 +131,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public final class MinestomLauncher {

private static final ComponentLogger LOGGER = ComponentLogger.logger(MinestomLauncher.class);

public static final String LAUNCHER_VERSION_NAME = "1.2.3";
public static final String LAUNCHER_VERSION_NAME = "1.2.4";
public static final String CONFIG_LOCATION = System.getProperty("config.location", "server.json");

public MinestomLauncher() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private MessageUtil() {}
.append(CUBE_COMPONENT_LINE)
.append(newline())
.append(CUBE_COMPONENT_LINE)
.append(text(" MINESTOM LAUNCHER"))
.append(text(" MINESTOM LAUNCHER", NamedTextColor.WHITE))
.append(space().append(text(MinestomLauncher.LAUNCHER_VERSION_NAME, NamedTextColor.GRAY, TextDecoration.ITALIC)))
.append(newline())
.append(CUBE_COMPONENT_LINE)
Expand All @@ -76,32 +76,32 @@ private MessageUtil() {}

.append(ARROW_COMPONENT)
.append(text("os info: ", NamedTextColor.GRAY))
.append(text(System.getProperty("os.name")))
.append(text(System.getProperty("os.name"), NamedTextColor.WHITE))
.append(text(", ", NamedTextColor.GRAY))
.append(text(System.getProperty("os.version")))
.append(text(System.getProperty("os.version"), NamedTextColor.WHITE))
.append(text(" - ", NamedTextColor.GRAY))
.append(text(System.getProperty("os.arch")))
.append(text(System.getProperty("os.arch"), NamedTextColor.WHITE))
.append(newline())

.append(ARROW_COMPONENT)
.append(text("java info: ", NamedTextColor.GRAY))
.append(text(System.getProperty("java.version")))
.append(text(System.getProperty("java.version"), NamedTextColor.WHITE))
.append(text(" - ", NamedTextColor.GRAY))
.append(text(System.getProperty("java.vendor")))
.append(text(System.getProperty("java.vendor"), NamedTextColor.WHITE))
.append(text(", ", NamedTextColor.GRAY))
.append(text(System.getProperty("java.vendor.url")))
.append(text(System.getProperty("java.vendor.url"), NamedTextColor.WHITE))
.append(newline())

.append(ARROW_COMPONENT)
.append(text("commit: ", NamedTextColor.GRAY))
.append(text(Git.commit()))
.append(text(Git.commit(), NamedTextColor.WHITE))
.append(newline())

.append(ARROW_COMPONENT)
.append(text("version: ", NamedTextColor.GRAY))
.append(text(MinecraftServer.VERSION_NAME))
.append(text(MinecraftServer.VERSION_NAME, NamedTextColor.WHITE))
.append(text(" - ", NamedTextColor.GRAY))
.append(text(MinecraftServer.PROTOCOL_VERSION))
.append(text(MinecraftServer.PROTOCOL_VERSION, NamedTextColor.WHITE))
.append(newline())

.build();
Expand All @@ -122,43 +122,43 @@ private MessageUtil() {}
textBuilder
.append(ARROW_COMPONENT)
.append(text("config location: ", NamedTextColor.GRAY))
.append(text(MinestomLauncher.CONFIG_LOCATION))
.append(text(MinestomLauncher.CONFIG_LOCATION, NamedTextColor.WHITE))
.append(text(", ", NamedTextColor.GRAY))
.append(configResultMessage(result))
.append(newline());

textBuilder
.append(ARROW_COMPONENT)
.append(text("server address: ", NamedTextColor.GRAY))
.append(text(networkData.ip()))
.append(text(networkData.ip(), NamedTextColor.WHITE))
.append(text(":", NamedTextColor.GRAY))
.append(text(networkData.port()))
.append(text(networkData.port(), NamedTextColor.WHITE))
.append(text(", ", NamedTextColor.GRAY))
.append(proxyResultMessage(proxyData))
.append(newline());

textBuilder
.append(ARROW_COMPONENT)
.append(text("extensions: ", NamedTextColor.GRAY))
.append(text(MinecraftServer.getExtensionManager().getExtensions().size()))
.append(text(MinecraftServer.getExtensionManager().getExtensions().size(), NamedTextColor.WHITE))
.append(text(", ", NamedTextColor.GRAY))
.append(text("instances: ", NamedTextColor.GRAY))
.append(text(MinecraftServer.getInstanceManager().getInstances().size()))
.append(text(MinecraftServer.getInstanceManager().getInstances().size(), NamedTextColor.WHITE))
.append(newline());

textBuilder
.append(ARROW_COMPONENT)
.append(text("tps: ", NamedTextColor.GRAY))
.append(text(serverData.ticksPerSecond()))
.append(text(serverData.ticksPerSecond(), NamedTextColor.WHITE))
.append(text(", ", NamedTextColor.GRAY))
.append(text("chunk distance: ", NamedTextColor.GRAY))
.append(text(serverData.chunkViewDistance()))
.append(text(serverData.chunkViewDistance(), NamedTextColor.WHITE))
.append(text(", ", NamedTextColor.GRAY))
.append(text("entity distance: ", NamedTextColor.GRAY))
.append(text(serverData.entityViewDistance()))
.append(text(serverData.entityViewDistance(), NamedTextColor.WHITE))
.append(newline());

if (MinecraftServer.getInstanceManager().getInstances().size() == 0) {
if (MinecraftServer.getInstanceManager().getInstances().isEmpty()) {
textBuilder
.append(newline())
.append(text(" ! ", NamedTextColor.GOLD))
Expand All @@ -171,7 +171,7 @@ private MessageUtil() {}
textBuilder
.append(newline())
.append(text(" Server started in ", NamedTextColor.GRAY))
.append(text(decimalFormat.format(System.currentTimeMillis() - startMillis)))
.append(text(decimalFormat.format(System.currentTimeMillis() - startMillis), NamedTextColor.WHITE))
.append(text("s", NamedTextColor.GRAY))
.append(newline());

Expand Down Expand Up @@ -200,8 +200,8 @@ private MessageUtil() {}

private static @NotNull Component configResultMessage(@NotNull FileResult result) {
return switch (result) {
case EXISTING -> text("loaded from existing file");
case CREATED -> text("missing file, created a new one");
case EXISTING -> text("loaded from existing file", NamedTextColor.WHITE);
case CREATED -> text("missing file, created a new one", NamedTextColor.WHITE);
case MALFORMED -> empty();
};
}
Expand All @@ -211,13 +211,13 @@ private MessageUtil() {}
String proxyType = proxyData.type();

if (proxyType.equalsIgnoreCase("velocity")) {
return text("under velocity proxy");
return text("under velocity proxy", NamedTextColor.WHITE);
} else if (proxyType.equalsIgnoreCase("bungeecord")) {
return text("under bungeecord proxy");
return text("under bungeecord proxy", NamedTextColor.WHITE);
}
}

return text("under no proxy");
return text("under no proxy", NamedTextColor.WHITE);
}

}

0 comments on commit 2bbdd05

Please sign in to comment.