Fixed building
This commit is contained in:
+15
-14
@@ -28,7 +28,7 @@ def loadProperties() {
|
||||
println "Loading properties file at " + mcVersion + ".properties"
|
||||
def props = new Properties()
|
||||
props.load(new FileInputStream("$rootProject.rootDir/"+"$mcVersion"+".properties"))
|
||||
|
||||
|
||||
props.each { prop ->
|
||||
rootProject.ext.set(prop.key, prop.value)
|
||||
// println "Added prop [key:" + prop.key + ", value:" + prop.value + "]"
|
||||
@@ -58,20 +58,13 @@ subprojects { p ->
|
||||
silentMojangMappingsLicense()
|
||||
|
||||
// Set what accesswidener to use
|
||||
def acsessWidenerLocation = "src/main/resources/${acsessWidenerVersion}.lod.accesswidener"
|
||||
accessWidenerPath.set(project(":common").file(acsessWidenerLocation))
|
||||
if (p != project(":core")) {
|
||||
def acsessWidenerLocation = "src/main/resources/${acsessWidenerVersion}.lod.accesswidener"
|
||||
accessWidenerPath.set(project(":common").file(acsessWidenerLocation))
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
// Copy the correct accesswidener to the jar
|
||||
copy {
|
||||
from(project(":common").file("src/main/resources"))
|
||||
include "${acsessWidenerVersion}.lod.accesswidener"
|
||||
into(file(p.file("build/resources/main")))
|
||||
rename "${acsessWidenerVersion}.lod.accesswidener", "lod.accesswidener"
|
||||
// into(file(p.file("build/resources/main")))
|
||||
}
|
||||
|
||||
// Requred to run the standalone jar
|
||||
manifest {
|
||||
attributes 'Implementation-Title': rootProject.archives_base_name,
|
||||
@@ -90,7 +83,7 @@ subprojects { p ->
|
||||
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
|
||||
// The following line declares the mojmap mappings
|
||||
mappings loom.officialMojangMappings()
|
||||
|
||||
|
||||
//Manifold
|
||||
annotationProcessor "systems.manifold:manifold-preprocessor:${rootProject.manifold_version}"
|
||||
|
||||
@@ -124,7 +117,7 @@ allprojects { p ->
|
||||
mavenCentral()
|
||||
// used to download and compile dependencies from git repos
|
||||
maven { url 'https://jitpack.io' }
|
||||
|
||||
|
||||
// For Manifold Preprocessor
|
||||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
||||
|
||||
@@ -198,6 +191,14 @@ allprojects { p ->
|
||||
}
|
||||
|
||||
|
||||
// This method copies the access wideners from the common project to the fabric project. And it was generated by Github Copilot
|
||||
task copyAccessWidener(type: Copy) {
|
||||
from project(":common").file("src/main/resources/${acsessWidenerVersion}.lod.accesswidener")
|
||||
into(file(p.file("build/resources/main")))
|
||||
rename "${acsessWidenerVersion}.lod.accesswidener", "lod.accesswidener"
|
||||
}
|
||||
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
// Add Manifold Preprocessor
|
||||
// def excapedMCVersion = rootProject.minecraft_version.replace(".", "_")
|
||||
|
||||
@@ -90,12 +90,6 @@ dependencies {
|
||||
shadowMe 'org.apache.commons:commons-compress:1.21'
|
||||
}
|
||||
|
||||
// This method copies the access wideners from the common project to the fabric project. And it was generated by Github Copilot
|
||||
task copyAccessWidener(type: Copy) {
|
||||
from project(":common").file("src/main/resources/lod.accesswidener")
|
||||
into file("src/generated/resources")
|
||||
}
|
||||
|
||||
task copyCoreResources(type: Copy) {
|
||||
from fileTree(project(":core").file("src/main/resources"))
|
||||
into file("build/resources/main")
|
||||
|
||||
@@ -65,6 +65,7 @@ task copyCommonResources(type: Copy) {
|
||||
}
|
||||
|
||||
processResources {
|
||||
dependsOn(copyAccessWidener)
|
||||
dependsOn(copyCoreResources)
|
||||
dependsOn(copyCommonResources)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user