plugins { id "architectury-plugin" version "3.4-SNAPSHOT" id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false } 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' } } 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() } }