2020-09-02 19:44:09 +00:00
|
|
|
import org.gradle.internal.os.OperatingSystem
|
|
|
|
|
2020-09-17 18:52:35 +00:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2020-09-04 13:04:52 +00:00
|
|
|
wrapper {
|
|
|
|
distributionType = Wrapper.DistributionType.ALL
|
|
|
|
}
|
|
|
|
|
2020-09-09 22:46:19 +00:00
|
|
|
project.ext.versionYear = 20
|
|
|
|
project.ext.versionMajor = 2
|
|
|
|
project.ext.versionMinor = 0
|
|
|
|
project.ext.versionPatch = 0
|
|
|
|
|
|
|
|
project.ext.isPrerelease = true
|
|
|
|
project.ext.prereleaseName = "alpha"
|
2020-09-25 19:09:25 +00:00
|
|
|
project.ext.prerealeaseUpdate = 3
|
2020-09-09 22:46:19 +00:00
|
|
|
|
2020-09-17 18:52:35 +00:00
|
|
|
subprojects {
|
2020-09-02 19:44:09 +00:00
|
|
|
apply plugin: 'java'
|
2020-09-17 18:52:35 +00:00
|
|
|
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"
|
2020-09-02 19:44:09 +00:00
|
|
|
|
|
|
|
group = "cz.tefek"
|
2020-09-09 22:46:19 +00:00
|
|
|
version = isPrerelease ?
|
|
|
|
"${versionYear}.${versionMajor}.${versionMinor}.${versionPatch}-${prereleaseName}.${prerealeaseUpdate}"
|
|
|
|
:
|
|
|
|
"${versionYear}.${versionMajor}.${versionMinor}.${versionPatch}"
|
2020-09-04 12:59:14 +00:00
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
|
|
}
|
2020-09-02 19:44:09 +00:00
|
|
|
|
2020-09-18 12:50:51 +00:00
|
|
|
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
|
|
from sourceSets.main.allJava
|
|
|
|
}
|
|
|
|
|
2020-09-04 12:59:14 +00:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
from components.java
|
2020-09-18 12:50:51 +00:00
|
|
|
|
|
|
|
artifact sourcesJar {
|
|
|
|
classifier "sources"
|
|
|
|
}
|
2020-09-04 12:59:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-02 19:44:09 +00:00
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|