You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.5 KiB
Groovy

import org.gradle.internal.os.OperatingSystem
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
id 'java'
id 'application'
}
group 'me.eater.threedom'
version '1.0-SNAPSHOT'
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()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation platform("org.lwjgl:lwjgl-bom:3.2.3")
implementation project(":threedom")
implementation project(":threedom-gl")
implementation "org.lwjgl:lwjgl"
implementation "org.lwjgl:lwjgl-opengl"
implementation "org.lwjgl:lwjgl-glfw"
implementation 'org.joml:joml:1.9.24'
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives"
}
application {
mainClassName = 'me.eater.threedom.example.MainKt'
}
compileKotlin {
kotlinOptions.jvmTarget = "12"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "12"
}
java {
sourceCompatibility = JavaVersion.VERSION_12
targetCompatibility = JavaVersion.VERSION_12
}
run {
jvmArgs("-javaagent:$projectDir/../tools/lwjglx-debug-1.0.0.jar")
}