-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6fe7c58
commit 9291889
Showing
40 changed files
with
272 additions
and
186 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,51 @@ | ||
apply plugin: "java" | ||
apply plugin: "java-library" | ||
|
||
sourceCompatibility = 1.6 | ||
sourceCompatibility = 1.8 | ||
sourceSets.main.java.srcDirs = [ "src/" ] | ||
sourceSets.main.resources.srcDirs = ["../assets"] | ||
|
||
project.ext.mainClassName = "com.catinthedark.desktop.DesktopLauncher" | ||
project.ext.assetsDir = new File("../core/assets"); | ||
project.ext.assetsDir = new File("../assets") | ||
|
||
task run(dependsOn: classes, type: JavaExec) { | ||
main = project.mainClassName | ||
import org.gradle.internal.os.OperatingSystem | ||
|
||
tasks.register('run', JavaExec) { | ||
dependsOn classes | ||
mainClass = project.mainClassName | ||
classpath = sourceSets.main.runtimeClasspath | ||
standardInput = System.in | ||
workingDir = project.assetsDir | ||
ignoreExitValue = true | ||
|
||
if (OperatingSystem.current() == OperatingSystem.MAC_OS) { | ||
// Required to run on macOS | ||
jvmArgs += "-XstartOnFirstThread" | ||
} | ||
} | ||
|
||
tasks.register('debug', JavaExec) { | ||
dependsOn classes | ||
mainClass = project.mainClassName | ||
classpath = sourceSets.main.runtimeClasspath | ||
standardInput = System.in | ||
workingDir = project.assetsDir | ||
ignoreExitValue = true | ||
debug = true | ||
} | ||
|
||
task dist(type: Jar) { | ||
from files(sourceSets.main.output.classesDir) | ||
from files(sourceSets.main.output.resourcesDir) | ||
from {configurations.compile.collect {zipTree(it)}} | ||
from files(project.assetsDir); | ||
|
||
tasks.register('dist', Jar) { | ||
duplicatesStrategy(DuplicatesStrategy.EXCLUDE) | ||
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/core/assets' | ||
} | ||
} | ||
dist.dependsOn classes | ||
|
||
task afterEclipseImport(description: "Post processing after project generation", group: "IDE") { | ||
doLast { | ||
def classpath = new XmlParser().parse(file(".classpath")) | ||
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" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Sat Sep 21 13:08:26 CEST 2013 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip |
Oops, something went wrong.