DEADSOFTWARE

Add my repo for automultibind
[cavedroid.git] / desktop / build.gradle
1 plugins {
2 id 'java-library'
3 id 'kotlin'
4 id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlinVersion"
5 }
7 java.targetCompatibility = JavaVersion.VERSION_17
8 java.sourceCompatibility = JavaVersion.VERSION_1_8
10 sourceSets.main.java.srcDirs = ["src/"]
11 sourceSets.main.resources.srcDirs = ["../android/assets"]
13 project.ext.mainClassName = "ru.deadsoftware.cavedroid.desktop.DesktopLauncher"
14 project.ext.assetsDir = new File("../android/assets")
16 task run(dependsOn: build, type: JavaExec) {
17 main = project.mainClassName
18 classpath = sourceSets.main.runtimeClasspath
19 standardInput = System.in
20 workingDir = project.assetsDir
21 ignoreExitValue = true as JavaExecSpec
22 args "--debug"
23 }
25 task runTouch(dependsOn: build, type: JavaExec) {
26 main = project.mainClassName
27 classpath = sourceSets.main.runtimeClasspath
28 standardInput = System.in
29 workingDir = project.assetsDir
30 ignoreExitValue = true as JavaExecSpec
31 args "--touch", "--debug"
32 }
34 task dist(dependsOn: build, type: Jar) {
35 duplicatesStrategy = DuplicatesStrategy.EXCLUDE
36 manifest {
37 attributes 'Main-Class': project.mainClassName
38 }
39 from {
40 configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
41 }
42 with jar
43 }
45 dependencies {
46 implementation project(":core")
47 implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion"
48 api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
49 api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
50 }