import io.github.ran.jarmerger.JarMergerPlugin buildscript { dependencies{ classpath files('plugins/DHJarMerger-1.0.jar') } } plugins { id "architectury-plugin" version "3.4-SNAPSHOT" id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false } apply plugin: JarMergerPlugin architectury { minecraft = rootProject.minecraft_version } subprojects { p -> apply plugin: "dev.architectury.loom" loom { silentMojangMappingsLicense() } configurations { common shadowMe implementation.extendsFrom shadowMe } dependencies { minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" // The following line declares the mojmap mappings mappings loom.officialMojangMappings() if (p != project(":forge")) { // We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies // Do NOT use other classes from fabric loader unless working with fabric modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" } if (p != project(":core")) { common(project(":core")) { transitive false } shadowMe(project(":core")) { transitive false } } } } allprojects { apply plugin: "java" apply plugin: "architectury-plugin" apply plugin: "maven-publish" archivesBaseName = rootProject.archives_base_name version = rootProject.mod_version group = rootProject.maven_group repositories { mavenCentral() // used to download and compile dependencies from git repos maven { url 'https://jitpack.io' } // Required for importing Modrinth mods maven { name = "Modrinth" url = "https://api.modrinth.com/maven" content { includeGroup "maven.modrinth" } } // Required for importing CursedForge mods maven { url "https://www.cursemaven.com" content { includeGroup "curse.maven" } } // These 2 are for importing mods that arnt on CursedForge, Modrinth, GitHub, GitLab or anywhere opensource flatDir { dirs "${rootDir}/mods/fabric" content { includeGroup "fabric-mod" } } flatDir { dirs "${rootDir}/mods/forge" content { includeGroup "forge-mod" } } } tasks.withType(JavaCompile) { options.encoding = "UTF-8" // The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too // JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used. // We'll use that if it's available, but otherwise we'll use the older option. def targetVersion = 8 if (JavaVersion.current().isJava9Compatible()) { options.release = targetVersion } } java { withSourcesJar() } }