stonnecutter

This commit is contained in:
2026-01-25 18:23:55 +01:00
parent 85af209c28
commit a578afaf1c
9 changed files with 137 additions and 15 deletions

View File

@@ -16,6 +16,10 @@ repositories {
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/releases/"
}
}
loom {
@@ -38,6 +42,7 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
}
@@ -50,7 +55,7 @@ processResources {
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
it.options.release = 17
}
java {
@@ -59,8 +64,8 @@ java {
// If you remove this line, sources will not be generated.
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
@@ -71,6 +76,25 @@ jar {
}
}
def modrinthModsDir = providers.environmentVariable("APPDATA")
.map { new File(it, "ModrinthApp/profiles/${project.minecraft_version}/mods") }
tasks.register("copyRemappedJarToModrinth", Copy) {
dependsOn tasks.named("remapJar")
from(tasks.named("remapJar").flatMap { it.archiveFile })
into(modrinthModsDir)
doFirst {
if (!modrinthModsDir.isPresent()) {
throw new GradleException("APPDATA no esta disponible; no se puede resolver la ruta de Modrinth.")
}
}
}
tasks.named("remapJar") {
finalizedBy(tasks.named("copyRemappedJarToModrinth"))
}
// configure the maven publication
publishing {
publications {
@@ -87,4 +111,4 @@ publishing {
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
}