-
Notifications
You must be signed in to change notification settings - Fork 9
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
Showing
21 changed files
with
117 additions
and
104 deletions.
There are no files selected for viewing
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,35 +1,46 @@ | ||
apply plugin: "java" | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_7 | ||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' | ||
|
||
sourceCompatibility = 1.7 | ||
sourceSets.main.java.srcDirs = [ "src/" ] | ||
|
||
|
||
project.ext.mainClassName = "io.piotrjastrzebski.btetest.AIEditorTestProject" | ||
project.ext.assetsDir = new File("../bte/assets"); | ||
project.ext.mainClassName = "io.piotrjastrzebski.bte.desktop.AIEditorTestProject" | ||
//project.ext.assetsDir = new File("../bte/assets"); | ||
|
||
task run(dependsOn: classes, type: JavaExec) { | ||
main = project.mainClassName | ||
classpath = sourceSets.main.runtimeClasspath | ||
standardInput = System.in | ||
workingDir = project.assetsDir | ||
// workingDir = project.assetsDir | ||
ignoreExitValue = 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); | ||
|
||
manifest { | ||
attributes 'Main-Class': project.mainClassName | ||
//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); | ||
// | ||
// manifest { | ||
// attributes 'Main-Class': project.mainClassName | ||
// } | ||
//} | ||
// | ||
//dist.dependsOn classes | ||
|
||
eclipse { | ||
project { | ||
name = appName + "-test" | ||
linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/bte/assets' | ||
} | ||
} | ||
|
||
dist.dependsOn classes | ||
|
||
eclipse.project { | ||
name = appName + "-test" | ||
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) | ||
} | ||
} |
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
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
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,49 +1,46 @@ | ||
apply plugin: "java" | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_7 | ||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' | ||
|
||
sourceCompatibility = 1.7 | ||
sourceSets.main.java.srcDirs = [ "src/" ] | ||
|
||
project.ext.mainClassName = "io.piotrjastrzebski.btewindow.AIEditorWindow" | ||
project.ext.assetsDir = new File("../bte/assets"); | ||
|
||
task run(dependsOn: classes, type: JavaExec) { | ||
main = project.mainClassName | ||
classpath = sourceSets.main.runtimeClasspath | ||
standardInput = System.in | ||
workingDir = project.assetsDir | ||
ignoreExitValue = 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); | ||
//project.ext.mainClassName = "io.piotrjastrzebski.bte.window.AIEditorWindow" | ||
//project.ext.assetsDir = new File("../bte/assets"); | ||
// | ||
//task run(dependsOn: classes, type: JavaExec) { | ||
// main = project.mainClassName | ||
// classpath = sourceSets.main.runtimeClasspath | ||
// standardInput = System.in | ||
// workingDir = project.assetsDir | ||
// ignoreExitValue = 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); | ||
// | ||
// manifest { | ||
// attributes 'Main-Class': project.mainClassName | ||
// } | ||
//} | ||
// | ||
//dist.dependsOn classes | ||
|
||
manifest { | ||
attributes 'Main-Class': project.mainClassName | ||
eclipse { | ||
project { | ||
name = appName + "-window" | ||
linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/bte/assets' | ||
} | ||
} | ||
|
||
dist.dependsOn classes | ||
|
||
eclipse.project { | ||
name = appName + "-test" | ||
} | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
//task javadocJar(type: Jar, dependsOn: javadoc) { | ||
// classifier = 'javadoc' | ||
// from javadoc.destinationDir | ||
//} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
// archives javadocJar | ||
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: 'asseyouts' ]); | ||
def writer = new FileWriter(file(".classpath")) | ||
def printer = new XmlNodePrinter(new PrintWriter(writer)) | ||
printer.setPreserveWhitespace(true) | ||
printer.print(classpath) | ||
} | ||
} |
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
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
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
Oops, something went wrong.