plugins { id("java") id("checkstyle") id("fabric-loom") version "1.2-SNAPSHOT" } java.sourceCompatibility = JavaVersion.VERSION_17 project.version = project.mod_version project.group = project.maven_group loom { accessWidenerPath = file("src/main/resources/deviousmod.accesswidener") } repositories { mavenCentral() maven { name = "OpenCollab" url = "https://repo.opencollab.dev/maven-snapshots/" } maven { name = "Allink Maven" url = "https://maven.allink.esixtwo.one/snapshots/" } maven { name = "Jitpack" url = "https://jitpack.io/" } maven { name = "Modrinth" url = "https://api.modrinth.com/maven" } } configurations { implementation.extendsFrom require api.extendsFrom require } dependencies { minecraft("com.mojang:minecraft:${project.minecraft_version}") mappings("net.fabricmc:yarn:${project.yarn_mappings}:v2") modImplementation("net.fabricmc:fabric-loader:${project.loader_version}") modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}") require("com.github.allinkdev:Reflector:${project.reflector_version}") require("io.github.spair:imgui-java-binding:${project.imgui_version}") require("io.github.spair:imgui-java-lwjgl3:${project.imgui_version}") { exclude module: 'lwjgl' exclude module: 'lwjgl-glfw' exclude module: 'lwjgl-opengl' } require("io.github.spair:imgui-java-natives-linux:${project.imgui_version}") require("io.github.spair:imgui-java-natives-windows:${project.imgui_version}") require("io.github.spair:imgui-java-natives-macos:${project.imgui_version}") require(project(":deviousmod-api")) modImplementation include("net.kyori:adventure-platform-fabric:${project.adventure_platform_version}") modImplementation "maven.modrinth:sodium:mc${project.sodium_version}" include(implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:${project.mixin_extra_version}"))) } tasks { assemble { dependsOn(checkstyleMain) } compileJava { options.release.set(17) } processResources { inputs.property("version", project.version) filesMatching("fabric.mod.json") { expand(project.properties) } } jar { dependsOn configurations.require from { duplicatesStrategy = DuplicatesStrategy.EXCLUDE configurations.require.collect { zipTree(it) } } from("LICENSE") { rename { "LICENSE_${archiveBaseName.get()}" } } } }