2017-01-22 14:34:45 +00:00
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
sourceCompatibility = 1.6
|
2019-09-05 14:48:14 +00:00
|
|
|
sourceSets.main.java.srcDirs = ["src/"]
|
2020-03-29 12:46:19 +00:00
|
|
|
sourceSets.main.resources.srcDirs = ["../android/assets"]
|
2017-01-22 14:34:45 +00:00
|
|
|
|
2019-09-05 14:16:13 +00:00
|
|
|
project.ext.mainClassName = "dev.lonami.klooni.desktop.DesktopLauncher"
|
2019-09-05 14:44:07 +00:00
|
|
|
project.ext.assetsDir = new File("../android/assets")
|
2017-01-22 14:34:45 +00:00
|
|
|
|
|
|
|
task run(dependsOn: classes, type: JavaExec) {
|
|
|
|
main = project.mainClassName
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
|
|
standardInput = System.in
|
|
|
|
workingDir = project.assetsDir
|
|
|
|
ignoreExitValue = true
|
|
|
|
}
|
|
|
|
|
2020-03-29 12:46:19 +00:00
|
|
|
task debug(dependsOn: classes, type: JavaExec) {
|
|
|
|
main = project.mainClassName
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
|
|
standardInput = System.in
|
|
|
|
workingDir = project.assetsDir
|
|
|
|
ignoreExitValue = true
|
|
|
|
debug = true
|
|
|
|
}
|
2019-09-05 14:48:14 +00:00
|
|
|
|
2020-03-29 12:46:19 +00:00
|
|
|
task dist(type: Jar) {
|
2017-01-22 14:34:45 +00:00
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class': project.mainClassName
|
|
|
|
}
|
2020-03-29 12:46:19 +00:00
|
|
|
dependsOn configurations.runtimeClasspath
|
|
|
|
from {
|
|
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
|
|
}
|
|
|
|
with jar
|
2017-01-22 14:34:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dist.dependsOn classes
|
|
|
|
|
2020-03-29 12:46:19 +00:00
|
|
|
eclipse.project.name = appName + "-desktop"
|