diff --git a/.idea/scopes/Fabric_sources.xml b/.idea/scopes/Fabric_sources.xml deleted file mode 100644 index 0448412..0000000 --- a/.idea/scopes/Fabric_sources.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/scopes/Forge_sources.xml b/.idea/scopes/Forge_sources.xml deleted file mode 100644 index 7b5f24d..0000000 --- a/.idea/scopes/Forge_sources.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index b027095..0f12253 100644 --- a/build.gradle +++ b/build.gradle @@ -1,91 +1,4 @@ plugins { // Required for NeoGradle id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7" -} - -subprojects { - apply plugin: 'java' - - java.toolchain.languageVersion = JavaLanguageVersion.of(17) - java.withSourcesJar() - java.withJavadocJar() - - jar { - from(rootProject.file("LICENSE")) { - rename { "${it}_${mod_name}" } - } - manifest { - attributes([ - 'Specification-Title' : mod_name, - 'Specification-Vendor' : mod_author, - 'Specification-Version' : project.jar.archiveVersion, - 'Implementation-Title' : project.name, - 'Implementation-Version' : project.jar.archiveVersion, - 'Implementation-Vendor' : mod_author, - 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), - 'Timestamp' : System.currentTimeMillis(), - 'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})", - 'Built-On-Minecraft' : minecraft_version - ]) - } - } - - sourcesJar { - from(rootProject.file("LICENSE")) { - rename { "${it}_${mod_name}" } - } - } - - repositories { - mavenCentral() - maven { - name = 'Sponge / Mixin' - url = 'https://repo.spongepowered.org/repository/maven-public/' - } - maven { - name = 'BlameJared Maven (JEI / CraftTweaker / Bookshelf)' - url = 'https://maven.blamejared.com' - } - } - - tasks.withType(JavaCompile).configureEach { - - it.options.encoding = 'UTF-8' - it.options.getRelease().set(17) - } - - processResources { - def expandProps = [ - "version": version, - "group": project.group, //Else we target the task's group. - "minecraft_version": minecraft_version, - "forge_version": forge_version, - "forge_loader_version_range": forge_loader_version_range, - "forge_version_range": forge_version_range, - "minecraft_version_range": minecraft_version_range, - "fabric_version": fabric_version, - "fabric_loader_version": fabric_loader_version, - "mod_name": mod_name, - "mod_author": mod_author, - "mod_id": mod_id, - "license": license, - "description": project.description, - "neoforge_version": neoforge_version, - "neoforge_loader_version_range": neoforge_loader_version_range, - "credits": credits - ] - - filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', '*.mixins.json']) { - expand expandProps - } - inputs.properties(expandProps) - } - - // Disables Gradle's custom module metadata from being published to maven. The - // metadata includes mapped dependencies which are not reasonably consumable by - // other mod developers. - tasks.withType(GenerateModuleMetadata).configureEach { - - enabled = false - } -} +} \ No newline at end of file diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle new file mode 100644 index 0000000..6784052 --- /dev/null +++ b/buildSrc/build.gradle @@ -0,0 +1,3 @@ +plugins { + id 'groovy-gradle-plugin' +} diff --git a/buildSrc/src/main/groovy/multiloader-common.gradle b/buildSrc/src/main/groovy/multiloader-common.gradle new file mode 100644 index 0000000..70c3e0d --- /dev/null +++ b/buildSrc/src/main/groovy/multiloader-common.gradle @@ -0,0 +1,114 @@ +plugins { + id 'java-library' + id 'maven-publish' +} + +base { + archivesName = "${mod_id}-${project.name}-${minecraft_version}" +} + +java { + toolchain.languageVersion = JavaLanguageVersion.of(java_version) + withSourcesJar() + withJavadocJar() +} + +repositories { + mavenCentral() + // https://docs.gradle.org/current/userguide/declaring_repositories.html#declaring_content_exclusively_found_in_one_repository + exclusiveContent { + forRepository { + maven { + name = 'Sponge' + url = 'https://repo.spongepowered.org/repository/maven-public' + } + } + filter { includeGroupAndSubgroups("org.spongepowered") } + } + maven { + name = 'BlameJared' + url = 'https://maven.blamejared.com' + } +} + +dependencies { + implementation 'org.jetbrains:annotations:24.1.0' +} + +// Declare capabilities on the outgoing configurations. +// Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component +['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant -> + configurations."$variant".outgoing { + capability("$group:$mod_id-${project.name}-${minecraft_version}:$version") + capability("$group:$mod_id:$version") + } + publishing.publications.configureEach { + suppressPomMetadataWarningsFor(variant) + } +} + +sourcesJar { + from(rootProject.file("LICENSE")) { + rename { "${it}_${mod_name}" } + } +} + +jar { + from(rootProject.file("LICENSE")) { + rename { "${it}_${mod_name}" } + } + + manifest { + attributes([ + 'Specification-Title' : mod_name, + 'Specification-Vendor' : mod_author, + 'Specification-Version' : project.jar.archiveVersion, + 'Implementation-Title' : project.name, + 'Implementation-Version': project.jar.archiveVersion, + 'Implementation-Vendor' : mod_author, + 'Built-On-Minecraft' : minecraft_version + ]) + } +} + +processResources { + def expandProps = [ + "version": version, + "group": project.group, //Else we target the task's group. + "minecraft_version": minecraft_version, + "forge_version": forge_version, + "forge_loader_version_range": forge_loader_version_range, + "forge_version_range": forge_version_range, + "minecraft_version_range": minecraft_version_range, + "fabric_version": fabric_version, + "fabric_loader_version": fabric_loader_version, + "mod_name": mod_name, + "mod_author": mod_author, + "mod_id": mod_id, + "license": license, + "description": project.description, + "neoforge_version": neoforge_version, + "neoforge_loader_version_range": neoforge_loader_version_range, + "credits": credits, + "java_version": java_version + ] + + filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'META-INF/neoforge.mods.toml', '*.mixins.json']) { + expand expandProps + } + inputs.properties(expandProps) +} + +publishing { + publications { + register('mavenJava', MavenPublication) { + artifactId base.archivesName.get() + from components.java + } + } + repositories { + maven { + url System.getenv("local_maven_url") + } + } +} diff --git a/buildSrc/src/main/groovy/multiloader-loader.gradle b/buildSrc/src/main/groovy/multiloader-loader.gradle new file mode 100644 index 0000000..8ebec22 --- /dev/null +++ b/buildSrc/src/main/groovy/multiloader-loader.gradle @@ -0,0 +1,44 @@ +plugins { + id 'multiloader-common' +} + +configurations { + commonJava{ + canBeResolved = true + } + commonResources{ + canBeResolved = true + } +} + +dependencies { + compileOnly(project(':common')) { + capabilities { + requireCapability "$group:$mod_id" + } + } + commonJava project(path: ':common', configuration: 'commonJava') + commonResources project(path: ':common', configuration: 'commonResources') +} + +tasks.named('compileJava', JavaCompile) { + dependsOn(configurations.commonJava) + source(configurations.commonJava) +} + +processResources { + dependsOn(configurations.commonResources) + from(configurations.commonResources) +} + +tasks.named('javadoc', Javadoc).configure { + dependsOn(configurations.commonJava) + source(configurations.commonJava) +} + +tasks.named("sourcesJar", Jar) { + dependsOn(configurations.commonJava) + from(configurations.commonJava) + dependsOn(configurations.commonResources) + from(configurations.commonResources) +} diff --git a/common/build.gradle b/common/build.gradle index d220346..d213886 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,34 +1,33 @@ plugins { - id 'idea' - id 'java' - id 'maven-publish' + id 'multiloader-common' id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' } -base { - archivesName = "${mod_name}-common-${minecraft_version}" -} + minecraft { version(minecraft_version) - if(file("src/main/resources/${mod_id}.accesswidener").exists()){ - accessWideners(file("src/main/resources/${mod_id}.accesswidener")) + def aw = file("src/main/resources/${mod_id}.accesswidener") + if(aw.exists()){ + accessWideners(aw) } } dependencies { - compileOnly group:'org.spongepowered', name:'mixin', version:'0.8.5' - implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1' + compileOnly group:'org.spongepowered', name:'mixin', version:'0.8.5' } -publishing { - publications { - mavenJava(MavenPublication) { - artifactId base.archivesName.get() - from components.java - } +configurations { + commonJava { + canBeResolved = false + canBeConsumed = true } - repositories { - maven { - url "file://" + System.getenv("local_maven") - } + commonResources { + canBeResolved = false + canBeConsumed = true } -} \ No newline at end of file +} + +artifacts { + commonJava sourceSets.main.java.sourceDirectories.singleFile + commonResources sourceSets.main.resources.sourceDirectories.singleFile +} + diff --git a/common/src/main/java/com/example/examplemod/mixin/MixinMinecraft.java b/common/src/main/java/com/example/examplemod/mixin/MixinMinecraft.java index 91d9161..bd8b355 100644 --- a/common/src/main/java/com/example/examplemod/mixin/MixinMinecraft.java +++ b/common/src/main/java/com/example/examplemod/mixin/MixinMinecraft.java @@ -2,7 +2,6 @@ package com.example.examplemod.mixin; import com.example.examplemod.Constants; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.screens.TitleScreen; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; diff --git a/common/src/main/resources/examplemod.mixins.json b/common/src/main/resources/examplemod.mixins.json index 3bc0b93..71b5c4c 100644 --- a/common/src/main/resources/examplemod.mixins.json +++ b/common/src/main/resources/examplemod.mixins.json @@ -1,18 +1,16 @@ { - "required": true, - "minVersion": "0.8", - "package": "com.example.examplemod.mixin", - "refmap": "${mod_id}.refmap.json", - "compatibilityLevel": "JAVA_17", - "mixins": [ - ], - "client": [ - "MixinMinecraft" - ], - "server": [ - ], - "injectors": { - "defaultRequire": 1 - } + "required": true, + "minVersion": "0.8", + "package": "com.example.examplemod.mixin", + "refmap": "${mod_id}.refmap.json", + "compatibilityLevel": "JAVA_17", + "mixins": [], + "client": [ + "MixinMinecraft" + ], + "server": [], + "injectors": { + "defaultRequire": 1 + } } diff --git a/fabric/build.gradle b/fabric/build.gradle index 461ff84..f788e0a 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,24 +1,18 @@ plugins { - id 'java' - id 'idea' - id 'maven-publish' - id 'fabric-loom' version '1.4-SNAPSHOT' -} -base { - archivesName = "${mod_name}-fabric-${minecraft_version}" + id 'multiloader-loader' + id 'fabric-loom' version '1.6-SNAPSHOT' } dependencies { minecraft "com.mojang:minecraft:${minecraft_version}" mappings loom.officialMojangMappings() modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" - implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1' - compileOnly project(":common") } loom { - if (project(":common").file("src/main/resources/${mod_id}.accesswidener").exists()) { - accessWidenerPath.set(project(":common").file("src/main/resources/${mod_id}.accesswidener")) + def aw = project(":common").file("src/main/resources/${mod_id}.accesswidener") + if (aw.exists()) { + accessWidenerPath.set(aw) } mixin { defaultRefmapName.set("${mod_id}.refmap.json") @@ -28,41 +22,13 @@ loom { client() setConfigName("Fabric Client") ideConfigGenerated(true) - runDir("run") + runDir("runs/client") } server { server() setConfigName("Fabric Server") ideConfigGenerated(true) - runDir("run") + runDir("runs/server") } } -} - -tasks.withType(JavaCompile).configureEach { - source(project(":common").sourceSets.main.allSource) -} -tasks.withType(Javadoc).configureEach { - source(project(":common").sourceSets.main.allJava) -} -tasks.named("sourcesJar", Jar) { - from(project(":common").sourceSets.main.allSource) -} - -processResources { - from project(":common").sourceSets.main.resources -} - -publishing { - publications { - mavenJava(MavenPublication) { - artifactId base.archivesName.get() - from components.java - } - } - repositories { - maven { - url "file://" + System.getenv("local_maven") - } - } -} +} \ No newline at end of file diff --git a/fabric/src/main/resources/examplemod.fabric.mixins.json b/fabric/src/main/resources/examplemod.fabric.mixins.json index ad174ea..b8d1f95 100644 --- a/fabric/src/main/resources/examplemod.fabric.mixins.json +++ b/fabric/src/main/resources/examplemod.fabric.mixins.json @@ -1,18 +1,16 @@ { - "required": true, - "minVersion": "0.8", - "package": "com.example.examplemod.mixin", - "refmap": "${mod_id}.refmap.json", - "compatibilityLevel": "JAVA_17", - "mixins": [ - ], - "client": [ - "MixinTitleScreen" - ], - "server": [ - ], - "injectors": { - "defaultRequire": 1 - } + "required": true, + "minVersion": "0.8", + "package": "com.example.examplemod.mixin", + "refmap": "${mod_id}.refmap.json", + "compatibilityLevel": "JAVA_17", + "mixins": [], + "client": [ + "MixinTitleScreen" + ], + "server": [], + "injectors": { + "defaultRequire": 1 } +} diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 6731fbb..649d575 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -27,7 +27,7 @@ "fabricloader": ">=${fabric_loader_version}", "fabric-api": "*", "minecraft": "${minecraft_version}", - "java": ">=17" + "java": ">=${java_version}" }, "suggests": { "another-mod": "*" diff --git a/forge/build.gradle b/forge/build.gradle index c828754..bbee235 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -1,6 +1,5 @@ plugins { - id 'idea' - id 'maven-publish' + id 'multiloader-loader' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' } @@ -22,50 +21,42 @@ minecraft { // Automatically enable forge AccessTransformers if the file exists // This location is hardcoded in Forge and can not be changed. // https://github.com/MinecraftForge/MinecraftForge/blob/be1698bb1554f9c8fa2f58e32b9ab70bc4385e60/fmlloader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFile.java#L123 - if (file('src/main/resources/META-INF/accesstransformer.cfg').exists()) { - accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') + def at = file('src/main/resources/META-INF/accesstransformer.cfg') + if (at.exists()) { + accessTransformer = at } runs { client { - workingDirectory project.file('run') + workingDirectory file('runs/client') ideaModule "${rootProject.name}.${project.name}.main" taskName 'Client' - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" mods { modClientRun { source sourceSets.main - source project(":common").sourceSets.main } } } server { - workingDirectory project.file('run') + workingDirectory file('runs/server') ideaModule "${rootProject.name}.${project.name}.main" taskName 'Server' - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" mods { modServerRun { source sourceSets.main - source project(":common").sourceSets.main } } } data { - workingDirectory project.file('run') + workingDirectory file('runs/data') ideaModule "${rootProject.name}.${project.name}.main" args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') taskName 'Data' - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" mods { modDataRun { source sourceSets.main - source project(":common").sourceSets.main } } } @@ -76,39 +67,17 @@ sourceSets.main.resources.srcDir 'src/generated/resources' dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" - compileOnly project(":common") annotationProcessor("org.spongepowered:mixin:0.8.5-SNAPSHOT:processor") } -tasks.withType(JavaCompile).configureEach { - source(project(":common").sourceSets.main.allSource) -} -tasks.withType(Javadoc).configureEach { - source(project(":common").sourceSets.main.allJava) -} -tasks.named("sourcesJar", Jar) { - from(project(":common").sourceSets.main.allSource) -} - -processResources { - from project(":common").sourceSets.main.resources -} - jar.finalizedBy('reobfJar') publishing { publications { mavenJava(MavenPublication) { - artifactId base.archivesName.get() - from components.java fg.component(it) } } - repositories { - maven { - url "file://" + System.getenv("local_maven") - } - } } sourceSets.each { diff --git a/forge/src/main/resources/examplemod.forge.mixins.json b/forge/src/main/resources/examplemod.forge.mixins.json index 95882ac..a8c3e35 100644 --- a/forge/src/main/resources/examplemod.forge.mixins.json +++ b/forge/src/main/resources/examplemod.forge.mixins.json @@ -1,17 +1,15 @@ { - "required": true, - "minVersion": "0.8", - "package": "com.example.examplemod.mixin", - "refmap": "${mod_id}.refmap.json", - "compatibilityLevel": "JAVA_17", - "mixins": [ - ], - "client": [ - "MixinTitleScreen" - ], - "server": [ - ], - "injectors": { - "defaultRequire": 1 - } + "required": true, + "minVersion": "0.8", + "package": "com.example.examplemod.mixin", + "refmap": "${mod_id}.refmap.json", + "compatibilityLevel": "JAVA_17", + "mixins": [], + "client": [ + "MixinTitleScreen" + ], + "server": [], + "injectors": { + "defaultRequire": 1 + } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 16a0fd8..c7c45ee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,6 +4,7 @@ # Project version=1.0.0 group=com.example.examplemod +java_version=17 # Common minecraft_version=1.20.4 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd49..e644113 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1af9e09..b82aa23 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew.bat b/gradlew.bat index 93e3f59..25da30d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 96ab3ed..c32f04f 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -1,18 +1,14 @@ plugins { - id 'idea' - id 'maven-publish' - id 'net.neoforged.gradle.userdev' version '7.0.81' - id 'java-library' -} -base { - archivesName = "${mod_name}-neoforge-${minecraft_version}" + id 'multiloader-loader' + id 'net.neoforged.gradle.userdev' version '7.0.107' } // Automatically enable neoforge AccessTransformers if the file exists // This location is hardcoded in FML and can not be changed. // https://github.com/neoforged/FancyModLoader/blob/a952595eaaddd571fbc53f43847680b00894e0c1/loader/src/main/java/net/neoforged/fml/loading/moddiscovery/ModFile.java#L118 -if (file('src/main/resources/META-INF/accesstransformer.cfg').exists()) { - minecraft.accessTransformers.file file('src/main/resources/META-INF/accesstransformer.cfg') +def at = file('src/main/resources/META-INF/accesstransformer.cfg') +if (at.exists()) { + minecraft.accessTransformers.file at } runs { configureEach { @@ -39,38 +35,4 @@ sourceSets.main.resources { srcDir 'src/generated/resources' } dependencies { implementation "net.neoforged:neoforge:${neoforge_version}" - compileOnly project(":common") -} - -// NeoGradle compiles the game, but we don't want to add our common code to the game's code -Spec notNeoTask = { Task it -> !it.name.startsWith("neo") } as Spec - -tasks.withType(JavaCompile).matching(notNeoTask).configureEach { - source(project(":common").sourceSets.main.allSource) -} - -tasks.withType(Javadoc).matching(notNeoTask).configureEach { - source(project(":common").sourceSets.main.allJava) -} - -tasks.named("sourcesJar", Jar) { - from(project(":common").sourceSets.main.allSource) -} - -tasks.withType(ProcessResources).matching(notNeoTask).configureEach { - from project(":common").sourceSets.main.resources -} - -publishing { - publications { - mavenJava(MavenPublication) { - artifactId base.archivesName.get() - from components.java - } - } - repositories { - maven { - url "file://" + System.getenv("local_maven") - } - } -} +} \ No newline at end of file diff --git a/neoforge/src/main/resources/examplemod.neoforge.mixins.json b/neoforge/src/main/resources/examplemod.neoforge.mixins.json index 8b40479..523cdf6 100644 --- a/neoforge/src/main/resources/examplemod.neoforge.mixins.json +++ b/neoforge/src/main/resources/examplemod.neoforge.mixins.json @@ -1,16 +1,14 @@ { - "required": true, - "minVersion": "0.8", - "package": "com.example.examplemod.mixin", - "compatibilityLevel": "JAVA_17", - "mixins": [ - ], - "client": [ - "MixinTitleScreen" - ], - "server": [ - ], - "injectors": { - "defaultRequire": 1 - } + "required": true, + "minVersion": "0.8", + "package": "com.example.examplemod.mixin", + "compatibilityLevel": "JAVA_17", + "mixins": [], + "client": [ + "MixinTitleScreen" + ], + "server": [], + "injectors": { + "defaultRequire": 1 + } } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 3e26fcf..1eb13e3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,21 +1,52 @@ pluginManagement { repositories { gradlePluginPortal() - maven { - name = 'Fabric' - url = 'https://maven.fabricmc.net/' + mavenCentral() + exclusiveContent { + forRepository { + maven { + name = 'Fabric' + url = uri("https://maven.fabricmc.net") + } + } + filter { + includeGroup("net.fabricmc") + includeGroup("fabric-loom") + } } - maven { - name = 'NeoForge' - url = 'https://maven.neoforged.net/releases/' + exclusiveContent { + forRepository { + maven { + name = 'NeoForge' + url = uri("https://maven.neoforged.net/releases") + } + } + filter { + includeGroupAndSubgroups("net.neoforged") + includeGroup("codechicken") + } } - maven { - name = 'Forge' - url = 'https://maven.minecraftforge.net/' + exclusiveContent { + forRepository { + maven { + name = 'Forge' + url = uri("https://maven.minecraftforge.net") + } + } + filter { + includeGroupAndSubgroups("net.minecraftforge") + } } - maven { - name = 'Sponge Snapshots' - url = 'https://repo.spongepowered.org/repository/maven-public/' + exclusiveContent { + forRepository { + maven { + name = 'Sponge Snapshots' + url = uri("https://repo.spongepowered.org/repository/maven-public") + } + } + filter { + includeGroupAndSubgroups("org.spongepowered") + } } } }