Save commit for new build system
This commit is contained in:
+29
-14
@@ -1,21 +1,26 @@
|
||||
version = rootProject.versionStr
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
fabric()
|
||||
plugins {
|
||||
id "fabric-loom" version "0.12-SNAPSHOT"
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project(":common").loom.accessWidenerPath
|
||||
accessWidenerPath = project(":common").file("src/main/resources/${rootProject.accessWidenerVersion}.lod.accesswidener")
|
||||
runs {
|
||||
client {
|
||||
client()
|
||||
setConfigName("Fabric Client")
|
||||
ideConfigGenerated(true)
|
||||
runDir("run")
|
||||
}
|
||||
server {
|
||||
server()
|
||||
setConfigName("Fabric Server")
|
||||
ideConfigGenerated(true)
|
||||
runDir("run")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
common
|
||||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentFabric.extendsFrom common
|
||||
|
||||
// The addModJar basically embeds the mod to the built jar
|
||||
addModJar
|
||||
include.extendsFrom addModJar
|
||||
@@ -30,9 +35,19 @@ def addMod(path, enabled) {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${minecraft_version}"
|
||||
mappings loom.layered() {
|
||||
// Mojmap mappings
|
||||
officialMojangMappings()
|
||||
// Parchment mappings (it adds parameter mappings & javadoc)
|
||||
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip")
|
||||
}
|
||||
// Fabric loader
|
||||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||
|
||||
// Common
|
||||
implementation project(":common")
|
||||
|
||||
// Architectury API
|
||||
if (minecraft_version == "1.16.5") {
|
||||
addModJar("me.shedaniel:architectury-fabric:${rootProject.architectury_version}")
|
||||
@@ -98,8 +113,6 @@ dependencies {
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon, project.configurations.shadowMe, project.configurations.customModule]
|
||||
|
||||
// Compression
|
||||
@@ -132,10 +145,12 @@ task deleteResources(type: Delete) {
|
||||
|
||||
processResources {
|
||||
dependsOn(copyCoreResources)
|
||||
dependsOn(copyAccessWidener)
|
||||
}
|
||||
|
||||
runClient {
|
||||
dependsOn(copyCoreResources)
|
||||
dependsOn(copyAccessWidener)
|
||||
jvmArgs "-XX:-OmitStackTraceInFastThrow"
|
||||
finalizedBy(deleteResources)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user