Re-run libGDX setup and replace project files with those
This commit is contained in:
parent
ece481061e
commit
9c6be35369
30 changed files with 653 additions and 323 deletions
|
@ -2,6 +2,7 @@ apply plugin: "java"
|
|||
|
||||
sourceCompatibility = 1.6
|
||||
sourceSets.main.java.srcDirs = ["src/"]
|
||||
sourceSets.main.resources.srcDirs = ["../android/assets"]
|
||||
|
||||
project.ext.mainClassName = "dev.lonami.klooni.desktop.DesktopLauncher"
|
||||
project.ext.assetsDir = new File("../android/assets")
|
||||
|
@ -14,34 +15,26 @@ task run(dependsOn: classes, type: JavaExec) {
|
|||
ignoreExitValue = true
|
||||
}
|
||||
|
||||
task dist(type: Jar) {
|
||||
from files(sourceSets.main.output.classesDirs)
|
||||
from files(sourceSets.main.output.resourcesDir)
|
||||
from { configurations.compile.collect { zipTree(it) } }
|
||||
from files(project.assetsDir)
|
||||
task debug(dependsOn: classes, type: JavaExec) {
|
||||
main = project.mainClassName
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
standardInput = System.in
|
||||
workingDir = project.assetsDir
|
||||
ignoreExitValue = true
|
||||
debug = true
|
||||
}
|
||||
|
||||
task dist(type: Jar) {
|
||||
manifest {
|
||||
attributes 'Main-Class': project.mainClassName
|
||||
}
|
||||
dependsOn configurations.runtimeClasspath
|
||||
from {
|
||||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
}
|
||||
with jar
|
||||
}
|
||||
|
||||
dist.dependsOn classes
|
||||
|
||||
eclipse {
|
||||
project {
|
||||
name = appName + "-desktop"
|
||||
linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/android/assets'
|
||||
}
|
||||
}
|
||||
|
||||
task afterEclipseImport(description: "Post processing after project generation", group: "IDE") {
|
||||
doLast {
|
||||
def classpath = new XmlParser().parse(file(".classpath"))
|
||||
// Result of "new" was being ignored
|
||||
// new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]);
|
||||
def writer = new FileWriter(file(".classpath"))
|
||||
def printer = new XmlNodePrinter(new PrintWriter(writer))
|
||||
printer.setPreserveWhitespace(true)
|
||||
printer.print(classpath)
|
||||
}
|
||||
}
|
||||
eclipse.project.name = appName + "-desktop"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue