mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
107 lines
2.8 KiB
Groovy
107 lines
2.8 KiB
Groovy
import net.minecraftforge.gradleutils.PomUtils
|
|
|
|
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'net.minecraftforge.licenser'
|
|
id 'net.minecraftforge.gradleutils'
|
|
}
|
|
|
|
apply from: rootProject.file('build_shared.gradle')
|
|
|
|
configurations.forEach{ it.transitive = false }
|
|
|
|
dependencies {
|
|
compileOnly(libs.nulls)
|
|
|
|
api(libs.bundles.asm) // Needed by all the black magic
|
|
api(libs.forgespi)
|
|
api(libs.mergetool.api)
|
|
api(libs.log4j.api)
|
|
api(libs.slf4j.api)
|
|
api(libs.guava)
|
|
api(libs.gson)
|
|
api(libs.maven.artifact)
|
|
api(libs.apache.commons)
|
|
api(libs.bundles.night.config)
|
|
api(libs.modlauncher)
|
|
api(libs.coremods)
|
|
api(libs.mojang.logging)
|
|
api(libs.jarjar.selector)
|
|
api(libs.jarjar.meta)
|
|
|
|
implementation(libs.jopt.simple)
|
|
implementation(libs.securemodules)
|
|
implementation(libs.accesstransformers)
|
|
implementation(libs.terminalconsoleappender)
|
|
implementation(libs.jimfs)
|
|
|
|
implementation(libs.log4j.core)
|
|
annotationProcessor(libs.log4j.core)
|
|
|
|
testCompileOnly(libs.nulls)
|
|
testRuntimeOnly(libs.bootstrap)
|
|
}
|
|
|
|
java {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(JAVA_VERSION)
|
|
withSourcesJar()
|
|
}
|
|
|
|
tasks.named('jar', Jar).configure {
|
|
manifest {
|
|
attributes([
|
|
'Automatic-Module-Name': 'net.minecraftforge.fmlloader',
|
|
'Forge-Module-Layer': 'boot'
|
|
] as LinkedHashMap)
|
|
attributes([
|
|
'Specification-Title': 'FMLLoader',
|
|
'Specification-Vendor': 'Forge Development LLC',
|
|
'Specification-Version': '1',
|
|
'Implementation-Title': 'FMLLoader',
|
|
'Implementation-Vendor': 'Forge Development LLC',
|
|
'Implementation-Version': FORGE_VERSION
|
|
] as LinkedHashMap, 'net/minecraftforge/fml/loading/')
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.compilerArgs << '-Xlint:unchecked'
|
|
}
|
|
|
|
license {
|
|
header = rootProject.file('LICENSE-header.txt')
|
|
}
|
|
|
|
publishing {
|
|
publications.register('mavenJava', MavenPublication).configure {
|
|
from components.java
|
|
artifactId = 'fmlloader'
|
|
pom {
|
|
name = project.name
|
|
description = 'Modifactions to Minecraft to enable mod developers.'
|
|
url = 'https://github.com/MinecraftForge/MinecraftForge'
|
|
PomUtils.setGitHubDetails(pom, 'MinecraftForge')
|
|
license PomUtils.Licenses.LGPLv2_1
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven gradleutils.publishingForgeMaven
|
|
}
|
|
}
|
|
|
|
tasks.register('writeForgeVersionJson') {
|
|
doLast {
|
|
file('src/main/resources/forge_version.json').json = [
|
|
forge: FORGE_VERSION,
|
|
mc: MC_VERSION,
|
|
mcp: MCP_VERSION
|
|
]
|
|
}
|
|
}
|
|
|
|
tasks.named('generateResources').configure {
|
|
dependsOn('writeForgeVersionJson')
|
|
}
|