plugins { id 'org.javamodularity.moduleplugin' version '1.8.7' apply false id 'org.cadixdev.licenser' id 'java-library' id 'jacoco' } 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.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") } test { useJUnitPlatform() } jar { manifest { attributes([ 'Specification-Title': 'FMLEarlyDisplay', 'Specification-Vendor': 'Forge Development LLC', 'Specification-Version': '1', 'Implementation-Title': 'FML Early Display', 'Implementation-Version': '1.0', 'Implementation-Vendor': 'Forge' ] as LinkedHashMap, 'net/minecraftforge/fml/earlydisplay/') } } tasks.withType(JavaCompile) { options.compilerArgs << '-Xlint:unchecked' } license { header = rootProject.file('LICENSE-header.txt') include 'net/minecraftforge/' } publishing.publications.mavenJava(MavenPublication) { from components.java }