Skip to content

Commit

Permalink
chore(build): Gradle 8.8
Browse files Browse the repository at this point in the history
  • Loading branch information
xGab0 committed Jun 10, 2024
1 parent 5038399 commit 6c2eeb7
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 47 deletions.
75 changes: 41 additions & 34 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

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

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

base {
group = "com.thecrownstudios"
version = "1.2.4"
archivesName = "minestom-launcher"
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand All @@ -33,28 +34,10 @@ java {
}
}

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

println(message = "SHADOWJAR INFORMATION")
println(message = "- project_name: ${rootProject.name}")
println(message = "- module_name: ${archiveBaseName.get()}")
println(message = "- module_version: ${archiveVersion.get()}")
println(message = "- module_extension: ${archiveExtension.get()}")
println()

archiveFileName.set("${rootProject.name}-${archiveVersion.get()}.${archiveExtension.get()}")
}
}

repositories {
mavenCentral()

maven {
name = "JitPack"
url = uri("https://jitpack.io")
}
maven { url = uri("https://jitpack.io") }
maven {
name = "Sponge"
url = uri("https://repo.spongepowered.org/maven")
Expand All @@ -63,26 +46,50 @@ repositories {
name = "Sonatype"
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
maven {
name = "CentralSonatype"
url = uri("https://central.sonatype.com/")
}
maven {
name = "Minecraft"
url = uri("https://libraries.minecraft.net")
}
}

dependencies {
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
val jackson_version = project.property("jackson_version")!! as String

implementation("com.github.Minestom:Minestom:$minestom_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:$jackson_version")
val minestom_version = findProperty("minestom_version")
val jnoise_version = findProperty("jnoise_version")
val polar_version = findProperty("polar_version")
val minimessage_version = findProperty("minimessage_version")
val jackson_version = findProperty("jackson_version")

// Important
implementation("net.minestom", "minestom-snapshots", "$minestom_version")
implementation("de.articdive", "jnoise-pipeline", "$jnoise_version")

// World formats
implementation("com.github.CatDevz", "SlimeLoader", "master-SNAPSHOT")
implementation("dev.hollowcube", "polar", "$polar_version")

// Misc
implementation("net.kyori", "adventure-text-minimessage", "$minimessage_version")
implementation("com.fasterxml.jackson.core", "jackson-databind", "$jackson_version")
}

tasks {
shadowJar {
exclude("server.json")

println(message = "ShadowJar Informations")
println(message = "- project_name: ${rootProject.name}")
println(message = "- module_name: ${archiveBaseName.get()}")
println(message = "- module_version: ${archiveVersion.get()}")
println(message = "- module_extension: ${archiveExtension.get()}")
println()

archiveFileName.set("${rootProject.name}-${archiveVersion.get()}.${archiveExtension.get()}")
}

build {
finalizedBy(shadowJar)
}
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ version = 1.2.4
description = A launcher made for Minestom

# libraries versions
minestom_version = 2cdb3911b0
minestom_version = b3aa996e1d
jnoise_version = 4.1.0-SNAPSHOT
polar_version = 1.9.5
minimessage_version = 4.14.0
jackson_version = 2.15.2
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down

0 comments on commit 6c2eeb7

Please sign in to comment.