@@ -71,9 +71,12 @@ sourceSets {
7171 runtimeClasspath + = java8. output
7272 }
7373 legacy
74+ mcpforge
7475 test {
7576 compileClasspath + = legacy. output
7677 runtimeClasspath + = legacy. output
78+ compileClasspath + = mcpforge. output
79+ runtimeClasspath + = mcpforge. output
7780 }
7881}
7982
@@ -83,6 +86,7 @@ configurations {
8386 // Place shaded dependencies into `compileOnly` so that they do not leak into our publications' dependencies.
8487 compileOnly. extendsFrom shaded
8588 legacyCompileOnly. extendsFrom shaded
89+ mcpforgeCompileOnly. extendsFrom shaded
8690 testCompileOnly. extendsFrom shaded
8791 testRuntimeOnly. extendsFrom shaded
8892 shadowRuntimeElements {
@@ -113,6 +117,8 @@ dependencies {
113117 compileOnly " com.intellij:annotations:9.0.4"
114118 testCompileOnly " com.intellij:annotations:9.0.4"
115119 shaded " com.google.code.gson:gson:2.11.0"
120+ shaded " org.ow2.asm:asm-commons:9.7.1"
121+ shaded " org.tukaani:xz:1.10"
116122 implementation " gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.2"
117123 shaded " net.neoforged:EclipseLaunchConfigs:0.1.11"
118124 shaded " net.neoforged:VscLaunchConfigs:1.0.8"
@@ -134,6 +140,11 @@ dependencies {
134140 legacyImplementation(sourceSets. main. output)
135141 legacyImplementation(sourceSets. java8. output)
136142 legacyImplementation gradleApi()
143+
144+ mcpforgeImplementation(sourceSets. main. output)
145+ mcpforgeImplementation(sourceSets. legacy. output)
146+ mcpforgeImplementation(sourceSets. java8. output)
147+ mcpforgeImplementation gradleApi()
137148}
138149
139150java {
@@ -147,13 +158,15 @@ jar {
147158 archiveClassifier = ' slim'
148159 from sourceSets. java8. output
149160 from sourceSets. legacy. output
161+ from sourceSets. mcpforge. output
150162}
151163
152164shadowJar {
153165 archiveClassifier = " " // Required for the Plugin Publish Plugin to publish this jar
154166
155167 from sourceSets. java8. output
156168 from sourceSets. legacy. output
169+ from sourceSets. mcpforge. output
157170
158171 configurations = [project. configurations. shaded]
159172 enableRelocation = true
@@ -164,8 +177,9 @@ assemble.dependsOn shadowJar
164177
165178tasks. named(" compileJava8Java" ). configure {
166179 javaCompiler = javaToolchains. compilerFor {
167- languageVersion = JavaLanguageVersion . of(8 )
180+ languageVersion = JavaLanguageVersion . of(17 )
168181 }
182+ options. release = 8
169183}
170184
171185javadoc {
@@ -205,7 +219,7 @@ gradlePlugin {
205219 id = ' net.neoforged.moddev.legacyforge'
206220 implementationClass = ' net.neoforged.moddevgradle.boot.LegacyForgeModDevPlugin'
207221 displayName = " Mod Development Plugin for Legacy Forge"
208- description = " This plugin helps you create Minecraft mods using the Forge platform, up to 1.20.1"
222+ description = " This plugin helps you create Minecraft mods using the Forge platform, from 1.12.2 up to 1.20.1"
209223 tags = [" minecraft" , " neoforge" , " forge" , " java" , " mod" ]
210224 }
211225 repositories {
@@ -219,9 +233,16 @@ gradlePlugin {
219233 id = ' net.neoforged.moddev.legacyforge.repositories'
220234 implementationClass = ' net.neoforged.moddevgradle.boot.LegacyRepositoriesPlugin'
221235 displayName = " Mod Development Repositories Plugin for Legacy Forge"
222- description = " This plugin adds the repositories needed for developing Minecraft mods using the Forge platform, up to 1.20.1. It is applied automatically by the legacyforge plugin, but can be applied manually in settings.gradle to make use of Gradle dependency management."
236+ description = " This plugin adds the repositories needed for developing Minecraft mods using the Forge platform, from 1.12.2 up to 1.20.1. It is applied automatically by the legacyforge plugin, but can be applied manually in settings.gradle to make use of Gradle dependency management."
223237 tags = [" minecraft" , " neoforge" , " forge" , " java" , " mod" ]
224238 }
239+ mcpforge {
240+ id = ' net.neoforged.moddev.mcpforge'
241+ implementationClass = ' net.neoforged.moddevgradle.boot.McpForgePlugin'
242+ displayName = " Mod Development Plugin for Legacy Forge 1.12.2 (MCP)"
243+ description = " This plugin helps you create Minecraft mods using the Forge platform for 1.12.2 (MCP mappings). It is the isolated home for the 1.12.2/MCP-specific toolchain, distinct from legacyforge."
244+ tags = [" minecraft" , " forge" , " java" , " mod" , " 1.12.2" , " mcp" ]
245+ }
225246 }
226247}
227248
@@ -337,6 +358,9 @@ abstract class GenerateRepoFilter extends DefaultTask {
337358 artifacts. add(new Artifact (location[0 ], location[1 ]))
338359 }
339360 }
361+ // Required by Forge 1.12.2 and still hosted on Mojang's libraries maven, but not
362+ // referenced by Mojang's vanilla version manifests.
363+ artifacts. add(new Artifact (' lzma' , ' lzma' ))
340364 final artifactList = artifacts. toList()
341365 Collections . sort(artifactList)
342366 final clazz = """
0 commit comments