import org.gradle.internal.os.OperatingSystem plugins { id "me.filippov.gradle.jvm.wrapper" version "0.9.3" } jvmWrapper { linuxJvmUrl = "https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.tar.gz" macJvmUrl = "https://corretto.aws/downloads/latest/amazon-corretto-11-x64-macos-jdk.tar.gz" windowsJvmUrl = "https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.zip" } wrapper { distributionType = Wrapper.DistributionType.ALL } project.ext.versionYear = 20 project.ext.versionMajor = 2 project.ext.versionMinor = 0 project.ext.versionPatch = 0 project.ext.isPrerelease = true project.ext.prereleaseName = "alpha" project.ext.prerealeaseUpdate = 3 subprojects { apply plugin: 'java' apply plugin: 'maven-publish' project.ext.lwjglVersion = "3.2.3" project.ext.jomlVersion = "1.9.25" project.ext.steamworks4jVersion = "1.8.0" project.ext.steamworks4jServerVersion = "1.8.0" group = "cz.tefek" version = isPrerelease ? "${versionYear}.${versionMajor}.${versionMinor}.${versionPatch}-${prereleaseName}.${prerealeaseUpdate}" : "${versionYear}.${versionMajor}.${versionMinor}.${versionPatch}" tasks.withType(JavaCompile) { options.encoding = "UTF-8" } java { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } task sourcesJar(type: Jar, dependsOn: classes) { from sourceSets.main.allJava } publishing { publications { maven(MavenPublication) { from components.java artifact sourcesJar { classifier "sources" } } } } 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 } repositories { mavenCentral() } }