102 lines
2.9 KiB
Plaintext
102 lines
2.9 KiB
Plaintext
|
|
import org.gradle.internal.jvm.Jvm
|
|
|
|
plugins {
|
|
kotlin("jvm") version "1.6.10"
|
|
java
|
|
application
|
|
}
|
|
|
|
group = "ru.dbotthepony"
|
|
version = "0.1-SNAPSHOT"
|
|
|
|
val lwjglVersion = "3.3.0"
|
|
val lwjglNatives = "natives-windows"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
maven {
|
|
url = uri("https://maven.dbotthepony.ru/")
|
|
}
|
|
}
|
|
|
|
application {
|
|
mainClass.set("ru.dbotthepony.kstarbound.MainKt")
|
|
}
|
|
|
|
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
|
|
|
tasks.compileKotlin {
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.10")
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.10")
|
|
|
|
implementation("org.apache.logging.log4j:log4j-api:2.17.1")
|
|
implementation("org.apache.logging.log4j:log4j-core:2.17.1")
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
|
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
|
|
|
|
implementation("com.google.code.gson:gson:2.8.9")
|
|
|
|
implementation("it.unimi.dsi:fastutil:8.5.6")
|
|
|
|
implementation("com.google.guava:guava:31.0.1-jre")
|
|
|
|
implementation(platform("org.lwjgl:lwjgl-bom:$lwjglVersion"))
|
|
|
|
implementation("org.lwjgl", "lwjgl")
|
|
implementation("org.lwjgl", "lwjgl-assimp")
|
|
implementation("org.lwjgl", "lwjgl-bgfx")
|
|
implementation("org.lwjgl", "lwjgl-glfw")
|
|
implementation("org.lwjgl", "lwjgl-nanovg")
|
|
implementation("org.lwjgl", "lwjgl-nuklear")
|
|
implementation("org.lwjgl", "lwjgl-openal")
|
|
implementation("org.lwjgl", "lwjgl-opengl")
|
|
implementation("org.lwjgl", "lwjgl-opus")
|
|
implementation("org.lwjgl", "lwjgl-par")
|
|
implementation("org.lwjgl", "lwjgl-stb")
|
|
implementation("org.lwjgl", "lwjgl-vulkan")
|
|
|
|
runtimeOnly("org.lwjgl", "lwjgl", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-assimp", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-bgfx", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-glfw", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-nanovg", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-nuklear", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-openal", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-opengl", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-opus", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-par", classifier = lwjglNatives)
|
|
runtimeOnly("org.lwjgl", "lwjgl-stb", classifier = lwjglNatives)
|
|
|
|
implementation("net.java.dev.jna:jna:5.10.0")
|
|
|
|
implementation("ru.dbotthepony:kbox2d:2.4.1.+")
|
|
implementation("ru.dbotthepony:kvector:1.3.2")
|
|
}
|
|
|
|
tasks.getByName<Test>("test") {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
tasks {
|
|
create("buildlua", type = Exec::class.java) {
|
|
commandLine(
|
|
"clang", "lua_glue.c",
|
|
"-I", "${Jvm.current().javaHome}/include",
|
|
"-I", "${Jvm.current().javaHome}/include/win32",
|
|
"-I", "${Jvm.current().javaHome}/include/win32/bridge",
|
|
"-o", "lua_glue.dll", "-shared", "lua54.lib"
|
|
)
|
|
}
|
|
}
|
|
|