Klooni1010/desktop/build.gradle

41 lines
1 KiB
Groovy
Raw Permalink Normal View History

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/"]
sourceSets.main.resources.srcDirs = ["../android/assets"]
2017-01-22 14:34:45 +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
}
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
task dist(type: Jar) {
2017-01-22 14:34:45 +00:00
manifest {
attributes 'Main-Class': project.mainClassName
}
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
eclipse.project.name = appName + "-desktop"