Add project sources and fix .gitignore for Gradle build
- .gitignore: exclude build/, .gradle/, IDE files, OS files - Gradle 8.12 multi-version build system (Fabric Loom 1.9.1) - Full source: JustASplash entrypoint, config, asset cache, keybind, renderer, sound, image loaders (PNG/WebP), WindowMixin - Resources: fabric.mod.json, mixins, localization (en/ru), default splash.png + sounds, icon - Refactored from me.sashegdev to net.anomaly.justasplash package
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
plugins {
|
||||
id "fabric-loom" version "1.9.1"
|
||||
id "maven-publish"
|
||||
}
|
||||
|
||||
def mcVersion = project.findProperty("mcVersion") ?: "1.21.1"
|
||||
|
||||
def ver = [
|
||||
"1.20.1": [mappings: "1.20.1+build.10", loader: "0.15.11", fabricApi: "0.92.0+1.20.1"],
|
||||
"1.21": [mappings: "1.21+build.8", loader: "0.15.11", fabricApi: "0.100.0+1.21"],
|
||||
"1.21.1": [mappings: "1.21.1+build.3", loader: "0.15.11", fabricApi: "0.101.2+1.21.1"],
|
||||
]
|
||||
|
||||
def v = ver[mcVersion]
|
||||
if (v == null) throw new GradleException("Unsupported MC version: $mcVersion")
|
||||
|
||||
version = "${project.findProperty("modVersion") ?: "1.0.0"}+mc${mcVersion}"
|
||||
group = project.findProperty("mavenGroup") ?: "net.anomaly"
|
||||
|
||||
base {
|
||||
archivesName = "JustASplash"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${mcVersion}"
|
||||
mappings "net.fabricmc:yarn:${v.mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${v.loader}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${v.fabricApi}"
|
||||
|
||||
modImplementation("com.github.usefulness:webp-imageio:0.10.2")
|
||||
include("com.github.usefulness:webp-imageio:0.10.2")
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/justasplash.accesswidener")
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 17
|
||||
}
|
||||
Reference in New Issue
Block a user