]> git.lizzy.rs Git - LightOverlay.git/blobdiff - fabric/build.gradle
Updated mod to Minecraft 1.19.3 (#163)
[LightOverlay.git] / fabric / build.gradle
index 7e6d02134e9ef195ff379f0ea96b3fdfe9b90ce5..aa91f4ed7b8ebb2b7c35ce73c048c08bd0a32fd0 100755 (executable)
@@ -1,9 +1,22 @@
 plugins {
-    id("fabric-loom") version "0.4.3"
+    id "com.github.johnrengelman.shadow" version "7.1.2"
 }
 
-minecraft {
-    accessWidener = file("src/main/resources/lightoverlay.accesswidener")
+loom {
+    accessWidenerPath = file("src/main/resources/lightoverlay.accesswidener")
+}
+
+architectury {
+    platformSetupLoomIde()
+    fabric()
+}
+
+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
 }
 
 processResources {
@@ -13,27 +26,43 @@ processResources {
     inputs.property "version", project.version
 }
 
-repositories {
-    jcenter()
-}
-
 dependencies {
-    minecraft "com.mojang:minecraft:${rootProject.fabric_minecraft_version}"
-    mappings "net.fabricmc:yarn:${rootProject.fabric_minecraft_version}+build.${rootProject.yarn_build}:v2"
-    modCompile "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
+    minecraft "com.mojang:minecraft:${rootProject.architectury.minecraft}"
+    mappings loom.officialMojangMappings()
+    modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
 
-    modCompile "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
-    modCompile("me.shedaniel.cloth:cloth-events:${rootProject.cloth_events_version}") {
-        transitive = false
+    modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
+    modImplementation("me.shedaniel.cloth:cloth-config-fabric:${rootProject.cloth_config_version}") {
+        exclude(group: "net.fabricmc.fabric-api")
     }
-    modImplementation("me.shedaniel.cloth:config-2:${rootProject.cloth_config_version}")
-    modImplementation("io.github.prospector:modmenu:${rootProject.modmenu_version}") {
+    modImplementation("com.terraformersmc:modmenu:${rootProject.modmenu_version}") {
         transitive = false
     }
-    include("me.shedaniel.cloth:cloth-events:${rootProject.cloth_events_version}") {
+    modImplementation("dev.architectury:architectury-fabric:${rootProject.architectury_version}")
+
+    common(project(path: ":common", configuration: "namedElements")) {
         transitive = false
     }
-    include("me.shedaniel.cloth:config-2:${rootProject.cloth_config_version}") {
+    shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) {
         transitive = false
     }
 }
+
+shadowJar {
+    configurations = [project.configurations.shadowCommon]
+    classifier "dev-shadow"
+}
+
+prepareRemapJar {
+    dependsOn(shadowJar)
+}
+
+remapJar {
+    dependsOn(shadowJar)
+    inputFile.set(shadowJar.archivePath)
+    classifier null
+}
+
+jar {
+    classifier "dev"
+}