Skip to content

Commit

Permalink
Try changing gradle a little to see if it works
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatGravyBoat committed Apr 27, 2024
1 parent 07754ab commit f5ce0f5
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import net.fabricmc.loom.task.RemapJarTask

plugins {
java
id("maven-publish")
id("com.teamresourceful.resourcefulgradle") version "0.0.+"
id("dev.architectury.loom") version "1.6-SNAPSHOT" apply false
id("architectury-plugin") version "3.4-SNAPSHOT"
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
id("maven-publish")
}

architectury {
Expand All @@ -19,23 +19,22 @@ architectury {
}

subprojects {
apply(plugin = "maven-publish")
apply(plugin = "dev.architectury.loom")
apply(plugin = "architectury-plugin")
apply(plugin = "com.github.johnrengelman.shadow")
apply(plugin = "maven-publish")

val minecraftVersion: String by project
val modLoader = project.name
val modId = rootProject.name
val isCommon = modLoader == rootProject.projects.common.name
val loom: LoomGradleExtensionAPI by project

base {
archivesName.set("${rootProject.name}-$modLoader-$minecraftVersion")
}

configure<LoomGradleExtensionAPI> {
silentMojangMappingsLicense()
}
loom.silentMojangMappingsLicense()

repositories {
maven(url = "https://maven.architectury.dev/")
Expand All @@ -47,7 +46,7 @@ subprojects {

dependencies {
"minecraft"("::$minecraftVersion")
"mappings"(project.the<LoomGradleExtensionAPI>().officialMojangMappings())
"mappings"(loom.officialMojangMappings())
}

java {
Expand All @@ -58,10 +57,6 @@ subprojects {
archiveClassifier.set("dev")
}

tasks.named<RemapJarTask>("remapJar") {
archiveClassifier.set(null as String?)
}

tasks.processResources {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
filesMatching(listOf("META-INF/neoforge.mods.toml", "fabric.mod.json")) {
Expand All @@ -74,10 +69,7 @@ subprojects {
platformSetupLoomIde()
}

val shadowCommon by configurations.creating {
isCanBeConsumed = false
isCanBeResolved = true
}
val shadowCommon by configurations.creating

tasks {
"shadowJar"(ShadowJar::class) {
Expand All @@ -88,8 +80,13 @@ subprojects {
"remapJar"(RemapJarTask::class) {
dependsOn("shadowJar")
inputFile.set(named<ShadowJar>("shadowJar").flatMap { it.archiveFile })
archiveClassifier.set(null as String?)
}
}
} else {
tasks.named<RemapJarTask>("remapJar") {
archiveClassifier.set(null as String?)
}
}

publishing {
Expand Down

0 comments on commit f5ce0f5

Please sign in to comment.