Files
WeatherChanger/fabric/build.gradle.kts
Lucas Petrino 4eaf638e42 Start on NEXT (version 1.0) branch
- update gradle wrapper version (8.4 to 8.5)
- update logo and add banner
- change to gradle kotlin DSL (from groovy)
- update README.md
- update project layout for planned forge support
- move common logic to common module
- change environment to 'client' to prevent servers from loading the mod (#2)
- cleanup unneeded files
- update LICENSE.md to use Markdown format for easier reading
- update version number to prepare for version 1.0

Signed-off-by: Lucas Petrino <nsx1lucas@gmail.com>
2024-01-14 19:20:34 +13:00

83 lines
2.2 KiB
Kotlin

architectury {
platformSetupLoomIde()
fabric()
}
loom {
accessWidenerPath = project(":common").loom.accessWidenerPath
}
val common: Configuration by configurations.creating
val shadowCommon: Configuration by configurations.creating
configurations {
compileOnly.configure { extendsFrom(common) }
runtimeOnly.configure { extendsFrom(common) }
}
dependencies {
modImplementation("net.fabricmc:fabric-loader:${rootProject.property("fabric.loader_version")}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${rootProject.property("fabric.version")}")
common(project(":common", "namedElements")) {
isTransitive = false
}
shadowCommon(project(":common", "transformProductionFabric")){
isTransitive = false
}
}
tasks {
processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand(mapOf(
"version" to project.version,
"mod_id" to rootProject.property("mod_id"),
"minecraft_version" to rootProject.property("minecraft_version"),
"minecraft_base_version" to rootProject.property("minecraft_base"),
"fabric_loader_version" to rootProject.property("fabric.loader_version")
))
}
}
remapJar {
injectAccessWidener.set(true)
}
jar {
from("../LICENSE.md")
from("../assets/logo.png") {
rename { "assets/weatherchanger/icon.png" }
}
dependsOn(":common:transformProductionFabric")
from({
shadowCommon.filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}
}
java {
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}