From ffda83c25ddcb2c39551edfc1a86dc4852804bae Mon Sep 17 00:00:00 2001 From: Cutiepie <43445785+Ran-Mewo@users.noreply.github.com> Date: Mon, 22 Apr 2024 18:53:32 +1000 Subject: [PATCH] Add core to gradle --- build.gradle | 43 ++----------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/build.gradle b/build.gradle index b0d5fd26a..809265b1a 100644 --- a/build.gradle +++ b/build.gradle @@ -173,7 +173,7 @@ subprojects { p -> } } - dependencies { + dependencies { // TODO: Move the libraries only used in core to the core's build.gradle (Remember to also move the shadowJar stuff over there) //=====================// // shared dependencies // //=====================// @@ -237,7 +237,7 @@ subprojects { p -> // Add core if (isMinecraftSubProject) { - compileOnly(project(":core")) { + compileOnly(project(path: ':core', configuration: 'shadowedArtifact')) { // Remove Junit test libraries exclude group: "org.junit.jupiter", module: "junit-jupiter" exclude group: "org.junit.jupiter", module: "junit-jupiter-engine" @@ -561,45 +561,6 @@ allprojects { p -> // TODO: If neoforged is ever needed, should we use that, or call it a forge mod? } - // Adds some dependencies that are in vanilla but not in core - if (p == project(":core")) { - OperatingSystem os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.currentOperatingSystem; - - // Set the OS lwjgl is using to the current os - project.ext.lwjglNatives = "natives-" + os.toFamilyName() - - // TODO: Include Minecraft in core-projects but dont include MC code stuff - dependencies { // All of these dependencies are in Vanilla Minecraft, but we need to depend on it as we arent importing Minecraft in the core - // Imports most of lwjgl's libraries (well, only the ones that we need) - implementation platform("org.lwjgl:lwjgl-bom:${rootProject.lwjgl_version}") // TODO: Use Minecraft's version for lwjgl_version (which changes in nearly every version) instead of a hard defined version for all versions - - // REMEMBER: Dont shadow stuff here, these are just the libs that are included in Minecraft so that the core can use - implementation "org.lwjgl:lwjgl" - implementation "org.lwjgl:lwjgl-assimp" - implementation "org.lwjgl:lwjgl-glfw" - implementation "org.lwjgl:lwjgl-openal" - implementation "org.lwjgl:lwjgl-opengl" - implementation "org.lwjgl:lwjgl-stb" - implementation "org.lwjgl:lwjgl-tinyfd" - runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives" - runtimeOnly "org.lwjgl:lwjgl-assimp::$lwjglNatives" - runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives" - runtimeOnly "org.lwjgl:lwjgl-openal::$lwjglNatives" - runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives" - runtimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives" - runtimeOnly "org.lwjgl:lwjgl-tinyfd::$lwjglNatives" - implementation "org.joml:joml:${rootProject.joml_version}" - implementation "it.unimi.dsi:fastutil:${rootProject.fastutil_version}" - - - // Some other dependencies - implementation("org.jetbrains:annotations:16.0.2") - implementation("com.google.code.findbugs:jsr305:3.0.2") - implementation("com.google.common:google-collect:0.5") - implementation("com.google.guava:guava:31.1-jre") - } - } - // TODO: Remove this as no loader needs this // - Fabric can rename which aw they use