From 90a3f170cca02c3467d6918080822aa4502a61f3 Mon Sep 17 00:00:00 2001 From: EvilEntity Date: Sat, 20 Feb 2016 18:16:04 +0100 Subject: [PATCH] how about that? --- bte-test/build.gradle | 49 +++++++----- .../desktop}/AIEditorTestProject.java | 8 +- .../desktop}/dog/BarkTask.java | 2 +- .../desktop}/dog/CareTask.java | 2 +- .../{btetest => bte/desktop}/dog/Dog.java | 2 +- .../desktop}/dog/MarkTask.java | 2 +- .../desktop}/dog/PlayTask.java | 2 +- .../desktop}/dog/RestTask.java | 2 +- .../desktop}/dog/WalkTask.java | 2 +- bte-window/build.gradle | 77 +++++++++---------- .../window}/AIEditorWindow.java | 6 +- bte/build.gradle | 4 +- bte/src/io/piotrjastrzebski/bte/AIEditor.java | 3 +- .../bte/model/BehaviorTreeModel.java | 5 +- .../bte/model/tasks/FakeRootModel.java | 3 +- .../bte/model/tasks/ReflectionUtils.java | 3 +- .../bte/model/tasks/TaskModel.java | 3 +- .../bte/view/BehaviorTreeView.java | 15 +++- .../bte/view/edit/AttrFieldEdit.java | 2 +- build.gradle | 27 +++---- settings.gradle | 2 +- 21 files changed, 117 insertions(+), 104 deletions(-) rename bte-test/src/io/piotrjastrzebski/{btetest => bte/desktop}/AIEditorTestProject.java (96%) rename bte-test/src/io/piotrjastrzebski/{btetest => bte/desktop}/dog/BarkTask.java (97%) rename bte-test/src/io/piotrjastrzebski/{btetest => bte/desktop}/dog/CareTask.java (96%) rename bte-test/src/io/piotrjastrzebski/{btetest => bte/desktop}/dog/Dog.java (98%) rename bte-test/src/io/piotrjastrzebski/{btetest => bte/desktop}/dog/MarkTask.java (96%) rename bte-test/src/io/piotrjastrzebski/{btetest => bte/desktop}/dog/PlayTask.java (96%) rename bte-test/src/io/piotrjastrzebski/{btetest => bte/desktop}/dog/RestTask.java (96%) rename bte-test/src/io/piotrjastrzebski/{btetest => bte/desktop}/dog/WalkTask.java (96%) rename bte-window/src/io/piotrjastrzebski/{btewindow => bte/window}/AIEditorWindow.java (97%) diff --git a/bte-test/build.gradle b/bte-test/build.gradle index 6f2a191..bf7db0c 100644 --- a/bte-test/build.gradle +++ b/bte-test/build.gradle @@ -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) + } } diff --git a/bte-test/src/io/piotrjastrzebski/btetest/AIEditorTestProject.java b/bte-test/src/io/piotrjastrzebski/bte/desktop/AIEditorTestProject.java similarity index 96% rename from bte-test/src/io/piotrjastrzebski/btetest/AIEditorTestProject.java rename to bte-test/src/io/piotrjastrzebski/bte/desktop/AIEditorTestProject.java index a5f36b5..4215373 100644 --- a/bte-test/src/io/piotrjastrzebski/btetest/AIEditorTestProject.java +++ b/bte-test/src/io/piotrjastrzebski/bte/desktop/AIEditorTestProject.java @@ -1,11 +1,13 @@ -package io.piotrjastrzebski.btetest; +package io.piotrjastrzebski.bte.desktop; import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.ai.btree.BehaviorTree; import com.badlogic.gdx.ai.btree.Task; import com.badlogic.gdx.ai.btree.branch.*; -import com.badlogic.gdx.ai.btree.decorator.*; +import com.badlogic.gdx.ai.btree.decorator.AlwaysFail; +import com.badlogic.gdx.ai.btree.decorator.AlwaysSucceed; +import com.badlogic.gdx.ai.btree.decorator.Include; import com.badlogic.gdx.ai.btree.leaf.Failure; import com.badlogic.gdx.ai.btree.leaf.Success; import com.badlogic.gdx.ai.btree.utils.BehaviorTreeLibrary; @@ -27,7 +29,7 @@ import com.kotcrab.vis.ui.widget.VisTextButton; import io.piotrjastrzebski.bte.AIEditor; import io.piotrjastrzebski.bte.EditorBehaviourTreeLibrary; -import io.piotrjastrzebski.btetest.dog.*; +import io.piotrjastrzebski.bte.desktop.dog.*; /** * Created by EvilEntity on 04/02/2016. diff --git a/bte-test/src/io/piotrjastrzebski/btetest/dog/BarkTask.java b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/BarkTask.java similarity index 97% rename from bte-test/src/io/piotrjastrzebski/btetest/dog/BarkTask.java rename to bte-test/src/io/piotrjastrzebski/bte/desktop/dog/BarkTask.java index 312903e..6e83137 100644 --- a/bte-test/src/io/piotrjastrzebski/btetest/dog/BarkTask.java +++ b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/BarkTask.java @@ -14,7 +14,7 @@ * limitations under the License. ******************************************************************************/ -package io.piotrjastrzebski.btetest.dog; +package io.piotrjastrzebski.bte.desktop.dog; import com.badlogic.gdx.ai.btree.LeafTask; import com.badlogic.gdx.ai.btree.Task; diff --git a/bte-test/src/io/piotrjastrzebski/btetest/dog/CareTask.java b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/CareTask.java similarity index 96% rename from bte-test/src/io/piotrjastrzebski/btetest/dog/CareTask.java rename to bte-test/src/io/piotrjastrzebski/bte/desktop/dog/CareTask.java index 961d436..33dcfa2 100644 --- a/bte-test/src/io/piotrjastrzebski/btetest/dog/CareTask.java +++ b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/CareTask.java @@ -14,7 +14,7 @@ * limitations under the License. ******************************************************************************/ -package io.piotrjastrzebski.btetest.dog; +package io.piotrjastrzebski.bte.desktop.dog; import com.badlogic.gdx.ai.btree.LeafTask; import com.badlogic.gdx.ai.btree.Task; diff --git a/bte-test/src/io/piotrjastrzebski/btetest/dog/Dog.java b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/Dog.java similarity index 98% rename from bte-test/src/io/piotrjastrzebski/btetest/dog/Dog.java rename to bte-test/src/io/piotrjastrzebski/bte/desktop/dog/Dog.java index b108e80..c523e94 100644 --- a/bte-test/src/io/piotrjastrzebski/btetest/dog/Dog.java +++ b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/Dog.java @@ -14,7 +14,7 @@ * limitations under the License. ******************************************************************************/ -package io.piotrjastrzebski.btetest.dog; +package io.piotrjastrzebski.bte.desktop.dog; import com.badlogic.gdx.ai.GdxAI; import com.badlogic.gdx.ai.btree.BehaviorTree; diff --git a/bte-test/src/io/piotrjastrzebski/btetest/dog/MarkTask.java b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/MarkTask.java similarity index 96% rename from bte-test/src/io/piotrjastrzebski/btetest/dog/MarkTask.java rename to bte-test/src/io/piotrjastrzebski/bte/desktop/dog/MarkTask.java index 3a820cb..c1e7bde 100644 --- a/bte-test/src/io/piotrjastrzebski/btetest/dog/MarkTask.java +++ b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/MarkTask.java @@ -14,7 +14,7 @@ * limitations under the License. ******************************************************************************/ -package io.piotrjastrzebski.btetest.dog; +package io.piotrjastrzebski.bte.desktop.dog; import com.badlogic.gdx.ai.btree.LeafTask; import com.badlogic.gdx.ai.btree.Task; diff --git a/bte-test/src/io/piotrjastrzebski/btetest/dog/PlayTask.java b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/PlayTask.java similarity index 96% rename from bte-test/src/io/piotrjastrzebski/btetest/dog/PlayTask.java rename to bte-test/src/io/piotrjastrzebski/bte/desktop/dog/PlayTask.java index 081c6ee..544076c 100644 --- a/bte-test/src/io/piotrjastrzebski/btetest/dog/PlayTask.java +++ b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/PlayTask.java @@ -14,7 +14,7 @@ * limitations under the License. ******************************************************************************/ -package io.piotrjastrzebski.btetest.dog; +package io.piotrjastrzebski.bte.desktop.dog; import com.badlogic.gdx.ai.btree.LeafTask; import com.badlogic.gdx.ai.btree.Task; diff --git a/bte-test/src/io/piotrjastrzebski/btetest/dog/RestTask.java b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/RestTask.java similarity index 96% rename from bte-test/src/io/piotrjastrzebski/btetest/dog/RestTask.java rename to bte-test/src/io/piotrjastrzebski/bte/desktop/dog/RestTask.java index 01e2e9e..6ed8f11 100644 --- a/bte-test/src/io/piotrjastrzebski/btetest/dog/RestTask.java +++ b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/RestTask.java @@ -14,7 +14,7 @@ * limitations under the License. ******************************************************************************/ -package io.piotrjastrzebski.btetest.dog; +package io.piotrjastrzebski.bte.desktop.dog; import com.badlogic.gdx.ai.btree.LeafTask; import com.badlogic.gdx.ai.btree.Task; diff --git a/bte-test/src/io/piotrjastrzebski/btetest/dog/WalkTask.java b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/WalkTask.java similarity index 96% rename from bte-test/src/io/piotrjastrzebski/btetest/dog/WalkTask.java rename to bte-test/src/io/piotrjastrzebski/bte/desktop/dog/WalkTask.java index 45b50c8..058af3b 100644 --- a/bte-test/src/io/piotrjastrzebski/btetest/dog/WalkTask.java +++ b/bte-test/src/io/piotrjastrzebski/bte/desktop/dog/WalkTask.java @@ -14,7 +14,7 @@ * limitations under the License. ******************************************************************************/ -package io.piotrjastrzebski.btetest.dog; +package io.piotrjastrzebski.bte.desktop.dog; import com.badlogic.gdx.ai.btree.LeafTask; import com.badlogic.gdx.ai.btree.Task; diff --git a/bte-window/build.gradle b/bte-window/build.gradle index 18f838b..a67ab02 100644 --- a/bte-window/build.gradle +++ b/bte-window/build.gradle @@ -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) + } } diff --git a/bte-window/src/io/piotrjastrzebski/btewindow/AIEditorWindow.java b/bte-window/src/io/piotrjastrzebski/bte/window/AIEditorWindow.java similarity index 97% rename from bte-window/src/io/piotrjastrzebski/btewindow/AIEditorWindow.java rename to bte-window/src/io/piotrjastrzebski/bte/window/AIEditorWindow.java index 99b55c3..423aef5 100644 --- a/bte-window/src/io/piotrjastrzebski/btewindow/AIEditorWindow.java +++ b/bte-window/src/io/piotrjastrzebski/bte/window/AIEditorWindow.java @@ -1,5 +1,6 @@ -package io.piotrjastrzebski.btewindow; +package io.piotrjastrzebski.bte.window; +import com.badlogic.gdx.Application; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; @@ -144,8 +145,7 @@ public interface WindowListener { */ void onClose(); } - public static void main (String[] args) { - System.out.println("Dummy main, go away!"); + System.out.println("Hi"); } } diff --git a/bte/build.gradle b/bte/build.gradle index f638d82..0c16e20 100644 --- a/bte/build.gradle +++ b/bte/build.gradle @@ -1,13 +1,13 @@ apply plugin: "java" -sourceCompatibility = JavaVersion.VERSION_1_7 +sourceCompatibility = 1.7 [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' sourceSets.main.java.srcDirs = [ "src/" ] eclipse.project { - name = appName + "-lib" + name = appName + "-core" } task sourcesJar(type: Jar, dependsOn: classes) { diff --git a/bte/src/io/piotrjastrzebski/bte/AIEditor.java b/bte/src/io/piotrjastrzebski/bte/AIEditor.java index 1aeb430..d2f08a5 100644 --- a/bte/src/io/piotrjastrzebski/bte/AIEditor.java +++ b/bte/src/io/piotrjastrzebski/bte/AIEditor.java @@ -18,7 +18,6 @@ import com.badlogic.gdx.utils.GdxRuntimeException; import com.kotcrab.vis.ui.VisUI; import com.kotcrab.vis.ui.widget.VisWindow; - import io.piotrjastrzebski.bte.model.BehaviorTreeModel; import io.piotrjastrzebski.bte.model.tasks.Guard; import io.piotrjastrzebski.bte.view.BehaviorTreeView; @@ -265,7 +264,7 @@ public interface BehaviorTreeStepStrategy { } public interface EditorWindowClosedListener { - boolean onClose(); + boolean onClose (); } public void setClosedListener (EditorWindowClosedListener closedListener) { diff --git a/bte/src/io/piotrjastrzebski/bte/model/BehaviorTreeModel.java b/bte/src/io/piotrjastrzebski/bte/model/BehaviorTreeModel.java index 281af19..d5d0a2e 100644 --- a/bte/src/io/piotrjastrzebski/bte/model/BehaviorTreeModel.java +++ b/bte/src/io/piotrjastrzebski/bte/model/BehaviorTreeModel.java @@ -10,7 +10,10 @@ import com.badlogic.gdx.utils.ObjectIntMap; import io.piotrjastrzebski.bte.BehaviorTreeWriter; import io.piotrjastrzebski.bte.EditorBehaviourTreeLibrary; -import io.piotrjastrzebski.bte.model.edit.*; +import io.piotrjastrzebski.bte.model.edit.AddCommand; +import io.piotrjastrzebski.bte.model.edit.CommandManager; +import io.piotrjastrzebski.bte.model.edit.MoveCommand; +import io.piotrjastrzebski.bte.model.edit.RemoveCommand; import io.piotrjastrzebski.bte.model.tasks.FakeRootModel; import io.piotrjastrzebski.bte.model.tasks.ReflectionUtils; import io.piotrjastrzebski.bte.model.tasks.TaskModel; diff --git a/bte/src/io/piotrjastrzebski/bte/model/tasks/FakeRootModel.java b/bte/src/io/piotrjastrzebski/bte/model/tasks/FakeRootModel.java index 5c54ad5..c8e79c6 100644 --- a/bte/src/io/piotrjastrzebski/bte/model/tasks/FakeRootModel.java +++ b/bte/src/io/piotrjastrzebski/bte/model/tasks/FakeRootModel.java @@ -19,8 +19,7 @@ public void init (TaskModel root, BehaviorTreeModel model) { children.clear(); children.add(root); // need some wrapped task so remove command works - @SuppressWarnings("rawtypes") - Selector selector = new Selector(); + @SuppressWarnings("rawtypes") Selector selector = new Selector(); selector.addChild(root.wrapped); wrapped = selector; root.setParent(this); diff --git a/bte/src/io/piotrjastrzebski/bte/model/tasks/ReflectionUtils.java b/bte/src/io/piotrjastrzebski/bte/model/tasks/ReflectionUtils.java index 17d66dd..1644ac3 100644 --- a/bte/src/io/piotrjastrzebski/bte/model/tasks/ReflectionUtils.java +++ b/bte/src/io/piotrjastrzebski/bte/model/tasks/ReflectionUtils.java @@ -128,8 +128,7 @@ public static boolean remove(Task what, Task from) { if (from instanceof BranchTask) { Field field = ClassReflection.getDeclaredField(BranchTask.class, "children"); field.setAccessible(true); - @SuppressWarnings("unchecked") - Array children = (Array)field.get(from); + @SuppressWarnings("unchecked") Array children = (Array)field.get(from); if (children.removeValue(what, true)) { // note in this class there are some more children that we need to deal with if (from instanceof SingleRunningChildBranch) { diff --git a/bte/src/io/piotrjastrzebski/bte/model/tasks/TaskModel.java b/bte/src/io/piotrjastrzebski/bte/model/tasks/TaskModel.java index e7bc2bf..57c9f8d 100644 --- a/bte/src/io/piotrjastrzebski/bte/model/tasks/TaskModel.java +++ b/bte/src/io/piotrjastrzebski/bte/model/tasks/TaskModel.java @@ -12,7 +12,6 @@ import com.badlogic.gdx.utils.Pool; import com.badlogic.gdx.utils.reflect.ClassReflection; import com.badlogic.gdx.utils.reflect.ReflectionException; - import io.piotrjastrzebski.bte.model.BehaviorTreeModel; import io.piotrjastrzebski.bte.model.tasks.fields.EditableFields; import io.piotrjastrzebski.bte.model.tasks.fields.EditableFields.EditableField; @@ -361,6 +360,6 @@ public void wrappedUpdated (Task.Status from, Task.Status to) { } public interface ChangeListener { - void statusChanged(Task.Status from, Task.Status to); + void statusChanged (Task.Status from, Task.Status to); } } diff --git a/bte/src/io/piotrjastrzebski/bte/view/BehaviorTreeView.java b/bte/src/io/piotrjastrzebski/bte/view/BehaviorTreeView.java index 82419ab..6a1928f 100644 --- a/bte/src/io/piotrjastrzebski/bte/view/BehaviorTreeView.java +++ b/bte/src/io/piotrjastrzebski/bte/view/BehaviorTreeView.java @@ -5,14 +5,21 @@ import com.badlogic.gdx.ai.btree.Task; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Color; -import com.badlogic.gdx.scenes.scene2d.*; -import com.badlogic.gdx.scenes.scene2d.ui.*; -import com.badlogic.gdx.scenes.scene2d.utils.*; +import com.badlogic.gdx.scenes.scene2d.Actor; +import com.badlogic.gdx.scenes.scene2d.InputEvent; +import com.badlogic.gdx.scenes.scene2d.InputListener; +import com.badlogic.gdx.scenes.scene2d.Stage; +import com.badlogic.gdx.scenes.scene2d.ui.Label; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.scenes.scene2d.ui.Tree; +import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; +import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; +import com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop; +import com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable; import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.ObjectMap; import com.kotcrab.vis.ui.VisUI; import com.kotcrab.vis.ui.widget.*; - import com.kotcrab.vis.ui.widget.file.FileChooser; import com.kotcrab.vis.ui.widget.file.FileChooserAdapter; import io.piotrjastrzebski.bte.AIEditor; diff --git a/bte/src/io/piotrjastrzebski/bte/view/edit/AttrFieldEdit.java b/bte/src/io/piotrjastrzebski/bte/view/edit/AttrFieldEdit.java index 4aa5f41..1290bb0 100644 --- a/bte/src/io/piotrjastrzebski/bte/view/edit/AttrFieldEdit.java +++ b/bte/src/io/piotrjastrzebski/bte/view/edit/AttrFieldEdit.java @@ -8,7 +8,7 @@ import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.InputListener; -import com.badlogic.gdx.scenes.scene2d.ui.*; +import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import com.badlogic.gdx.utils.reflect.ClassReflection; import com.badlogic.gdx.utils.reflect.Constructor; diff --git a/build.gradle b/build.gradle index d63c144..ea601d7 100644 --- a/build.gradle +++ b/build.gradle @@ -10,19 +10,15 @@ buildscript { allprojects { apply plugin: "eclipse" apply plugin: "idea" - apply plugin: 'maven' + apply plugin: "maven" group = 'com.github.piotr-j' - version = '0.5-SNAPSHOT' + version = '0.4-SNAPSHOT' ext { - appName = "BTEv2" + appName = "bte" gdxVersion = '1.9.2' - roboVMVersion = '1.12.0' - box2DLightsVersion = '1.4' - ashleyVersion = '1.7.0' aiVersion = '1.8.0' - jUnitVersion = '4.12' - mockitoVersion = '1.+' + visUiVersion = '1.0.1' } repositories { @@ -32,24 +28,24 @@ allprojects { } } -project(":bte-window") { +project(":bte-test") { apply plugin: "java" + dependencies { compile project(":bte") - compile "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion" + compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" } } -project(":bte-test") { +project(":bte-window") { apply plugin: "java" + dependencies { compile project(":bte") - compile "junit:junit:$jUnitVersion" - compile "org.mockito:mockito-core:$mockitoVersion" - compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" + compile "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion" compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" } } @@ -57,10 +53,11 @@ project(":bte-test") { project(":bte") { apply plugin: "java" + dependencies { compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "com.badlogicgames.gdx:gdx-ai:$aiVersion" - compile "com.kotcrab.vis:vis-ui:0.9.5" + compile "com.kotcrab.vis:vis-ui:$visUiVersion" } } diff --git a/settings.gradle b/settings.gradle index 41f3575..a56ded0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -include 'bte-window', 'bte-test', 'bte' +include 'bte-test', 'bte-window', 'bte'