Skip to content

Commit

Permalink
Gradle clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Jun 30, 2024
1 parent dce3df3 commit 19865fd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
16 changes: 6 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ plugins {
}

architectury {
minecraft = rootProject.minecraft_version
minecraft = minecraft_version
}

subprojects {
apply plugin: "dev.architectury.loom"

loom {
silentMojangMappingsLicense()
}

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}"
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings "net.fabricmc:yarn:${yarn_mappings}"
}
}

allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"

group = rootProject.maven_group
version = rootProject.mod_version
archivesBaseName = "${rootProject.mod_id}-mc${rootProject.minecraft_version}"
group = maven_group
version = mod_version
archivesBaseName = "${mod_id}-mc${minecraft_version}"


processResources {
Expand Down
8 changes: 4 additions & 4 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
architectury {
common(rootProject.enabled_platforms.split(","))
common(enabled_platforms.split(","))
}

loom {
accessWidenerPath = file("src/main/resources/friendsandfoes.accesswidener")
}

dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${rootProject.cloth_config_version}")
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}")

implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${rootProject.mixin_extras_version}"))
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${mixin_extras_version}"))
}

repositories {
Expand Down
14 changes: 7 additions & 7 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

allprojects {
archivesBaseName = "${rootProject.mod_id}-forge-mc${rootProject.minecraft_version}"
archivesBaseName = "${mod_id}-forge-mc${minecraft_version}"
}

loom {
Expand Down Expand Up @@ -31,21 +31,21 @@ configurations {
}

dependencies {
forge "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"
forge "net.minecraftforge:forge:${minecraft_version}-${forge_version}"

common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }

// Mixin extras (https://github.com/LlamaLad7/MixinExtras)
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${rootProject.mixin_extras_version}"))
implementation(include("io.github.llamalad7:mixinextras-forge:${rootProject.mixin_extras_version}"))
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${mixin_extras_version}"))
implementation(include("io.github.llamalad7:mixinextras-forge:${mixin_extras_version}"))

// Curios (https://www.curseforge.com/minecraft/mc-mods/curios)
modImplementation("top.theillusivec4.curios:curios-forge:${rootProject.minecraft_version}-${project.curios_version}:api")
modRuntimeOnly("top.theillusivec4.curios:curios-forge:${rootProject.minecraft_version}-${project.curios_version}");
modImplementation("top.theillusivec4.curios:curios-forge:${minecraft_version}-${project.curios_version}:api")
modRuntimeOnly("top.theillusivec4.curios:curios-forge:${minecraft_version}-${project.curios_version}");

// Cloth config (https://www.curseforge.com/minecraft/mc-mods/cloth-config)
modImplementation("me.shedaniel.cloth:cloth-config-forge:${rootProject.cloth_config_version}")
modImplementation("me.shedaniel.cloth:cloth-config-forge:${cloth_config_version}")
}

shadowJar {
Expand Down

0 comments on commit 19865fd

Please sign in to comment.