2019-10-23 01:39:57 +00:00
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
2019-10-26 17:21:05 +00:00
|
|
|
sourceCompatibility = targetCompatibility = appJavaCompatibility
|
|
|
|
|
2019-10-27 22:50:44 +00:00
|
|
|
ext.mainClass = "com.shatteredpixel.shatteredpixeldungeon.desktop.DesktopLauncher"
|
2019-10-26 17:21:05 +00:00
|
|
|
sourceSets.main.resources.srcDirs = [new File(project(':core').projectDir, "/src/main/assets"),
|
|
|
|
new File(project(':desktop').projectDir,"/src/main/assets")]
|
2019-10-23 01:39:57 +00:00
|
|
|
|
2019-10-26 17:21:05 +00:00
|
|
|
task runDebug(dependsOn: classes, type: JavaExec) {
|
2019-10-23 01:39:57 +00:00
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
|
|
ignoreExitValue = true
|
2019-10-27 22:50:44 +00:00
|
|
|
|
|
|
|
main = mainClass
|
2019-10-28 04:34:24 +00:00
|
|
|
systemProperty 'Specification-Title', appName
|
2019-10-27 22:50:44 +00:00
|
|
|
systemProperty 'Specification-Version', appVersionName + "-INDEV"
|
|
|
|
systemProperty 'Implementation-Version', appVersionCode
|
2019-10-23 01:39:57 +00:00
|
|
|
}
|
|
|
|
|
2019-10-26 17:21:05 +00:00
|
|
|
task releaseJAR(dependsOn: classes, type: Jar) {
|
2019-10-23 17:42:43 +00:00
|
|
|
from sourceSets.main.output
|
|
|
|
from { configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) } }
|
|
|
|
|
|
|
|
manifest {
|
2019-10-27 22:50:44 +00:00
|
|
|
attributes 'Main-Class': mainClass
|
2019-10-28 04:34:24 +00:00
|
|
|
attributes 'Specification-Title': appName
|
2019-10-23 17:42:43 +00:00
|
|
|
attributes 'Specification-Version': appVersionName
|
|
|
|
attributes 'Implementation-Version': appVersionCode
|
|
|
|
}
|
|
|
|
}
|
2019-10-23 01:39:57 +00:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation project(':core')
|
|
|
|
|
|
|
|
implementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
|
2019-10-29 00:58:29 +00:00
|
|
|
implementation "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
|
2019-10-23 01:39:57 +00:00
|
|
|
implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
|
|
|
implementation "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
|
|
|
|
}
|