From 5b9ce49006e0fdfd6aff83dd56dc9843828e93e1 Mon Sep 17 00:00:00 2001 From: TylerS1066 Date: Sat, 15 Jun 2024 19:25:22 -0500 Subject: [PATCH] Almost there with shadowJar --- README.md | 2 +- .../main/kotlin/buildlogic.java-conventions.gradle.kts | 1 - modules/Movecraft/build.gradle.kts | 10 ++++++---- modules/api/build.gradle.kts | 2 ++ modules/v1_18/build.gradle.kts | 2 ++ modules/v1_20/build.gradle.kts | 5 +---- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c906f8ca9..34464913b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Please check the [Wiki](https://github.com/APDevTeam/Movecraft/wiki) and [FAQ](h ## Development Environment Building Movecraft is as easy as downloading the source code and executing the following command: ``` -./gradlew build +./gradlew clean build ``` Compiled jars can be found in the `modules/Movecraft/build/libs` directory. diff --git a/buildSrc/src/main/kotlin/buildlogic.java-conventions.gradle.kts b/buildSrc/src/main/kotlin/buildlogic.java-conventions.gradle.kts index f3bcd4387..a3315ee75 100644 --- a/buildSrc/src/main/kotlin/buildlogic.java-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/buildlogic.java-conventions.gradle.kts @@ -36,7 +36,6 @@ repositories { group = "net.countercraft" version = "8.0.0_beta-3" -java.sourceCompatibility = JavaVersion.VERSION_17 publishing { publications.create("maven") { diff --git a/modules/Movecraft/build.gradle.kts b/modules/Movecraft/build.gradle.kts index 10005974d..85c5909b4 100644 --- a/modules/Movecraft/build.gradle.kts +++ b/modules/Movecraft/build.gradle.kts @@ -1,8 +1,10 @@ plugins { id("buildlogic.java-conventions") - id("com.github.johnrengelman.shadow") version "8.1.1" + id("io.github.goooler.shadow") version "8.1.7" } +java.toolchain.languageVersion = JavaLanguageVersion.of(17) + repositories { mavenCentral() gradlePluginPortal() @@ -26,9 +28,9 @@ tasks.shadowJar { archiveVersion.set("") dependencies { - include(dependency("net.countercraft:movecraft-v1_18")) - include(dependency("net.countercraft:movecraft-v1_20")) - include(dependency("net.countercraft:datapack")) + include(project(":movecraft-v1_18")) + include(project(":movecraft-v1_20")) + include(project(":movecraft-datapack")) } relocate("it.unimi", "net.countercraft.movecraft.libs.it.unimi") diff --git a/modules/api/build.gradle.kts b/modules/api/build.gradle.kts index 416dafd2d..9c72f6524 100644 --- a/modules/api/build.gradle.kts +++ b/modules/api/build.gradle.kts @@ -6,6 +6,8 @@ plugins { id("buildlogic.java-conventions") } +java.toolchain.languageVersion = JavaLanguageVersion.of(17) + dependencies { api(libs.io.papermc.paper.paper.api) api(libs.org.openjdk.jmh.jmh.core) diff --git a/modules/v1_18/build.gradle.kts b/modules/v1_18/build.gradle.kts index f0087a359..5ab5639c3 100644 --- a/modules/v1_18/build.gradle.kts +++ b/modules/v1_18/build.gradle.kts @@ -7,6 +7,8 @@ plugins { id("io.papermc.paperweight.userdev") version "1.7.1" } +java.toolchain.languageVersion = JavaLanguageVersion.of(17) + dependencies { api(project(":movecraft-api")) paperweight.paperDevBundle("1.18.2-R0.1-SNAPSHOT") diff --git a/modules/v1_20/build.gradle.kts b/modules/v1_20/build.gradle.kts index 4ee35dc37..2edca286c 100644 --- a/modules/v1_20/build.gradle.kts +++ b/modules/v1_20/build.gradle.kts @@ -7,10 +7,7 @@ plugins { id("io.papermc.paperweight.userdev") version "1.7.1" } -java { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 -} +java.toolchain.languageVersion = JavaLanguageVersion.of(21) dependencies { api(project(":movecraft-api"))