mirror of
https://github.com/MinecraftForge/MinecraftForge
synced 2026-08-22 04:26:10 -04:00
Backport of d29524b to 1.21.10.
Also bumped ASM to 9.9.1, EventBus to 7.0.1 (non-beta) and MixinExtras to 0.5.3
1119 lines
40 KiB
Groovy
1119 lines
40 KiB
Groovy
import de.undercouch.gradle.tasks.download.Download
|
|
import net.minecraftforge.forge.tasks.checks.CheckATs
|
|
import net.minecraftforge.forge.tasks.checks.CheckExcs
|
|
import net.minecraftforge.forge.tasks.checks.CheckPatches
|
|
import net.minecraftforge.forge.tasks.checks.CheckSAS
|
|
import net.minecraftforge.forge.tasks.checks.CheckTask
|
|
|
|
import java.nio.file.Files
|
|
import net.minecraftforge.forge.tasks.*
|
|
import static net.minecraftforge.forge.tasks.Util.*
|
|
import net.minecraftforge.gradle.common.tasks.ApplyBinPatches
|
|
import net.minecraftforge.gradle.common.tasks.CheckJarCompatibility
|
|
import net.minecraftforge.gradle.common.tasks.DownloadMavenArtifact
|
|
import net.minecraftforge.gradle.common.tasks.ExtractInheritance
|
|
import net.minecraftforge.gradle.patcher.tasks.FilterNewJar
|
|
import net.minecraftforge.gradle.patcher.tasks.GeneratePatches
|
|
import net.minecraftforge.gradle.userdev.tasks.RenameJar
|
|
import org.apache.tools.ant.filters.ReplaceTokens
|
|
import org.objectweb.asm.Opcodes
|
|
|
|
plugins {
|
|
id 'idea'
|
|
id 'eclipse'
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'net.minecraftforge.licenser'
|
|
id 'de.undercouch.download'
|
|
id 'net.minecraftforge.gradleutils'
|
|
id 'net.minecraftforge.gradle.patcher'
|
|
id 'net.minecraftforge.gradlejarsigner'
|
|
}
|
|
|
|
Util.init() //Init all our extension methods!
|
|
|
|
// We depend on all other projects so that we can know their versions for userdev config
|
|
rootProject.subprojects.each { sib -> if (sib != project) evaluationDependsOn(sib.path) }
|
|
|
|
apply from: rootProject.file('build_shared.gradle')
|
|
|
|
java {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(JAVA_VERSION)
|
|
withSourcesJar()
|
|
}
|
|
|
|
jarSigner.autoDetect('forge')
|
|
|
|
applyPatches {
|
|
level 'WARNING'
|
|
failOnError = UPDATING != 'true'
|
|
rejects = rootProject.layout.projectDirectory.dir('rejects').asFile
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir "$rootDir/src/main/java"
|
|
}
|
|
resources {
|
|
srcDir "$rootDir/src/main/resources"
|
|
srcDir "$rootDir/src/main/generated"
|
|
}
|
|
}
|
|
test {
|
|
java {
|
|
srcDir "$rootDir/src/test/java"
|
|
}
|
|
resources {
|
|
srcDir "$rootDir/src/test/resources"
|
|
srcDir "$rootDir/src/test/generated"
|
|
}
|
|
}
|
|
}
|
|
|
|
final String SPEC_VERSION = gitversion.info.tag
|
|
|
|
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
|
|
// ForgeMC is a unique identifier for every MC version we have supported.
|
|
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
|
|
final def MCP_ARTIFACT = project(':mcp').mcp.config.get()
|
|
|
|
final List<File> EXTRA_TXTS = [
|
|
rootProject.file('LICENSE.txt'),
|
|
rootProject.tasks.createChangelog.outputFile
|
|
]
|
|
|
|
ext {
|
|
MAVEN_PATH = "${group.toString().replace('.', '/')}/${project.name}/${VERSION}".toString()
|
|
}
|
|
final String MAVEN_PATH = ext.MAVEN_PATH
|
|
|
|
final String BINPATCH_TOOL = 'net.minecraftforge:binarypatcher:1.2.0:fatjar'
|
|
final String INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.4.3'
|
|
final String FART = 'net.minecraftforge:ForgeAutoRenamingTool:1.0.6'
|
|
final String S2S_TOOL = 'net.minecraftforge:Srg2Source:8.1.1:fatjar'
|
|
|
|
configurations {
|
|
// Don't pull all libraries, if we're missing something, add it to the installer list so the installer knows to download it.
|
|
bootstrap { transitive = false }
|
|
installer {
|
|
extendsFrom(bootstrap)
|
|
transitive = false
|
|
}
|
|
installerextra {
|
|
extendsFrom(bootstrap)
|
|
transitive = false
|
|
}
|
|
api.extendsFrom(installer)
|
|
}
|
|
|
|
dependencies {
|
|
// These need to actually be on the classpath at the start. This is only used for the server shim jar.
|
|
// And this is only needed because custom file systems are REQUIRED to be on the boot classloader.
|
|
// This has ASM/BootStrap/Unsafe all because I haven't gotten around to moving UnionFileSystem out to its own project.
|
|
bootstrap(libs.jarjar.fs) // JarInJar file system
|
|
bootstrap(libs.roimfs) // JarInJar File System - FileSystems need to be on boot loader.
|
|
bootstrap(libs.bundles.jimfs) // In memory file system used for ForgeDev launches
|
|
bootstrap(libs.securemodules) // Has Union file system in it
|
|
bootstrap(libs.unsafe) // Needed by securemodules
|
|
bootstrap(libs.bundles.asm) // Needed by securemodules
|
|
|
|
implementation(libs.jopt.simple)
|
|
|
|
installer(libs.bootstrap)
|
|
installer(libs.bootstrap.api) // Needed by securemodules
|
|
installer(libs.accesstransformers)
|
|
installer(libs.eventbus)
|
|
installer(libs.jspecify) // Dep of EventBus
|
|
installer(libs.forgespi)
|
|
installer(libs.coremods)
|
|
installer(libs.nashorn) // Dep of Coremods
|
|
installer(libs.modlauncher)
|
|
installer(libs.mergetool.api)
|
|
installer(libs.bundles.night.config)
|
|
installer(libs.maven.artifact)
|
|
installer(libs.bundles.terminalconsoleappender)
|
|
installer(libs.mixin)
|
|
installer(libs.mixinextras.forge)
|
|
installer(libs.bundles.jarjar)
|
|
installer(libs.roimfs)
|
|
|
|
installer(project(':fmlcore'))
|
|
installer(project(':fmlloader'))
|
|
installer(project(':fmlearlydisplay'))
|
|
installer(project(':javafmllanguage'))
|
|
installer(project(':lowcodelanguage'))
|
|
installer(project(':mclanguage'))
|
|
installer(project(':forge-transformers'))
|
|
|
|
installerextra("${MCP_ARTIFACT.group}:${MCP_ARTIFACT.name}:${MCP_ARTIFACT.version}:srg2off")
|
|
|
|
runtimeOnly(libs.bootstrap)
|
|
runtimeOnly(libs.bootstrap.dev)
|
|
|
|
annotationProcessor(libs.eventbus.validator)
|
|
}
|
|
|
|
tasks.named('extractRangeMap').configure {
|
|
tool = S2S_TOOL
|
|
}
|
|
|
|
patcher {
|
|
excs.from file("$rootDir/src/main/resources/forge.exc")
|
|
parent = project(':mcp')
|
|
mcVersion = MC_VERSION
|
|
mappings channel: MAPPING_CHANNEL, version: MAPPING_VERSION
|
|
patches = file("$rootDir/patches/minecraft")
|
|
patchedSrc = file('src/main/java')
|
|
srgPatches = false
|
|
accessTransformers.from file("$rootDir/src/main/resources/META-INF/accesstransformer.cfg")
|
|
sideAnnotationStrippers.from file("$rootDir/src/main/resources/forge.sas")
|
|
|
|
runs {
|
|
forge_client {
|
|
property 'eventbus.api.strictRuntimeChecks', 'true'
|
|
property 'org.lwjgl.system.SharedLibraryExtractDirectory', 'lwjgl_dll'
|
|
|
|
args '--launchTarget', 'forge_dev_client',
|
|
'--username', 'Dev',
|
|
'--version', project.name,
|
|
'--accessToken', '0',
|
|
'--userType', 'mojang',
|
|
'--versionType', 'release',
|
|
'--assetsDir', downloadAssets.output,
|
|
'--assetIndex', "{asset_index}"
|
|
}
|
|
|
|
forge_client_test {
|
|
parent runs.forge_client
|
|
source sourceSets.test
|
|
}
|
|
|
|
forge_server {
|
|
args '--launchTarget', 'forge_dev_server'
|
|
}
|
|
|
|
forge_server_test {
|
|
parent runs.forge_server
|
|
source sourceSets.test
|
|
}
|
|
|
|
forge_server_gametest {
|
|
args '--launchTarget', 'forge_dev_server_gametest'
|
|
args '--uniqueWorld' // Unique world is used so that the world regenerates, as well as the world config isn't influenced by other runs
|
|
}
|
|
|
|
forge_server_gametest_test {
|
|
parent runs.forge_server_gametest
|
|
source sourceSets.test
|
|
}
|
|
|
|
forge_data {
|
|
args '--launchTarget', 'forge_dev_data',
|
|
'--mod', 'forge',
|
|
'--all',
|
|
'--validate',
|
|
'--output', rootProject.file('src/main/generated/'),
|
|
'--existing', sourceSets.main.resources.srcDirs[0],
|
|
'--assetsDir', downloadAssets.output,
|
|
'--assetIndex', "{asset_index}"
|
|
}
|
|
|
|
forge_data_test {
|
|
source sourceSets.test
|
|
args '--launchTarget', 'forge_dev_data',
|
|
'--mod', '.+',
|
|
'--all',
|
|
'--validate',
|
|
'--output', rootProject.file('src/test/generated/'),
|
|
'--existing', sourceSets.main.resources.srcDirs[0],
|
|
'--existing', sourceSets.test.resources.srcDirs[0],
|
|
'--assetsDir', downloadAssets.output,
|
|
'--assetIndex', "{asset_index}"
|
|
}
|
|
|
|
forge_client_data {
|
|
args '--launchTarget', 'forge_dev_client_data',
|
|
'--mod', 'forge',
|
|
'--all',
|
|
'--output', rootProject.file('src/main/generated/'),
|
|
'--existing', sourceSets.main.resources.srcDirs[0],
|
|
'--assetsDir', downloadAssets.output,
|
|
'--assetIndex', "{asset_index}"
|
|
}
|
|
|
|
forge_client_data_test {
|
|
source sourceSets.test
|
|
args '--launchTarget', 'forge_dev',
|
|
'--launchEntry', 'minecraft/net.minecraft.client.data.Main',
|
|
'--launchData',
|
|
'--mod', '.+',
|
|
'--all',
|
|
'--output', rootProject.file('src/test/generated/'),
|
|
'--existing', sourceSets.main.resources.srcDirs[0],
|
|
'--existing', sourceSets.test.resources.srcDirs[0],
|
|
'--assetsDir', downloadAssets.output,
|
|
'--assetIndex', "{asset_index}"
|
|
}
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
if (!patcher.srgPatches) {
|
|
srg2mcpClean {
|
|
dependsOn = []
|
|
input = project(':mcp').setupMCP.output
|
|
}
|
|
userdevJar {
|
|
onlyIf = { t -> true }
|
|
}
|
|
def patches = project.file('build/genPatchesForUserdev/output/')
|
|
patches.mkdirs()
|
|
def genPatchesForUserdev = tasks.register('genPatchesForUserdev', GeneratePatches){
|
|
base = project(':mcp').setupMCP.output
|
|
modified = applyRangeMapBase.output
|
|
originalPrefix = genPatches.originalPrefix
|
|
modifiedPrefix = genPatches.modifiedPrefix
|
|
output = patches
|
|
autoHeader true
|
|
lineEnding = '\n'
|
|
}
|
|
bakePatches {
|
|
dependsOn = []
|
|
input = genPatchesForUserdev.get().output
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register('downloadCrowdin', Download) {
|
|
src 'https://files.minecraftforge.net/crowdin.zip'
|
|
dest file('build/crowdin.zip')
|
|
useETag 'all'
|
|
onlyIfModified true
|
|
quiet true
|
|
}
|
|
|
|
tasks.userdevConfig.configure {
|
|
configurations.installer.allDependencies.forEach {
|
|
def dep = it.toString()
|
|
if (it instanceof ProjectDependency)
|
|
dep = "net.minecraftforge:$it.dependencyProject.name:$it.dependencyProject.version"
|
|
libraries.add(dep)
|
|
}
|
|
|
|
// TODO [ForgeDev][UserDev] Split API/Runtime elements in userdev config
|
|
// so we don't gotta keep making exceptions for MixinExtras
|
|
addCompileDependency(libs.mixinextras.common)
|
|
addAnnotationProcessorDependency(libs.mixinextras.common)
|
|
|
|
inject = '' // We don't have a userdev sourceset anymore. Empty as a gradle workaround...
|
|
runs {
|
|
client {
|
|
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
|
property 'forge.enableGameTest', 'true'
|
|
args '--launchTarget', "forge_userdev_client"
|
|
args '--version', 'MOD_DEV'
|
|
args '--assetIndex', '{asset_index}'
|
|
args '--assetsDir', '{assets_root}'
|
|
}
|
|
|
|
clientData {
|
|
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
|
args '--launchTarget', "forge_userdev_client_data"
|
|
args '--assetIndex', '{asset_index}'
|
|
args '--assetsDir', '{assets_root}'
|
|
}
|
|
|
|
server {
|
|
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
|
property 'forge.enableGameTest', 'true'
|
|
args '--launchTarget', "forge_userdev_server"
|
|
}
|
|
|
|
gameTestServer {
|
|
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
|
args '--launchTarget', "forge_userdev_server_gametest"
|
|
}
|
|
|
|
data {
|
|
environment 'MCP_MAPPINGS', '{mcp_mappings}'
|
|
args '--launchTarget', "forge_userdev_data"
|
|
args '--assetIndex', '{asset_index}'
|
|
args '--assetsDir', '{assets_root}'
|
|
}
|
|
}
|
|
}
|
|
|
|
for (def run in patcher.runs + tasks.userdevConfig.runs) {
|
|
if (run.parents) continue // We already added this to the parent run config
|
|
//run.property 'bsl.debug', 'true'
|
|
run.args '--gameDir', '.'
|
|
run.jvmArgs '-Djava.net.preferIPv6Addresses=system'
|
|
run.client run.name.contains('client')
|
|
run.main 'net.minecraftforge.bootstrap.ForgeBootstrap'
|
|
}
|
|
|
|
for (def run : patcher.runs) {
|
|
def isTest = run.name.endsWith('_test')
|
|
run.taskName = run.name
|
|
run.workingDirectory file('run/' + run.name)
|
|
run.ideaModule rootProject.name + '.' + project.name + '.' + (isTest ? 'test' : 'main')
|
|
run.property 'bsl.debug', 'true'
|
|
run.property 'terminal.jline', 'true'
|
|
if (isTest) {
|
|
run.property 'forge.enableGameTest', 'true'
|
|
run.property 'forgedev.enableTestMods', 'true'
|
|
}
|
|
}
|
|
|
|
tasks.register('downloadVersionManifest', Download) {
|
|
src 'https://piston-meta.mojang.com/mc/game/version_manifest_v2.json'
|
|
dest file('build/versions/version_manifest.json')
|
|
useETag 'all'
|
|
onlyIfModified true
|
|
quiet true
|
|
}
|
|
tasks.register('downloadJson', Download) {
|
|
dependsOn downloadVersionManifest
|
|
inputs.file downloadVersionManifest.dest
|
|
src { downloadVersionManifest.dest.json.versions.find { it.id == MC_VERSION }.url }
|
|
dest file("build/versions/$MC_VERSION/version.json")
|
|
useETag 'all'
|
|
onlyIfModified true
|
|
quiet true
|
|
}
|
|
tasks.register('downloadClientRaw', Download) {
|
|
dependsOn downloadJson
|
|
inputs.file downloadJson.dest
|
|
src { downloadJson.dest.json.downloads.client.url }
|
|
dest file("build/versions/$MC_VERSION/client.jar")
|
|
useETag 'all'
|
|
onlyIfModified true
|
|
quiet true
|
|
}
|
|
tasks.register('downloadServerRaw', Download) {
|
|
dependsOn downloadJson
|
|
inputs.file downloadJson.dest
|
|
src { downloadJson.dest.json.downloads.server.url }
|
|
dest file("build/versions/$MC_VERSION/server-bundled.jar")
|
|
useETag 'all'
|
|
onlyIfModified true
|
|
quiet true
|
|
}
|
|
tasks.register('extractServer', ExtractFile) {
|
|
dependsOn downloadServerRaw
|
|
input = downloadServerRaw.dest
|
|
target = "META-INF/versions/$MC_VERSION/server-${MC_VERSION}.jar"
|
|
output = file("build/versions/$MC_VERSION/server.jar")
|
|
}
|
|
tasks.register('downloadLibraries', DownloadLibraries) {
|
|
dependsOn downloadJson
|
|
input = downloadJson.dest
|
|
output = rootProject.file('build/libraries/')
|
|
}
|
|
tasks.register('extractInheritance', ExtractInheritance) {
|
|
dependsOn downloadLibraries
|
|
tool = INSTALLER_TOOLS + ':fatjar'
|
|
args.add '--annotations'
|
|
input = genJoinedBinPatches.cleanJar
|
|
libraries.addAll downloadLibraries.librariesOutput.map { rf ->
|
|
Files.readAllLines(rf.asFile.toPath()).stream().map(File::new).toList()
|
|
}
|
|
}
|
|
tasks.register("findFinalizeSpawnTargets", BytecodePredicateFinder) {
|
|
jar = createClientOfficial.output
|
|
output = rootProject.file('forge-transformers/src/main/resources/coremods/finalize_spawn_targets.json')
|
|
predicate = {
|
|
parent, node, insn ->
|
|
return 'net/minecraft/world/level/BaseSpawner' != parent.name // Ignore this class as we special case it.
|
|
&& insn.getOpcode().equals(Opcodes.INVOKEVIRTUAL)
|
|
&& insn.name == 'finalizeSpawn'
|
|
&& insn.desc == '(Lnet/minecraft/world/level/ServerLevelAccessor;Lnet/minecraft/world/DifficultyInstance;Lnet/minecraft/world/entity/EntitySpawnReason;Lnet/minecraft/world/entity/SpawnGroupData;)Lnet/minecraft/world/entity/SpawnGroupData;';
|
|
}
|
|
}
|
|
tasks.register('validateDeprecations', ValidateDeprecations) {
|
|
input = tasks.jar.archiveFile
|
|
mcVersion = MC_VERSION
|
|
}
|
|
tasks.named('jar', Jar).configure {
|
|
finalizedBy 'validateDeprecations'
|
|
}
|
|
tasks.register("downloadInstaller", DownloadMavenArtifact) {
|
|
artifact = "net.minecraftforge:installer:2.2.+:fatjar"
|
|
changing = true
|
|
}
|
|
tasks.register("downloadServerShim", DownloadMavenArtifact) {
|
|
artifact = libs.bootstrap.shim.get().toString()
|
|
changing = true
|
|
}
|
|
tasks.register('downloadClientMappings', net.minecraftforge.gradle.common.tasks.JarExec) {
|
|
ext.output = file('build/client_mappings.tsrg')
|
|
tool = INSTALLER_TOOLS + ':fatjar'
|
|
args = ['--task', 'DOWNLOAD_MOJMAPS', '--sanitize', '--version', MC_VERSION, '--side', 'client', '--output', output.absolutePath]
|
|
outputs.file(output)
|
|
}
|
|
tasks.register('downloadServerMappings', net.minecraftforge.gradle.common.tasks.JarExec) {
|
|
ext.output = file('build/server_mappings.tsrg')
|
|
tool = INSTALLER_TOOLS + ':fatjar'
|
|
args = ['--task', 'DOWNLOAD_MOJMAPS', '--sanitize', '--version', MC_VERSION, '--side', 'server', '--output', output.absolutePath]
|
|
outputs.file(output)
|
|
}
|
|
tasks.register("createJoinedSRG", DownloadMavenArtifact) {
|
|
artifact = "net.minecraft:joined:${MC_VERSION}-${MCP_VERSION}:srg"
|
|
}
|
|
tasks.register("createClientOfficial", RenameJar) {
|
|
tool = FART + ':all'
|
|
args = ['--input', '{input}', '--output', '{output}', '--names', '{mappings}', '--ann-fix', '--ids-fix', '--src-fix', '--record-fix', '--strip-sigs', '--reverse']
|
|
mappings = downloadClientMappings.output
|
|
dependsOn(downloadClientRaw, downloadClientMappings)
|
|
input = downloadClientRaw.dest
|
|
output = file("build/createClientOfficial/output.jar")
|
|
}
|
|
tasks.register("createServerOfficial", RenameJar) {
|
|
tool = FART + ':all'
|
|
args = ['--input', '{input}', '--output', '{output}', '--names', '{mappings}', '--ann-fix', '--ids-fix', '--src-fix', '--record-fix', '--strip-sigs', '--reverse']
|
|
mappings = downloadServerMappings.output
|
|
dependsOn(downloadServerMappings)
|
|
input = extractServer.output
|
|
output = file("build/createServerOfficial/output.jar")
|
|
}
|
|
tasks.named('genClientBinPatches').configure {
|
|
tool = BINPATCH_TOOL
|
|
cleanJar = createClientOfficial.output
|
|
dirtyJar = jar.archiveFile
|
|
}
|
|
tasks.named('genServerBinPatches').configure {
|
|
tool = BINPATCH_TOOL
|
|
cleanJar = createServerOfficial.output
|
|
dirtyJar = jar.archiveFile
|
|
}
|
|
tasks.named('genJoinedBinPatches').configure {
|
|
tool = BINPATCH_TOOL
|
|
cleanJar = createJoinedSRG.output
|
|
}
|
|
tasks.register('applyClientBinPatches', ApplyBinPatches) {
|
|
tool = BINPATCH_TOOL
|
|
clean = createClientOfficial.output
|
|
patch = genClientBinPatches.output
|
|
args.addAll(['--data', '--unpatched'])
|
|
}
|
|
tasks.register('applyServerBinPatches', ApplyBinPatches) {
|
|
tool = BINPATCH_TOOL
|
|
clean = createServerOfficial.output
|
|
patch = genServerBinPatches.output
|
|
args.addAll(['--data', '--unpatched'])
|
|
}
|
|
tasks.register('applyJoinedBinPatches', ApplyBinPatches) {
|
|
tool = BINPATCH_TOOL
|
|
clean = genJoinedBinPatches.cleanJar
|
|
patch = genJoinedBinPatches.output
|
|
}
|
|
tasks.register('createServerShimClasspath', BundleList) {
|
|
dependsOn(downloadServerRaw)
|
|
serverBundle = downloadServerRaw.dest
|
|
}
|
|
tasks.register('createServerShimConfig') {
|
|
ext.output = file('build/libs/bootstrap-shim.properties')
|
|
doLast {
|
|
var cfg = new CleanProperties()
|
|
cfg['Main-Class'] = 'net.minecraftforge.bootstrap.ForgeBootstrap'
|
|
cfg['Java-Version'] = '21'
|
|
cfg['Arguments'] = '--launchTarget forge_server'
|
|
cfg.store(output)
|
|
}
|
|
}
|
|
tasks.register('serverShimJar', Jar) {
|
|
dependsOn(createServerShimConfig)
|
|
from (createServerShimConfig.output)
|
|
from (createServerShimClasspath.output) {
|
|
rename { 'bootstrap-shim.list' }
|
|
}
|
|
from (zipTree(downloadServerShim.output))
|
|
manifest {
|
|
from {
|
|
zipTree(downloadServerShim.output).find { it.name == 'MANIFEST.MF' }
|
|
}
|
|
|
|
attributes('Class-Path': configurations.bootstrap.resolvedConfiguration.resolvedArtifacts.collect { "libraries/${Util.getMavenInfoFromDep(it).path}" }.join(' '))
|
|
}
|
|
archiveClassifier = 'shim'
|
|
jarSigner.sign(it)
|
|
}
|
|
tasks.register('checkAll') {
|
|
dependsOn 'checkLicenses'
|
|
group = 'checks'
|
|
}
|
|
tasks.register('checkAllAndFix') {
|
|
dependsOn 'findFinalizeSpawnTargets', 'checkLicenses'
|
|
group = 'checks'
|
|
}
|
|
|
|
CheckTask.registerTask(tasks, 'ATs', CheckATs) {
|
|
dependsOn extractInheritance, createSrg2Mcp
|
|
ats.from patcher.accessTransformers
|
|
inheritance = extractInheritance.output
|
|
mappings = createSrg2Mcp.output
|
|
}
|
|
|
|
CheckTask.registerTask(tasks, 'SAS', CheckSAS) {
|
|
dependsOn extractInheritance
|
|
sass.from patcher.sideAnnotationStrippers
|
|
inheritance = extractInheritance.output
|
|
}
|
|
|
|
CheckTask.registerTask(tasks, 'Excs', CheckExcs) {
|
|
dependsOn jar
|
|
binary = jar.archiveFile.get().asFile
|
|
excs.from patcher.excs
|
|
}
|
|
|
|
CheckTask.registerTask(tasks, 'Patches', CheckPatches) {
|
|
dependsOn 'genPatches'
|
|
patchDir = file("$rootDir/patches")
|
|
patchesWithS2SArtifact = [
|
|
'minecraft/net/minecraft/client/renderer/ViewArea.java.patch',
|
|
'minecraft/net/minecraft/data/models/blockstates/Variant.java.patch',
|
|
]
|
|
}
|
|
|
|
tasks.named('genPatches', GeneratePatches).configure {
|
|
finalizedBy checkAndFixPatches
|
|
autoHeader true
|
|
lineEnding = '\n'
|
|
}
|
|
|
|
def baseForgeVersionProperty = project.objects.property(String)
|
|
baseForgeVersionProperty.set(project.provider { TeamcityRequests.attemptFindBase(rootDir) ?: getLatestForgeVersion(MC_VERSION) })
|
|
baseForgeVersionProperty.finalizeValueOnRead()
|
|
final jarCompatibilityTaskSetup = { Task task ->
|
|
task.group = 'jar compatibility'
|
|
task.onlyIf {
|
|
baseForgeVersionProperty.getOrNull() !== null
|
|
}
|
|
}
|
|
|
|
tasks.register('setupCheckJarCompatibility', SetupCheckJarCompatibility) {
|
|
inputVersion = baseForgeVersionProperty
|
|
}
|
|
|
|
tasks.register('applyBaseCompatibilityJarBinPatches', ApplyBinPatches) {
|
|
jarCompatibilityTaskSetup(it)
|
|
|
|
clean = project.tasks.createJoinedSRG.output
|
|
patch = project.tasks.named('setupCheckJarCompatibility').flatMap { it.baseBinPatchesOutput }
|
|
output = project.layout.buildDirectory.dir(name).map { it.file('output.jar') }
|
|
}
|
|
|
|
tasks.register('mergeBaseForgeJar', MergeJars) {
|
|
jarCompatibilityTaskSetup(it)
|
|
|
|
inputJars.from(project.tasks.named('applyBaseCompatibilityJarBinPatches').flatMap { it.output })
|
|
inputJars.from(baseForgeVersionProperty.map { inputVersion ->
|
|
def output = project.layout.buildDirectory.dir(name).map { it.file("forge-${inputVersion}-universal.jar") }.get().asFile
|
|
project.rootProject.extensions.download.run {
|
|
src "https://maven.minecraftforge.net/net/minecraftforge/forge/${inputVersion}/forge-${inputVersion}-universal.jar"
|
|
dest output
|
|
}
|
|
return output
|
|
})
|
|
}
|
|
|
|
tasks.register('checkJarCompatibility', CheckJarCompatibility) {
|
|
jarCompatibilityTaskSetup(it)
|
|
dependsOn 'setupCheckJarCompatibility'
|
|
|
|
baseJar = project.tasks.named('mergeBaseForgeJar').flatMap { it.output }
|
|
baseLibraries.from(project.tasks.named('createJoinedSRG').flatMap { it.output })
|
|
|
|
inputJar = project.tasks.named('reobfJar').flatMap { it.output }
|
|
|
|
commonLibraries.from(project.configurations.minecraftImplementation)
|
|
commonLibraries.from(project.configurations.installer)
|
|
}
|
|
|
|
tasks.register('launcherJson', LauncherJson).configure {
|
|
json.putAll([
|
|
mainClass: 'net.minecraftforge.bootstrap.ForgeBootstrap',
|
|
arguments: [
|
|
game: [
|
|
'--launchTarget', 'forge_client'
|
|
],
|
|
jvm: [
|
|
'-Djava.net.preferIPv6Addresses=system'
|
|
]
|
|
]
|
|
] as LinkedHashMap)
|
|
}
|
|
|
|
tasks.register('installerJson', InstallerJson) {
|
|
icon = rootProject.file('icon.ico')
|
|
|
|
// Json to install into the client's launcher
|
|
dependsOn(launcherJson)
|
|
input.from(launcherJson.output)
|
|
|
|
// Download Official Mappings
|
|
dependsOn(downloadClientMappings, downloadServerMappings)
|
|
input.from(downloadClientMappings.output, downloadServerMappings.output)
|
|
// Get 'base' MC jar, Client is straight download, server is extracted from the bundle
|
|
dependsOn(downloadClientRaw, extractServer)
|
|
input.from(downloadClientRaw.dest, extractServer.output)
|
|
// Rename MC Jar
|
|
dependsOn(createClientOfficial, createServerOfficial)
|
|
input.from(createClientOfficial.output, createServerOfficial.output)
|
|
// Apply Binary patches to vanilla jar
|
|
dependsOn(applyClientBinPatches, applyServerBinPatches)
|
|
input.from(applyClientBinPatches.output, applyServerBinPatches.output, genClientBinPatches.toolJar)
|
|
|
|
doFirst {
|
|
var libs = libraries
|
|
String[] INSTALLER_TOOLS_CLASSPATH = getClasspath(project, libs, INSTALLER_TOOLS)
|
|
json.putAll([
|
|
_comment: launcherJson.json._comment,
|
|
hideExtract: true,
|
|
spec: 1,
|
|
profile: project.name,
|
|
version: launcherJson.json.id,
|
|
path: Util.getMavenInfoFromTask(tasks.serverShimJar).name,
|
|
minecraft: MC_VERSION,
|
|
serverJarPath: '{LIBRARY_DIR}/net/minecraft/server/{MINECRAFT_VERSION}/server-{MINECRAFT_VERSION}-bundled.jar',
|
|
data: [
|
|
MOJMAPS: [
|
|
client: "[net.minecraft:client:${MC_VERSION}:mappings@tsrg]",
|
|
server: "[net.minecraft:server:${MC_VERSION}:mappings@tsrg]"
|
|
],
|
|
MOJMAPS_SHA: [
|
|
client: "'${downloadClientMappings.output.sha1}'",
|
|
server: "'${downloadServerMappings.output.sha1}'"
|
|
],
|
|
MC_UNPACKED: [
|
|
client: "[net.minecraft:client:${MC_VERSION}]",
|
|
server: "[net.minecraft:server:${MC_VERSION}:unpacked]"
|
|
],
|
|
MC_UNPACKED_SHA: [
|
|
client: "'${downloadClientRaw.dest.sha1}'",
|
|
server: "'${extractServer.output.get().asFile.sha1}'"
|
|
],
|
|
MC_OFF: [
|
|
client: "[net.minecraft:client:${MC_VERSION}:official]",
|
|
server: "[net.minecraft:server:${MC_VERSION}:official]"
|
|
],
|
|
MC_OFF_SHA: [
|
|
client: "'${createClientOfficial.output.get().asFile.sha1}'",
|
|
server: "'${createServerOfficial.output.get().asFile.sha1}'"
|
|
],
|
|
BINPATCH: [
|
|
client: '/data/client.lzma',
|
|
server: '/data/server.lzma'
|
|
],
|
|
PATCHED: [
|
|
client: "[${project.group}:${project.name}:${project.version}:client]",
|
|
server: "[${project.group}:${project.name}:${project.version}:server]"
|
|
],
|
|
PATCHED_SHA: [
|
|
client: "'${applyClientBinPatches.output.get().asFile.sha1}'",
|
|
server: "'${applyServerBinPatches.output.get().asFile.sha1}'"
|
|
]
|
|
],
|
|
processors: [
|
|
[
|
|
sides: ['server'],
|
|
jar: INSTALLER_TOOLS,
|
|
classpath: INSTALLER_TOOLS_CLASSPATH,
|
|
args: [
|
|
'--task', 'EXTRACT_FILES',
|
|
'--archive', '{INSTALLER}',
|
|
|
|
'--from', 'data/README.txt',
|
|
'--to', '{ROOT}/README.txt',
|
|
|
|
'--from', 'data/run.sh',
|
|
'--to', '{ROOT}/run.sh',
|
|
'--exec', '{ROOT}/run.sh',
|
|
|
|
'--from', 'data/run.bat',
|
|
'--to', '{ROOT}/run.bat',
|
|
|
|
'--from', 'data/user_jvm_args.txt',
|
|
'--to', '{ROOT}/user_jvm_args.txt',
|
|
'--optional', '{ROOT}/user_jvm_args.txt',
|
|
|
|
'--from', 'data/unix_args.txt',
|
|
'--to', "{ROOT}/libraries/${MAVEN_PATH}/unix_args.txt",
|
|
|
|
'--from', 'data/win_args.txt',
|
|
'--to', "{ROOT}/libraries/${MAVEN_PATH}/win_args.txt"
|
|
]
|
|
], [
|
|
sides: ['server'],
|
|
jar: INSTALLER_TOOLS,
|
|
classpath: INSTALLER_TOOLS_CLASSPATH,
|
|
args: [
|
|
'--task', 'BUNDLER_EXTRACT',
|
|
'--input', '{MINECRAFT_JAR}',
|
|
'--output', '{ROOT}/libraries/',
|
|
'--libraries'
|
|
]
|
|
], [
|
|
sides: ['server'],
|
|
jar: INSTALLER_TOOLS,
|
|
classpath: INSTALLER_TOOLS_CLASSPATH,
|
|
args: [
|
|
'--task', 'BUNDLER_EXTRACT',
|
|
'--input', '{MINECRAFT_JAR}',
|
|
'--output', '{MC_UNPACKED}',
|
|
'--jar-only'
|
|
],
|
|
outputs: [
|
|
'{MC_UNPACKED}': '{MC_UNPACKED_SHA}'
|
|
]
|
|
], [
|
|
jar: INSTALLER_TOOLS,
|
|
classpath: INSTALLER_TOOLS_CLASSPATH,
|
|
args: [
|
|
'--task', 'DOWNLOAD_MOJMAPS',
|
|
'--sanitize',
|
|
'--version', MC_VERSION,
|
|
'--side', '{SIDE}',
|
|
'--output', '{MOJMAPS}'
|
|
],
|
|
outputs: [
|
|
'{MOJMAPS}': '{MOJMAPS_SHA}'
|
|
]
|
|
], [
|
|
sides: ['server'],
|
|
jar: FART,
|
|
classpath: getClasspath(project, libs, FART),
|
|
args: [
|
|
'--input', '{MC_UNPACKED}',
|
|
'--output', '{MC_OFF}',
|
|
'--names', '{MOJMAPS}',
|
|
'--ann-fix', '--ids-fix', '--src-fix', '--record-fix', '--strip-sigs', '--reverse'
|
|
],
|
|
outputs: [
|
|
'{MC_OFF}': '{MC_OFF_SHA}'
|
|
]
|
|
], [
|
|
sides: ['client'],
|
|
jar: FART,
|
|
classpath: getClasspath(project, libs, FART),
|
|
args: [
|
|
'--input', '{MINECRAFT_JAR}',
|
|
'--output', '{MC_OFF}',
|
|
'--names', '{MOJMAPS}',
|
|
'--ann-fix', '--ids-fix', '--src-fix', '--record-fix', '--strip-sigs', '--reverse'
|
|
],
|
|
outputs: [
|
|
'{MC_OFF}': '{MC_OFF_SHA}'
|
|
]
|
|
], [
|
|
jar: BINPATCH_TOOL.rsplit(':', 1)[0], // remove :fatjar
|
|
classpath: getClasspath(project, libs, BINPATCH_TOOL.rsplit(':', 1)[0]),
|
|
args: [
|
|
'--clean', '{MC_OFF}',
|
|
'--output', '{PATCHED}',
|
|
'--apply', '{BINPATCH}',
|
|
'--data', '--unpatched'
|
|
],
|
|
outputs: [
|
|
'{PATCHED}': '{PATCHED_SHA}'
|
|
]
|
|
]
|
|
]
|
|
] as LinkedHashMap)
|
|
getClasspath(project, libs, MCP_ARTIFACT.descriptor) //Tell it to download mcp_config
|
|
}
|
|
}
|
|
|
|
tasks.register('officialClassesOnly', Zip).configure {
|
|
dependsOn(jar)
|
|
destinationDirectory = file('build/libs')
|
|
archiveClassifier = 'official-classes'
|
|
from zipTree(jar.archiveFile).matching {
|
|
include '**/*.class'
|
|
exclude 'mcp/**'
|
|
}
|
|
}
|
|
|
|
tasks.named('filterJarNew').configure {
|
|
dependsOn('officialClassesOnly')
|
|
input = officialClassesOnly.archiveFile
|
|
}
|
|
|
|
tasks.register('filterJarNewSRG', FilterNewJar).configure {
|
|
input = reobfJar.output
|
|
srg = filterJarNew.srg
|
|
blacklist = filterJarNew.blacklist
|
|
}
|
|
|
|
tasks.named('universalJar').configure {
|
|
dependsOn downloadCrowdin
|
|
from zipTree(downloadCrowdin.dest).matching {
|
|
include 'assets/forge/lang/*.json'
|
|
}
|
|
|
|
from(EXTRA_TXTS)
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
exclude '.cache'
|
|
|
|
manifest {
|
|
attributes([
|
|
'Automatic-Module-Name': 'net.minecraftforge.forge'
|
|
] as LinkedHashMap)
|
|
attributes([
|
|
'Specification-Title': 'Forge',
|
|
'Specification-Vendor': 'Forge Development LLC',
|
|
'Specification-Version': SPEC_VERSION,
|
|
'Implementation-Title': project.group,
|
|
'Implementation-Vendor': 'Forge Development LLC',
|
|
'Implementation-Version': FORGE_VERSION
|
|
] as LinkedHashMap, 'net/minecraftforge/versions/forge/')
|
|
attributes([
|
|
'Specification-Title': 'Minecraft',
|
|
'Specification-Vendor': 'Forge Development LLC',
|
|
'Specification-Version': MC_VERSION,
|
|
'Implementation-Title': 'MCP',
|
|
'Implementation-Vendor': 'Forge Development LLC',
|
|
'Implementation-Version': MCP_VERSION
|
|
] as LinkedHashMap, 'net/minecraftforge/versions/mcp/')
|
|
}
|
|
jarSigner.sign(it)
|
|
}
|
|
|
|
tasks.register('universalJarSrg', Jar).configure {
|
|
from zipTree(filterJarNewSRG.output)
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
from zipTree(universalJar.archiveFile)
|
|
destinationDirectory = file('build/libs')
|
|
archiveClassifier = 'universal-srg'
|
|
manifest.from(universalJar.manifest)
|
|
jarSigner.sign(it)
|
|
}
|
|
|
|
tasks.named('userdevConfig').configure {
|
|
universal = "$project.group:$project.name:$project.version:universal-srg@jar"
|
|
}
|
|
|
|
tasks.register('installerJar', InstallerJar) {
|
|
fat = !System.env.TEAMCITY_VERSION
|
|
//offline = true
|
|
from(EXTRA_TXTS)
|
|
from(rootProject.file('/forge_installer_logo.png')) {
|
|
rename { 'big_logo.png' }
|
|
}
|
|
from(genClientBinPatches.output) {
|
|
rename { 'data/client.lzma' }
|
|
}
|
|
from(genServerBinPatches.output) {
|
|
rename { 'data/server.lzma' }
|
|
}
|
|
|
|
final var argsFile = rootProject.file('server_files/args.txt')
|
|
final Map<String, Map<String, String>> tokens = [tokens: [
|
|
SHIM_JAR_FILE: serverShimJar.archiveFileName.get(),
|
|
MAVEN_PATH: MAVEN_PATH
|
|
]]
|
|
from(argsFile) {
|
|
filter(tokens, ReplaceTokens)
|
|
into 'data'
|
|
rename { 'unix_args.txt' }
|
|
}
|
|
from(argsFile) {
|
|
filter(tokens, ReplaceTokens)
|
|
into 'data'
|
|
rename { 'win_args.txt' }
|
|
}
|
|
|
|
from(rootProject.file('server_files')) {
|
|
filter(tokens, ReplaceTokens)
|
|
into 'data'
|
|
exclude 'args.txt'
|
|
}
|
|
|
|
jarSigner.sign(it)
|
|
}
|
|
|
|
final mdkGradleWrapper = tasks.register('mdkGradleWrapper', Wrapper) {
|
|
gradleVersion = '9.3.1'
|
|
}
|
|
|
|
tasks.register('mdkZip', Zip) {
|
|
dependsOn mdkGradleWrapper
|
|
|
|
archiveBaseName = project.name
|
|
archiveClassifier = 'mdk'
|
|
archiveVersion = project.version
|
|
destinationDirectory = file('build/libs')
|
|
|
|
from mdkGradleWrapper.map(Wrapper.&getScriptFile)
|
|
from mdkGradleWrapper.map(Wrapper.&getBatchScript)
|
|
from(EXTRA_TXTS)
|
|
into('gradle/wrapper/') {
|
|
from mdkGradleWrapper.map(Wrapper.&getJarFile)
|
|
from mdkGradleWrapper.map(Wrapper.&getPropertiesFile)
|
|
}
|
|
from(rootProject.file('mdk/')){
|
|
rootProject.file('mdk/gitignore.txt').eachLine {
|
|
if (!it.trim().isEmpty() && !it.trim().startsWith('#'))
|
|
exclude it
|
|
}
|
|
|
|
filter(ReplaceTokens, tokens: [
|
|
FORGE_VERSION: FORGE_VERSION,
|
|
FORGE_GROUP: project.group,
|
|
FORGE_NAME: project.name,
|
|
MC_VERSION: MC_VERSION,
|
|
MAPPING_CHANNEL: MAPPING_CHANNEL,
|
|
MAPPING_VERSION: MAPPING_VERSION,
|
|
FORGE_SPEC_VERSION: SPEC_VERSION.split("\\.")[0],
|
|
MC_NEXT_VERSION: MC_NEXT_VERSION,
|
|
EVENTBUS_VERSION: libs.versions.eventbus.get()
|
|
])
|
|
rename 'gitignore\\.txt', '.gitignore'
|
|
rename 'gitattributes\\.txt', '.gitattributes'
|
|
}
|
|
from(rootProject.file('src/test/java/com/example/examplemod/')) {
|
|
into('src/main/java/com/example/examplemod/')
|
|
}
|
|
from(rootProject.file('src/test/generated/mdk_datagen/')) {
|
|
into('src/main/resources/')
|
|
exclude '**/.cache/'
|
|
}
|
|
}
|
|
|
|
license {
|
|
header = file("$rootDir/LICENSE-header.txt")
|
|
|
|
include 'net/minecraftforge/'
|
|
exclude 'net/minecraftforge/common/LenientUnboundedMapCodec.java'
|
|
|
|
tasks {
|
|
main {
|
|
files.from files("$rootDir/src/main/java")
|
|
}
|
|
test {
|
|
files.from files("$rootDir/src/test/java")
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register('genAllData') {
|
|
dependsOn 'forge_data', 'forge_test_data'
|
|
}
|
|
|
|
if (project.hasProperty('UPDATE_MAPPINGS')) {
|
|
extractRangeMap {
|
|
sources.from sourceSets.test.java.srcDirs
|
|
addDependencies compileTestJava.classpath
|
|
}
|
|
applyRangeMap {
|
|
sources.from sourceSets.test.java.srcDirs
|
|
}
|
|
sourceSets.test.java.srcDirs.each { extractMappedNew.addTarget it }
|
|
}
|
|
|
|
tasks.named('javadoc', Javadoc).configure {
|
|
description 'Generates the combined javadocs for the FML projects and the main Forge project'
|
|
var includedProjects = [ ':fmlcore', ':fmlloader', ':javafmllanguage', ':mclanguage', ':forge-transformers' ]
|
|
source includedProjects.collect { project(it).sourceSets.main.allJava }
|
|
classpath = classpath + files(includedProjects.collect { project(it).sourceSets.main.compileClasspath })
|
|
|
|
var docsDir = rootProject.file('src/docs/')
|
|
inputs.dir(docsDir)
|
|
.withPropertyName('docs resources directory')
|
|
.withPathSensitivity(PathSensitivity.RELATIVE)
|
|
.optional()
|
|
|
|
failOnError = false
|
|
|
|
// Exclude the Minecraft classes if not enabled
|
|
if (!project.hasProperty('generateAllDocumentation')) {
|
|
exclude 'net/minecraft/**'
|
|
exclude 'com/mojang/**'
|
|
}
|
|
exclude 'mcp/**'
|
|
|
|
options.addStringOption('Xdoclint:all,-missing', '-public')
|
|
options {
|
|
stylesheetFile = new File(docsDir, 'stylesheet.css')
|
|
|
|
tags = [
|
|
'apiNote:a:<em>API Note:</em>',
|
|
'implSpec:a:<em>Implementation Requirements:</em>',
|
|
'implNote:a:<em>Implementation Note:</em>'
|
|
]
|
|
|
|
groups = [
|
|
'Forge Mod Loader': [
|
|
'net.minecraftforge.fml.common.asm*',
|
|
'net.minecraftforge.fml.loading*',
|
|
'net.minecraftforge.fml.server*'
|
|
],
|
|
'FML Core': [
|
|
'net.minecraftforge.fml',
|
|
'net.minecraftforge.fml.config*',
|
|
'net.minecraftforge.fml.event*',
|
|
'net.minecraftforge.fml.util*'
|
|
],
|
|
'FML Common': [
|
|
'net.minecraftforge.fml.core',
|
|
'net.minecraftforge.fml.event.config',
|
|
'net.minecraftforge.fml.event.lifecycle'
|
|
],
|
|
'FML Java/MC Language Providers': [
|
|
'net.minecraftforge.fml.common',
|
|
'net.minecraftforge.fml.javafmlmod',
|
|
'net.minecraftforge.fml.mclanguageprovider'
|
|
],
|
|
'Minecraft Forge API': [
|
|
'net.minecraftforge*'
|
|
]
|
|
]
|
|
|
|
author = false
|
|
noSince = true
|
|
noHelp = true
|
|
|
|
bottom = "Minecraft Forge is an open source modding API for Minecraft: Java Edition, licensed under the Lesser GNU General Public License, version 2.1."
|
|
windowTitle = "Minecraft Forge API ${VERSION}"
|
|
docTitle = "Minecraft Forge API - ${FORGE_VERSION} for Minecraft ${MC_VERSION}"
|
|
header = "<div style=\"margin-top: 9px;padding: 5px 6px;\"><strong>${FORGE_VERSION} for Minecraft ${MC_VERSION}</strong></div>"
|
|
}
|
|
|
|
doLast {
|
|
project.copy {
|
|
from docsDir
|
|
exclude '/stylesheet.css'
|
|
into destinationDir
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications.register('mavenJava', MavenPublication).configure {
|
|
artifact universalJar
|
|
artifact universalJarSrg
|
|
artifact installerJar
|
|
artifact mdkZip
|
|
artifact userdevJar
|
|
artifact sourcesJar
|
|
artifact serverShimJar
|
|
|
|
artifactId = project.name
|
|
pom {
|
|
name = project.name
|
|
description = 'Modifactions to Minecraft to enable mod developers.'
|
|
url = 'https://github.com/MinecraftForge/MinecraftForge'
|
|
gradleutils.pom.setGitHubDetails(pom, 'MinecraftForge')
|
|
license gradleutils.pom.Licenses.LGPLv2_1
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven gradleutils.publishingForgeMaven
|
|
}
|
|
}
|
|
|
|
// Make sure we run bin compat checking during local testing.
|
|
if ((!System.env.MAVEN_USER || !System.env.MAVEN_PASSWORD) && CHECK_COMPATIBILITY == "true")
|
|
tasks.named('publish').configure { dependsOn(':forge:checkJarCompatibility') }
|