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') import org.gradle.internal.os.OperatingSystem switch (OperatingSystem.current()) { case OperatingSystem.LINUX: project.ext.lwjglNatives = "natives-linux" break case OperatingSystem.MAC_OS: project.ext.lwjglNatives = "natives-macos" break case OperatingSystem.WINDOWS: project.ext.lwjglNatives = "natives-windows" break } java { toolchain.languageVersion = JavaLanguageVersion.of(JAVA_VERSION) withSourcesJar() } dependencies { compileOnly(libs.nulls) implementation(project(':fmlloader')) implementation(project(':fmlcore')) implementation(libs.bundles.lwjgl) implementation('org.slf4j:slf4j-api:1.8.0-beta4') implementation(libs.jopt.simple) testImplementation('org.junit.jupiter:junit-jupiter-api:5.8.2') testImplementation('org.powermock:powermock-core:2.0.9') testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.8.2') testRuntimeOnly('org.slf4j:slf4j-jdk14:1.8.0-beta4') testRuntimeOnly("org.lwjgl:lwjgl::$lwjglNatives") testRuntimeOnly("org.lwjgl:lwjgl-glfw::$lwjglNatives") testRuntimeOnly("org.lwjgl:lwjgl-opengl::$lwjglNatives") testRuntimeOnly("org.lwjgl:lwjgl-stb::$lwjglNatives") } tasks.named('test', Test).configure { useJUnitPlatform() } tasks.named('jar', Jar).configure { manifest { attributes([ 'Automatic-Module-Name': 'net.minecraftforge.earlydisplay', 'Forge-Module-Layer': 'boot' ] as LinkedHashMap) attributes([ 'Specification-Title': 'FML Early Display', 'Specification-Vendor': 'Forge Development LLC', 'Specification-Version': '1', 'Implementation-Title': 'FML Early Display', 'Implementation-Vendor': 'Forge Development LLC', 'Implementation-Version': '1.0' ] as LinkedHashMap, 'net/minecraftforge/fml/earlydisplay/') } } 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 = 'fmlearlydisplay' pom { name = project.name description = 'A pretty looking, but prone to erroring screen displayed during Forge loading.' url = 'https://github.com/MinecraftForge/MinecraftForge' PomUtils.setGitHubDetails(pom, 'MinecraftForge') license PomUtils.Licenses.LGPLv2_1 } } repositories { maven gradleutils.publishingForgeMaven } }