Removed un-needed stuff
This commit is contained in:
+3
-9
@@ -118,9 +118,9 @@ subprojects { p ->
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
source(project(":common").sourceSets.main.allSource)
|
||||
source(project(":api").sourceSets.main.allSource)
|
||||
source(project(":core").sourceSets.main.allSource)
|
||||
source(project(":common").sourceSets.main.java)
|
||||
source(project(":api").sourceSets.main.java)
|
||||
source(project(":core").sourceSets.main.java)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,12 +192,6 @@ subprojects { p ->
|
||||
implementation("org.apache.logging.log4j:log4j-api:${rootProject.log4j_version}")
|
||||
implementation("org.apache.logging.log4j:log4j-core:${rootProject.log4j_version}")
|
||||
|
||||
// JOML
|
||||
if (project.hasProperty("embed_joml") && embed_joml == "true")
|
||||
forgeShadowMe("org.joml:joml:${rootProject.joml_version}")
|
||||
else
|
||||
implementation("org.joml:joml:${rootProject.joml_version}")
|
||||
|
||||
// JUnit tests
|
||||
implementation("org.junit.jupiter:junit-jupiter:5.8.2")
|
||||
implementation("org.junit.jupiter:junit-jupiter-engine:5.8.2")
|
||||
|
||||
+15
-24
@@ -41,18 +41,6 @@ tasks.register('copyAllResources') {
|
||||
dependsOn(copyCommonLoaderResources)
|
||||
}
|
||||
|
||||
tasks.build.doLast {
|
||||
copy {
|
||||
from file("build/resources/main")
|
||||
into file("build/sourcesSets/main")
|
||||
}
|
||||
|
||||
// TODO may not be necessary since we also do this before runClient
|
||||
delete file("../common/build/libs")
|
||||
delete file("../coreSubProjects/core/build/libs")
|
||||
delete file("../coreSubProjects/api/build/libs")
|
||||
}
|
||||
|
||||
|
||||
|
||||
processResources {
|
||||
@@ -66,12 +54,6 @@ afterEvaluate {
|
||||
|
||||
// TODO this isn't a great place for these, but `tasks.build.doLast` doesn't always work and I'm not sure of a better place right now
|
||||
tasks.runClient.doFirst {
|
||||
// copy the resources into the sourceSets folder so Forge can access them
|
||||
copy {
|
||||
from file("build/resources/main")
|
||||
into file("build/sourcesSets/main")
|
||||
}
|
||||
|
||||
// TODO can we just ignore these folders instead?
|
||||
// deleting them may cause issues if the OS locks the files
|
||||
// and it feels hacky
|
||||
@@ -102,7 +84,7 @@ sourcesJar {
|
||||
|
||||
|
||||
|
||||
// TODO this was specifically added for MC 1.20.4 and should probably be disabled for all MC versions below
|
||||
// TODO this was specifically added for MC 1.20.4 and should not be used on MC versions prior to it
|
||||
// source: https://github.com/MinecraftForge/MinecraftForge/blob/5d0047753dfac0caaf5d97cc3f5c9a8b0990cb44/mdk/build.gradle#L209-L217
|
||||
//
|
||||
// Merge the resources and classes into the same directory.
|
||||
@@ -110,10 +92,19 @@ sourcesJar {
|
||||
// And if we have it in multiple we have to do performance intensive hacks like having the UnionFileSystem
|
||||
// This will eventually be migrated to ForgeGradle so modders don't need to manually do it. But that is later.
|
||||
sourceSets.each {
|
||||
// all of our code and resources should be in the sourceSets/main/ folder for Forge 1.20.4+
|
||||
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
|
||||
println "source name: [" + it.name + "]"// as of 2024-2-4 "it.name" only returned "main" and "test"
|
||||
it.output.resourcesDir = dir
|
||||
it.java.destinationDirectory = dir
|
||||
if ( // Only run on MC 1.20.4 or later
|
||||
// FIXME: Add an environment variable for the Major, Minor, and Patch version number of Minecraft
|
||||
minecraft_version.split("\\.")[1].toInteger() >= 20 &&
|
||||
(
|
||||
minecraft_version.split("\\.").length > 1 && // Incase there isn't a minor version
|
||||
minecraft_version.split("\\.")[2].toInteger() >= 4
|
||||
)
|
||||
) {
|
||||
// all of our code and resources should be in the sourceSets/main/ folder for Forge 1.20.4+
|
||||
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
|
||||
println "source name: [" + it.name + "]"// as of 2024-2-4 "it.name" only returned "main" and "test"
|
||||
it.output.resourcesDir = dir
|
||||
it.java.destinationDirectory = dir
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user