Cleaned some stuff on the gradle
This commit is contained in:
+6
-35
@@ -88,23 +88,6 @@ forgix {
|
||||
removeDuplicate "com.seibel.lod.core"
|
||||
}
|
||||
|
||||
def useManifold(p) {
|
||||
// def enableManifold = true
|
||||
// // Only add manifold to forge when this is disabled
|
||||
// // if manifold is enabled when forge is running runtimeClasspathCopy
|
||||
// println gradle.taskGraph.allTasks
|
||||
// gradle.taskGraph.whenReady { taskGraph ->
|
||||
// println taskGraph.allTasks
|
||||
// taskGraph.allTasks.each { task ->
|
||||
// println task.path
|
||||
// if (task.path.contains("Srg") || task.path.contains("runtimeClasspathCopy") || task.path.contains(":forge"))
|
||||
// enableManifold = false
|
||||
// }
|
||||
// }
|
||||
// return enableManifold
|
||||
return p != project(":forge")
|
||||
}
|
||||
|
||||
subprojects { p ->
|
||||
// Does the same as "p == project(":common") || p == project(":fabric") || p == project(":quilt") || p == project(":forge")"
|
||||
// Useful later on so we dont have duplicated code
|
||||
@@ -113,7 +96,7 @@ subprojects { p ->
|
||||
|
||||
// Apply plugins
|
||||
apply plugin: "java"
|
||||
if (isMinecraftSubProject && useManifold(p))
|
||||
if (isMinecraftSubProject)
|
||||
apply plugin: "systems.manifold.manifold-gradle-plugin"
|
||||
apply plugin: "com.github.johnrengelman.shadow"
|
||||
// apply plugin: "org.spongepowered.gradle.vanilla" // Provides minecraft libraries
|
||||
@@ -123,10 +106,9 @@ subprojects { p ->
|
||||
|
||||
|
||||
// Set the manifold version (may not be required tough)
|
||||
if (useManifold(p))
|
||||
manifold {
|
||||
manifoldVersion = rootProject.manifold_version
|
||||
}
|
||||
manifold {
|
||||
manifoldVersion = rootProject.manifold_version
|
||||
}
|
||||
|
||||
|
||||
// set up custom configurations (configurations are a way to handle dependencies)
|
||||
@@ -165,7 +147,7 @@ subprojects { p ->
|
||||
|
||||
|
||||
// Manifold
|
||||
if (isMinecraftSubProject && useManifold(p))
|
||||
if (isMinecraftSubProject)
|
||||
annotationProcessor("systems.manifold:manifold-preprocessor:${rootProject.manifold_version}")
|
||||
|
||||
// Log4j
|
||||
@@ -427,18 +409,7 @@ allprojects { p ->
|
||||
tasks.withType(JavaCompile) {
|
||||
if (isMinecraftSubProject) {
|
||||
options.release = rootProject.java_version as Integer
|
||||
|
||||
// def enableManifold = false
|
||||
// // Only add manifold to forge when this is disabled
|
||||
// // if manifold is enabled when forge is running runtimeClasspathCopy
|
||||
// gradle.taskGraph.whenReady { taskGraph ->
|
||||
// taskGraph.allTasks.each { task ->
|
||||
// if (task.path.contains("compileJava"))
|
||||
// enableManifold = true
|
||||
// }
|
||||
// }
|
||||
if (useManifold(p))
|
||||
options.compilerArgs += ['-Xplugin:Manifold']
|
||||
options.compilerArgs += ['-Xplugin:Manifold']
|
||||
} else {
|
||||
options.release = 8; // Core & Api should use Java 8 no matter what
|
||||
//options.release = rootProject.java_version as Integer // But if minecraft
|
||||
|
||||
Reference in New Issue
Block a user