diff --git a/ProjectStructure.uxf b/ProjectStructure.uxf
new file mode 100644
index 0000000000..8c4ea40d1b
--- /dev/null
+++ b/ProjectStructure.uxf
@@ -0,0 +1,254 @@
+
+
+ 10
+
+ UMLClass
+
+ 420
+ 290
+ 160
+ 30
+
+ Common
+
+
+
+ Relation
+
+ 290
+ 310
+ 160
+ 140
+
+ lt=<<<-
+ 140.0;10.0;140.0;40.0;10.0;40.0;10.0;120.0
+
+
+ UMLClass
+
+ 450
+ 200
+ 120
+ 30
+
+ go.graphics
+
+
+
+ UMLClass
+
+ 480
+ 430
+ 120
+ 30
+
+ jsettlers.graphic
+
+
+
+ UMLClass
+
+ 320
+ 370
+ 100
+ 30
+
+ Network
+
+
+
+ UMLClass
+
+ 370
+ 430
+ 100
+ 30
+
+ Logic
+
+
+
+ Relation
+
+ 370
+ 390
+ 30
+ 60
+
+ lt=<<<-
+ 10.0;10.0;10.0;40.0
+
+
+ Relation
+
+ 450
+ 310
+ 30
+ 140
+
+ lt=<<<-
+ 10.0;10.0;10.0;120.0
+
+
+ UMLClass
+
+ 440
+ 510
+ 110
+ 30
+
+ Main
+
+
+
+ UMLClass
+
+ 410
+ 580
+ 80
+ 30
+
+ MapCreator
+
+
+
+ Relation
+
+ 470
+ 220
+ 30
+ 90
+
+ lt=<<<-
+ 10.0;10.0;10.0;70.0
+
+
+ UMLClass
+
+ 250
+ 430
+ 100
+ 30
+
+ LayoutBuilder
+
+
+
+ Relation
+
+ 530
+ 310
+ 30
+ 140
+
+ lt=<<<-
+ 10.0;10.0;10.0;120.0
+
+
+ UMLClass
+
+ 500
+ 580
+ 80
+ 30
+
+ Tools
+
+
+
+ UMLClass
+
+ 610
+ 430
+ 140
+ 30
+
+ go.graphics.swing
+
+
+
+ Relation
+
+ 530
+ 220
+ 170
+ 230
+
+ lt=<<<-
+ 10.0;10.0;10.0;50.0;150.0;50.0;150.0;210.0
+
+
+ Relation
+
+ 440
+ 450
+ 30
+ 80
+
+ lt=<<<-
+ 10.0;10.0;10.0;60.0
+
+
+ Relation
+
+ 530
+ 450
+ 170
+ 80
+
+ lt=<<<-
+ 150.0;10.0;150.0;40.0;10.0;40.0;10.0;60.0
+
+
+ Relation
+
+ 520
+ 450
+ 30
+ 80
+
+ lt=<<<-
+ 10.0;10.0;10.0;60.0
+
+
+ Relation
+
+ 440
+ 530
+ 30
+ 70
+
+ lt=<<<-
+ 10.0;10.0;10.0;50.0
+
+
+ Relation
+
+ 530
+ 530
+ 30
+ 70
+
+ lt=<<<-
+ 10.0;10.0;10.0;50.0
+
+
+ UMLClass
+
+ 20
+ 30
+ 350
+ 160
+
+ /Info/
+
+Shows the hierarchy of the modules of the
+project, not considering the android packages yet.
+
+All dependencies are transitive.
+For example Common is dependend on go.graphics.
+And because Logic is dependend on Common it
+is also dependend on go.graphics.
+
+
+
diff --git a/build.gradle b/build.gradle
index ecf68e117a..af69957c9f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'java'
+apply plugin: "eclipse"
ext {
@@ -39,7 +40,6 @@ allprojects {
subprojects {
-
plugins.withType(JavaPlugin).whenPluginAdded {
compileJava {
sourceCompatibility = JavaVersion.VERSION_11
@@ -88,6 +88,7 @@ subprojects {
def addGlobalDependencies = {
dependencies {
+ implementation 'com.google.code.gson:gson:2.9.0'
testImplementation 'junit:junit:4.12'
}
}
diff --git a/go.graphics.android/build.gradle b/go.graphics.android/build.gradle
index e4c8bbff53..fac57147c2 100644
--- a/go.graphics.android/build.gradle
+++ b/go.graphics.android/build.gradle
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
+apply plugin: 'eclipse'
import jsettlers.shaders.compile.ShaderCompilationTask
diff --git a/go.graphics.swing/build.gradle b/go.graphics.swing/build.gradle
index c8a311be2f..46d0f3258e 100644
--- a/go.graphics.swing/build.gradle
+++ b/go.graphics.swing/build.gradle
@@ -1,4 +1,5 @@
-apply plugin: 'java'
+apply plugin: 'java-library'
+apply plugin: 'eclipse'
import jsettlers.shaders.compile.ShaderCompilationTask
@@ -22,7 +23,7 @@ String[] modules = new String[] {
}
dependencies {
- implementation project(':go.graphics')
+ api project(':go.graphics')
def lwjglVersion = rootProject.ext.lwjglVersion
diff --git a/go.graphics/build.gradle b/go.graphics/build.gradle
index f3eca85893..f4122e5c1d 100644
--- a/go.graphics/build.gradle
+++ b/go.graphics/build.gradle
@@ -1 +1,2 @@
-apply plugin: 'java'
\ No newline at end of file
+apply plugin: 'java'
+apply plugin: 'eclipse'
diff --git a/jsettlers.common/.externalToolBuilders/createTextures.launch b/jsettlers.common/.externalToolBuilders/createTextures.launch
index 34b5f907e4..5b4a0ea3ed 100644
--- a/jsettlers.common/.externalToolBuilders/createTextures.launch
+++ b/jsettlers.common/.externalToolBuilders/createTextures.launch
@@ -1,21 +1,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jsettlers.common/.externalToolBuilders/findCommit.launch b/jsettlers.common/.externalToolBuilders/findCommit.launch
index 6da2054ec0..ba2d2eb3d3 100644
--- a/jsettlers.common/.externalToolBuilders/findCommit.launch
+++ b/jsettlers.common/.externalToolBuilders/findCommit.launch
@@ -1,19 +1,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jsettlers.common/build.gradle b/jsettlers.common/build.gradle
index 779f6400ca..434367ff5b 100644
--- a/jsettlers.common/build.gradle
+++ b/jsettlers.common/build.gradle
@@ -1,5 +1,5 @@
apply plugin: 'java-library'
-
+apply plugin: "eclipse"
import jsettlers.textures.generation.TextureGenerationTask
import org.eclipse.jgit.lib.Repository
@@ -64,7 +64,6 @@ clean {
dependencies {
api project(':go.graphics')
- testImplementation project(':jsettlers.testutils')
}
copyMainResources {
diff --git a/jsettlers.common/src/main/java/jsettlers/common/action/ScreenChangeAction.java b/jsettlers.common/src/main/java/jsettlers/common/action/ScreenChangeAction.java
index bd96054349..13f8e768dc 100644
--- a/jsettlers.common/src/main/java/jsettlers/common/action/ScreenChangeAction.java
+++ b/jsettlers.common/src/main/java/jsettlers/common/action/ScreenChangeAction.java
@@ -15,8 +15,6 @@
package jsettlers.common.action;
import jsettlers.common.map.shapes.MapRectangle;
-import jsettlers.common.action.Action;
-import jsettlers.common.action.EActionType;
import jsettlers.common.position.ShortPoint2D;
/**
diff --git a/jsettlers.testutils/src/main/java/jsettlers/common/buildings/BuildingAreaUtils.java b/jsettlers.common/src/main/java/jsettlers/common/buildings/BuildingAreaUtils.java
similarity index 100%
rename from jsettlers.testutils/src/main/java/jsettlers/common/buildings/BuildingAreaUtils.java
rename to jsettlers.common/src/main/java/jsettlers/common/buildings/BuildingAreaUtils.java
diff --git a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/resources/SwingResourceProvider.java b/jsettlers.common/src/main/java/jsettlers/common/resources/SwingResourceProvider.java
similarity index 96%
rename from jsettlers.main.swing/src/main/java/jsettlers/main/swing/resources/SwingResourceProvider.java
rename to jsettlers.common/src/main/java/jsettlers/common/resources/SwingResourceProvider.java
index d1a6dd6d8c..012cd98ee1 100644
--- a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/resources/SwingResourceProvider.java
+++ b/jsettlers.common/src/main/java/jsettlers/common/resources/SwingResourceProvider.java
@@ -12,7 +12,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*******************************************************************************/
-package jsettlers.main.swing.resources;
+package jsettlers.common.resources;
import java.io.ByteArrayInputStream;
@@ -24,8 +24,6 @@
import java.io.OutputStream;
import java.util.Locale;
-import jsettlers.common.resources.IResourceProvider;
-
public class SwingResourceProvider implements IResourceProvider {
private final File resourcesDirectory;
diff --git a/jsettlers.graphics/build.gradle b/jsettlers.graphics/build.gradle
index 200c286570..b918abc13b 100644
--- a/jsettlers.graphics/build.gradle
+++ b/jsettlers.graphics/build.gradle
@@ -1,4 +1,5 @@
-apply plugin: 'java'
+apply plugin: 'java-library'
+apply plugin: 'eclipse'
sourceSets {
main {
@@ -16,9 +17,7 @@ clean {
}
dependencies {
- implementation project(':jsettlers.common')
- implementation project(':go.graphics')
- implementation 'com.google.code.gson:gson:2.9.0'
+ api project(':jsettlers.common')
}
diff --git a/jsettlers.graphics/layoutbuilder/build.gradle b/jsettlers.graphics/layoutbuilder/build.gradle
index 6123276f8e..dacaaae41b 100644
--- a/jsettlers.graphics/layoutbuilder/build.gradle
+++ b/jsettlers.graphics/layoutbuilder/build.gradle
@@ -1,6 +1,6 @@
apply plugin: 'java'
+apply plugin: 'eclipse'
dependencies {
implementation project(':jsettlers.common')
- implementation project(':go.graphics')
}
diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/PlacementBuilding.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/PlacementBuilding.java
index 2393afe3fe..935f8ab928 100644
--- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/PlacementBuilding.java
+++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/PlacementBuilding.java
@@ -17,7 +17,6 @@
import java.util.List;
import jsettlers.common.buildings.BuildingVariant;
-import jsettlers.common.buildings.EBuildingType;
import jsettlers.common.buildings.IBuilding;
import jsettlers.common.buildings.IBuildingMaterial;
import jsettlers.common.mapobject.EMapObjectType;
diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/material/production/MaterialsProductionPanel.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/material/production/MaterialsProductionPanel.java
index 498dd46354..9603c76bb7 100644
--- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/material/production/MaterialsProductionPanel.java
+++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/material/production/MaterialsProductionPanel.java
@@ -21,7 +21,6 @@
import jsettlers.common.player.IInGamePlayer;
import jsettlers.common.position.ShortPoint2D;
import jsettlers.graphics.action.ActionFireable;
-import jsettlers.common.action.Action;
import jsettlers.common.action.SetMaterialProductionAction;
import jsettlers.graphics.localization.Labels;
import jsettlers.graphics.map.controls.original.panel.content.AbstractContentProvider;
diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/settlers/profession/ProfessionPanel.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/settlers/profession/ProfessionPanel.java
index 778cfd2cfb..e6cf2e2d7e 100644
--- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/settlers/profession/ProfessionPanel.java
+++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/controls/original/panel/content/settlers/profession/ProfessionPanel.java
@@ -1,6 +1,5 @@
package jsettlers.graphics.map.controls.original.panel.content.settlers.profession;
-import java.text.MessageFormat;
import java.util.List;
import go.graphics.text.EFontSize;
diff --git a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java
index 1550ec8e94..f79b0985b7 100644
--- a/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java
+++ b/jsettlers.graphics/src/main/java/jsettlers/graphics/map/draw/MapObjectDrawer.java
@@ -50,7 +50,6 @@
import jsettlers.common.movable.IGraphicsMovable;
import jsettlers.common.movable.IGraphicsThief;
import jsettlers.common.movable.IShipInConstruction;
-import jsettlers.common.player.ECivilisation;
import jsettlers.common.player.IInGamePlayer;
import jsettlers.common.player.IPlayer;
import jsettlers.common.player.IPlayerable;
diff --git a/jsettlers.logic/build.gradle b/jsettlers.logic/build.gradle
index 61d9827291..d7efbd0fbf 100644
--- a/jsettlers.logic/build.gradle
+++ b/jsettlers.logic/build.gradle
@@ -1,5 +1,5 @@
-apply plugin: 'java'
-
+apply plugin: 'java-library'
+apply plugin: 'eclipse'
task aiDifficultiesIT(type: Test, dependsOn: testClasses) {
include '**/AiDifficultiesIT*'
@@ -17,16 +17,12 @@ task unitTest(type: Test) {
exclude 'jsettlers/integration/**'
}
-
dependencies {
- implementation project(':go.graphics')
- implementation project(':jsettlers.common')
- implementation project(':jsettlers.network')
-
- testImplementation project(':jsettlers.testutils')
- testImplementation project(':jsettlers.main.swing')
-
implementation 'javax.xml.bind:jaxb-api:2.3.1'
+ implementation 'junit:junit:4.12'
+
+ api project(':jsettlers.common')
+ api project(':jsettlers.network')
}
compileJava {
diff --git a/jsettlers.logic/src/main/java/jsettlers/ai/army/RegroupArmyModule.java b/jsettlers.logic/src/main/java/jsettlers/ai/army/RegroupArmyModule.java
index 569623d7bb..530851f829 100644
--- a/jsettlers.logic/src/main/java/jsettlers/ai/army/RegroupArmyModule.java
+++ b/jsettlers.logic/src/main/java/jsettlers/ai/army/RegroupArmyModule.java
@@ -6,10 +6,8 @@
import jsettlers.common.movable.EMovableType;
import jsettlers.common.player.IPlayer;
import jsettlers.common.position.ShortPoint2D;
-import jsettlers.logic.constants.Constants;
import jsettlers.logic.movable.MovableManager;
import jsettlers.logic.movable.interfaces.ILogicMovable;
-import jsettlers.logic.movable.military.SoldierMovable;
import java.util.ArrayList;
import java.util.Comparator;
@@ -19,9 +17,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Objects;
import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
diff --git a/jsettlers.testutils/src/main/java/jsettlers/algorithms/path/astar/DummyEmptyAStarMap.java b/jsettlers.logic/src/main/java/jsettlers/algorithms/path/astar/DummyEmptyAStarMap.java
similarity index 100%
rename from jsettlers.testutils/src/main/java/jsettlers/algorithms/path/astar/DummyEmptyAStarMap.java
rename to jsettlers.logic/src/main/java/jsettlers/algorithms/path/astar/DummyEmptyAStarMap.java
diff --git a/jsettlers.testutils/src/main/java/jsettlers/logic/map/grid/MainGridDataAccessor.java b/jsettlers.logic/src/main/java/jsettlers/logic/map/grid/MainGridDataAccessor.java
similarity index 100%
rename from jsettlers.testutils/src/main/java/jsettlers/logic/map/grid/MainGridDataAccessor.java
rename to jsettlers.logic/src/main/java/jsettlers/logic/map/grid/MainGridDataAccessor.java
diff --git a/jsettlers.testutils/src/main/java/jsettlers/integration/replay/AutoReplaySetting.java b/jsettlers.logic/src/main/java/jsettlers/logic/replay/AutoReplaySetting.java
similarity index 90%
rename from jsettlers.testutils/src/main/java/jsettlers/integration/replay/AutoReplaySetting.java
rename to jsettlers.logic/src/main/java/jsettlers/logic/replay/AutoReplaySetting.java
index 95851655b2..3728ddd6f9 100644
--- a/jsettlers.testutils/src/main/java/jsettlers/integration/replay/AutoReplaySetting.java
+++ b/jsettlers.logic/src/main/java/jsettlers/logic/replay/AutoReplaySetting.java
@@ -12,7 +12,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*******************************************************************************/
-package jsettlers.integration.replay;
+package jsettlers.logic.replay;
import java.io.IOException;
import java.util.Arrays;
@@ -22,8 +22,8 @@
import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.logic.map.loading.MapLoader;
import jsettlers.logic.map.loading.list.MapList;
+import jsettlers.logic.utils.MapUtils;
import jsettlers.main.replay.ReplayUtils.IReplayStreamProvider;
-import jsettlers.testutils.map.MapUtils;
/**
* Created by michael on 24.04.16.
@@ -48,7 +48,7 @@ private String getTypeName() {
return typeName;
}
- int[] getTimeMinutes() {
+ public int[] getTimeMinutes() {
return timeMinutes;
}
@@ -68,14 +68,14 @@ public IReplayStreamProvider getReplayFile() throws MapLoadException {
return MapUtils.createReplayForResource(getClass(), getReplayName(), getMap());
}
- MapLoader getReferenceSavegame(int index) throws MapLoadException {
+ public MapLoader getReferenceSavegame(int index) throws MapLoadException {
String replayPath = getReplayPath(index);
System.out.println("Using reference file: " + replayPath);
return MapLoader.getLoaderForListedMap(new MapList.ListedResourceMap(replayPath));
}
- String getReplayPath(int index) {
+ public String getReplayPath(int index) {
return "/" + getClass().getPackage().getName().replace('.', '/') + "/" + getPath(index);
}
@@ -87,7 +87,7 @@ public String toString() {
'}';
}
- void compareSaveGamesAndDelete(MapLoader[] actualSaveGames) throws MapLoadException, IOException, ClassNotFoundException {
+ public void compareSaveGamesAndDelete(MapLoader[] actualSaveGames) throws MapLoadException, IOException, ClassNotFoundException {
for (int i = 0; i < actualSaveGames.length; i++) {
MapLoader actualSaveGame = actualSaveGames[i];
MapLoader expectedSaveGame = getReferenceSavegame(i);
diff --git a/jsettlers.testutils/src/main/java/jsettlers/testutils/map/CountingInputStream.java b/jsettlers.logic/src/main/java/jsettlers/logic/utils/CountingInputStream.java
similarity index 98%
rename from jsettlers.testutils/src/main/java/jsettlers/testutils/map/CountingInputStream.java
rename to jsettlers.logic/src/main/java/jsettlers/logic/utils/CountingInputStream.java
index 56b9c91ae9..9b8df2f560 100644
--- a/jsettlers.testutils/src/main/java/jsettlers/testutils/map/CountingInputStream.java
+++ b/jsettlers.logic/src/main/java/jsettlers/logic/utils/CountingInputStream.java
@@ -12,7 +12,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*******************************************************************************/
-package jsettlers.testutils.map;
+package jsettlers.logic.utils;
import java.io.IOException;
import java.io.InputStream;
diff --git a/jsettlers.testutils/src/main/java/jsettlers/testutils/DebugImagesHelper.java b/jsettlers.logic/src/main/java/jsettlers/logic/utils/DebugImagesHelper.java
similarity index 99%
rename from jsettlers.testutils/src/main/java/jsettlers/testutils/DebugImagesHelper.java
rename to jsettlers.logic/src/main/java/jsettlers/logic/utils/DebugImagesHelper.java
index a3939dc382..96c843694f 100644
--- a/jsettlers.testutils/src/main/java/jsettlers/testutils/DebugImagesHelper.java
+++ b/jsettlers.logic/src/main/java/jsettlers/logic/utils/DebugImagesHelper.java
@@ -12,19 +12,20 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*******************************************************************************/
-package jsettlers.testutils;
+package jsettlers.logic.utils;
-import jsettlers.common.Color;
-import jsettlers.common.utils.coordinates.ICoordinateFunction;
-import jsettlers.common.utils.coordinates.ICoordinatePredicate;
+import static java.util.Arrays.stream;
-import javax.imageio.ImageIO;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
-import static java.util.Arrays.stream;
+import javax.imageio.ImageIO;
+
+import jsettlers.common.Color;
+import jsettlers.common.utils.coordinates.ICoordinateFunction;
+import jsettlers.common.utils.coordinates.ICoordinatePredicate;
/**
* Created by Andreas Eberle on 06.01.2017.
diff --git a/jsettlers.testutils/src/main/java/jsettlers/testutils/map/DebugMapLister.java b/jsettlers.logic/src/main/java/jsettlers/logic/utils/DebugMapLister.java
similarity index 94%
rename from jsettlers.testutils/src/main/java/jsettlers/testutils/map/DebugMapLister.java
rename to jsettlers.logic/src/main/java/jsettlers/logic/utils/DebugMapLister.java
index 58d5e84afa..f7b49b0792 100644
--- a/jsettlers.testutils/src/main/java/jsettlers/testutils/map/DebugMapLister.java
+++ b/jsettlers.logic/src/main/java/jsettlers/logic/utils/DebugMapLister.java
@@ -1,4 +1,4 @@
-package jsettlers.testutils.map;
+package jsettlers.logic.utils;
import java.io.File;
import java.io.IOException;
diff --git a/jsettlers.testutils/src/main/java/jsettlers/testutils/map/DebugOutputStream.java b/jsettlers.logic/src/main/java/jsettlers/logic/utils/DebugOutputStream.java
similarity index 94%
rename from jsettlers.testutils/src/main/java/jsettlers/testutils/map/DebugOutputStream.java
rename to jsettlers.logic/src/main/java/jsettlers/logic/utils/DebugOutputStream.java
index b537a77164..e24da28857 100644
--- a/jsettlers.testutils/src/main/java/jsettlers/testutils/map/DebugOutputStream.java
+++ b/jsettlers.logic/src/main/java/jsettlers/logic/utils/DebugOutputStream.java
@@ -1,4 +1,4 @@
-package jsettlers.testutils.map;
+package jsettlers.logic.utils;
import java.io.IOException;
import java.io.OutputStream;
diff --git a/jsettlers.testutils/src/main/java/jsettlers/testutils/map/MapUtils.java b/jsettlers.logic/src/main/java/jsettlers/logic/utils/MapUtils.java
similarity index 99%
rename from jsettlers.testutils/src/main/java/jsettlers/testutils/map/MapUtils.java
rename to jsettlers.logic/src/main/java/jsettlers/logic/utils/MapUtils.java
index 0887d63e8d..27279acc6c 100644
--- a/jsettlers.testutils/src/main/java/jsettlers/testutils/map/MapUtils.java
+++ b/jsettlers.logic/src/main/java/jsettlers/logic/utils/MapUtils.java
@@ -12,7 +12,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*******************************************************************************/
-package jsettlers.testutils.map;
+package jsettlers.logic.utils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
diff --git a/jsettlers.testutils/src/main/java/jsettlers/testutils/TestUtils.java b/jsettlers.logic/src/main/java/jsettlers/logic/utils/TestUtils.java
similarity index 95%
rename from jsettlers.testutils/src/main/java/jsettlers/testutils/TestUtils.java
rename to jsettlers.logic/src/main/java/jsettlers/logic/utils/TestUtils.java
index 2cb288bd25..238c57d8c8 100644
--- a/jsettlers.testutils/src/main/java/jsettlers/testutils/TestUtils.java
+++ b/jsettlers.logic/src/main/java/jsettlers/logic/utils/TestUtils.java
@@ -12,13 +12,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*******************************************************************************/
-package jsettlers.testutils;
-
-import jsettlers.common.resources.ResourceManager;
-import jsettlers.logic.map.loading.list.MapList;
-import jsettlers.logic.map.loading.list.MapList.DefaultMapListFactory;
-import jsettlers.main.swing.resources.SwingResourceProvider;
-import jsettlers.testutils.map.DebugMapLister;
+package jsettlers.logic.utils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -28,6 +22,11 @@
import java.io.ObjectOutputStream;
import java.nio.file.Files;
+import jsettlers.common.resources.ResourceManager;
+import jsettlers.common.resources.SwingResourceProvider;
+import jsettlers.logic.map.loading.list.MapList;
+import jsettlers.logic.map.loading.list.MapList.DefaultMapListFactory;
+
/**
* Utility class holding methods needed by serveral test classes.
*
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/base.rmap b/jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/base.rmap
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/base.rmap
rename to jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/base.rmap
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/replay.log b/jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/replay.log
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/replay.log
rename to jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/replay.log
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-0m.zmap b/jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-0m.zmap
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-0m.zmap
rename to jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-0m.zmap
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-10m.zmap b/jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-10m.zmap
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-10m.zmap
rename to jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-10m.zmap
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-20m.zmap b/jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-20m.zmap
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-20m.zmap
rename to jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-20m.zmap
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-40m.zmap b/jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-40m.zmap
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-40m.zmap
rename to jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-40m.zmap
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-65m.zmap b/jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-65m.zmap
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-65m.zmap
rename to jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-65m.zmap
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-90m.zmap b/jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-90m.zmap
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-90m.zmap
rename to jsettlers.logic/src/main/resources/jsettlers/integration/replay/fullproduction/savegame-90m.zmap
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/testutils/map/SpezialSumpf_12.map b/jsettlers.logic/src/main/resources/jsettlers/testutils/map/SpezialSumpf_12.map
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/testutils/map/SpezialSumpf_12.map
rename to jsettlers.logic/src/main/resources/jsettlers/testutils/map/SpezialSumpf_12.map
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/testutils/map/bigmap.rmap b/jsettlers.logic/src/main/resources/jsettlers/testutils/map/bigmap.rmap
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/testutils/map/bigmap.rmap
rename to jsettlers.logic/src/main/resources/jsettlers/testutils/map/bigmap.rmap
diff --git a/jsettlers.testutils/src/main/resources/jsettlers/testutils/map/mountainlake.rmap b/jsettlers.logic/src/main/resources/jsettlers/testutils/map/mountainlake.rmap
similarity index 100%
rename from jsettlers.testutils/src/main/resources/jsettlers/testutils/map/mountainlake.rmap
rename to jsettlers.logic/src/main/resources/jsettlers/testutils/map/mountainlake.rmap
diff --git a/jsettlers.logic/src/test/java/jsettlers/algorithms/partitions/PartitionCalculatorAlgorithmComparisionTest.java b/jsettlers.logic/src/test/java/jsettlers/algorithms/partitions/PartitionCalculatorAlgorithmComparisionTest.java
index ba3e6a9ce0..c789009b9c 100644
--- a/jsettlers.logic/src/test/java/jsettlers/algorithms/partitions/PartitionCalculatorAlgorithmComparisionTest.java
+++ b/jsettlers.logic/src/test/java/jsettlers/algorithms/partitions/PartitionCalculatorAlgorithmComparisionTest.java
@@ -20,12 +20,12 @@
import java.util.BitSet;
import jsettlers.logic.map.loading.MapLoadException;
+import jsettlers.logic.utils.MapUtils;
import jsettlers.logic.constants.MatchConstants;
import jsettlers.logic.map.grid.MainGrid;
import jsettlers.logic.map.grid.MainGridDataAccessor;
import jsettlers.logic.map.grid.landscape.LandscapeGrid;
import jsettlers.network.synchronic.timer.NetworkTimer;
-import jsettlers.testutils.map.MapUtils;
import org.junit.Test;
diff --git a/jsettlers.logic/src/test/java/jsettlers/algorithms/partitions/PartitionCalculatorAlgorithmSpeedTest.java b/jsettlers.logic/src/test/java/jsettlers/algorithms/partitions/PartitionCalculatorAlgorithmSpeedTest.java
index 55691d83dc..ca4cd6ff28 100644
--- a/jsettlers.logic/src/test/java/jsettlers/algorithms/partitions/PartitionCalculatorAlgorithmSpeedTest.java
+++ b/jsettlers.logic/src/test/java/jsettlers/algorithms/partitions/PartitionCalculatorAlgorithmSpeedTest.java
@@ -18,14 +18,14 @@
import java.util.BitSet;
-import jsettlers.logic.map.grid.MainGridDataAccessor;
import jsettlers.common.logging.MilliStopWatch;
import jsettlers.logic.map.loading.MapLoadException;
+import jsettlers.logic.utils.MapUtils;
import jsettlers.logic.constants.MatchConstants;
import jsettlers.logic.map.grid.MainGrid;
+import jsettlers.logic.map.grid.MainGridDataAccessor;
import jsettlers.logic.map.grid.landscape.LandscapeGrid;
import jsettlers.network.synchronic.timer.NetworkTimer;
-import jsettlers.testutils.map.MapUtils;
/**
*
diff --git a/jsettlers.common/src/test/java/jsettlers/common/buildings/BuildingAreaBitSetTest.java b/jsettlers.logic/src/test/java/jsettlers/common/buildings/BuildingAreaBitSetTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/buildings/BuildingAreaBitSetTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/buildings/BuildingAreaBitSetTest.java
diff --git a/jsettlers.common/src/test/java/jsettlers/common/buildings/BuildingConfigurationsTest.java b/jsettlers.logic/src/test/java/jsettlers/common/buildings/BuildingConfigurationsTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/buildings/BuildingConfigurationsTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/buildings/BuildingConfigurationsTest.java
diff --git a/jsettlers.common/src/test/java/jsettlers/common/map/shapes/FreeMapAreaTest.java b/jsettlers.logic/src/test/java/jsettlers/common/map/shapes/FreeMapAreaTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/map/shapes/FreeMapAreaTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/map/shapes/FreeMapAreaTest.java
diff --git a/jsettlers.common/src/test/java/jsettlers/common/map/shapes/HexGridAreaTest.java b/jsettlers.logic/src/test/java/jsettlers/common/map/shapes/HexGridAreaTest.java
similarity index 99%
rename from jsettlers.common/src/test/java/jsettlers/common/map/shapes/HexGridAreaTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/map/shapes/HexGridAreaTest.java
index 8eacbf6699..ea9dafd6cd 100644
--- a/jsettlers.common/src/test/java/jsettlers/common/map/shapes/HexGridAreaTest.java
+++ b/jsettlers.logic/src/test/java/jsettlers/common/map/shapes/HexGridAreaTest.java
@@ -18,7 +18,7 @@
import jsettlers.common.map.shapes.HexGridArea.HexGridAreaIterator;
import jsettlers.common.position.ShortPoint2D;
import jsettlers.common.utils.mutables.MutableInt;
-import jsettlers.testutils.DebugImagesHelper;
+import jsettlers.logic.utils.DebugImagesHelper;
import org.junit.BeforeClass;
import org.junit.Test;
diff --git a/jsettlers.common/src/test/java/jsettlers/common/map/shapes/MapAreasTest.java b/jsettlers.logic/src/test/java/jsettlers/common/map/shapes/MapAreasTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/map/shapes/MapAreasTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/map/shapes/MapAreasTest.java
diff --git a/jsettlers.common/src/test/java/jsettlers/common/map/shapes/MapCircleTest.java b/jsettlers.logic/src/test/java/jsettlers/common/map/shapes/MapCircleTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/map/shapes/MapCircleTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/map/shapes/MapCircleTest.java
diff --git a/jsettlers.common/src/test/java/jsettlers/common/map/shapes/MapRectangleTest.java b/jsettlers.logic/src/test/java/jsettlers/common/map/shapes/MapRectangleTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/map/shapes/MapRectangleTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/map/shapes/MapRectangleTest.java
diff --git a/jsettlers.common/src/test/java/jsettlers/common/movable/EDirectionTest.java b/jsettlers.logic/src/test/java/jsettlers/common/movable/EDirectionTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/movable/EDirectionTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/movable/EDirectionTest.java
diff --git a/jsettlers.common/src/test/java/jsettlers/common/position/RelativePointTests.java b/jsettlers.logic/src/test/java/jsettlers/common/position/RelativePointTests.java
similarity index 94%
rename from jsettlers.common/src/test/java/jsettlers/common/position/RelativePointTests.java
rename to jsettlers.logic/src/test/java/jsettlers/common/position/RelativePointTests.java
index 6ef1bf382d..cb0f0c97f3 100644
--- a/jsettlers.common/src/test/java/jsettlers/common/position/RelativePointTests.java
+++ b/jsettlers.logic/src/test/java/jsettlers/common/position/RelativePointTests.java
@@ -15,8 +15,6 @@
package jsettlers.common.position;
import static org.junit.Assert.assertEquals;
-import jsettlers.common.position.RelativePoint;
-import jsettlers.common.position.ShortPoint2D;
import org.junit.Test;
diff --git a/jsettlers.common/src/test/java/jsettlers/common/position/ShortPoint2DTest.java b/jsettlers.logic/src/test/java/jsettlers/common/position/ShortPoint2DTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/position/ShortPoint2DTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/position/ShortPoint2DTest.java
diff --git a/jsettlers.common/src/test/java/jsettlers/common/utils/collections/IteratorFilterTest.java b/jsettlers.logic/src/test/java/jsettlers/common/utils/collections/IteratorFilterTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/utils/collections/IteratorFilterTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/utils/collections/IteratorFilterTest.java
diff --git a/jsettlers.common/src/test/java/jsettlers/common/utils/collections/list/DoubleLinkedListTest.java b/jsettlers.logic/src/test/java/jsettlers/common/utils/collections/list/DoubleLinkedListTest.java
similarity index 98%
rename from jsettlers.common/src/test/java/jsettlers/common/utils/collections/list/DoubleLinkedListTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/utils/collections/list/DoubleLinkedListTest.java
index b15364bdbe..6d78078030 100644
--- a/jsettlers.common/src/test/java/jsettlers/common/utils/collections/list/DoubleLinkedListTest.java
+++ b/jsettlers.logic/src/test/java/jsettlers/common/utils/collections/list/DoubleLinkedListTest.java
@@ -22,10 +22,10 @@
import java.io.IOException;
import java.util.Iterator;
-import jsettlers.testutils.TestUtils;
-
import org.junit.Test;
+import jsettlers.logic.utils.TestUtils;
+
/**
* Test for the class {@link DoubleLinkedList}.
*
@@ -124,10 +124,10 @@ public void testRemoveByHandle() {
list.remove(handles[7]);
assertEquals("incorrect size after removing 2 values", TEST_NUMBERS - 2, list.size());
- assertNull("the removed item should not hold a 'next' reference", handles[4].next);
- assertNull("the removed item should not hold a 'prev' reference", handles[4].prev);
- assertNull("the removed item should not hold a 'next' reference", handles[7].next);
- assertNull("the removed item should not hold a 'prev' reference", handles[7].prev);
+ assertNull("the removed item should not hold a 'next' reference", handles[4]);
+ assertNull("the removed item should not hold a 'prev' reference", handles[4]);
+ assertNull("the removed item should not hold a 'next' reference", handles[7]);
+ assertNull("the removed item should not hold a 'prev' reference", handles[7]);
for (int i = TEST_NUMBERS - 1; i >= 0; i--) {
if (i == 4 || i == 7) { // skip the removed values
diff --git a/jsettlers.common/src/test/java/jsettlers/common/utils/collections/map/ArrayListMapTest.java b/jsettlers.logic/src/test/java/jsettlers/common/utils/collections/map/ArrayListMapTest.java
similarity index 93%
rename from jsettlers.common/src/test/java/jsettlers/common/utils/collections/map/ArrayListMapTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/utils/collections/map/ArrayListMapTest.java
index 2458fae500..a6ecf03294 100644
--- a/jsettlers.common/src/test/java/jsettlers/common/utils/collections/map/ArrayListMapTest.java
+++ b/jsettlers.logic/src/test/java/jsettlers/common/utils/collections/map/ArrayListMapTest.java
@@ -8,7 +8,8 @@
import org.junit.Test;
-import jsettlers.testutils.TestUtils;
+import jsettlers.common.utils.collections.map.ArrayListMap;
+import jsettlers.logic.utils.TestUtils;
/**
* Created by Andreas Eberle on 16.05.2016.
diff --git a/jsettlers.common/src/test/java/jsettlers/common/utils/coordinates/CoordinateStreamTest.java b/jsettlers.logic/src/test/java/jsettlers/common/utils/coordinates/CoordinateStreamTest.java
similarity index 100%
rename from jsettlers.common/src/test/java/jsettlers/common/utils/coordinates/CoordinateStreamTest.java
rename to jsettlers.logic/src/test/java/jsettlers/common/utils/coordinates/CoordinateStreamTest.java
diff --git a/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiDifficultiesIT.java b/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiDifficultiesIT.java
index 024e4ca0c5..48998c3b17 100644
--- a/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiDifficultiesIT.java
+++ b/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiDifficultiesIT.java
@@ -15,8 +15,8 @@
package jsettlers.integration.ai;
import jsettlers.logic.constants.Constants;
-import jsettlers.logic.map.loading.MapLoader;
-import jsettlers.testutils.map.MapUtils;
+import jsettlers.logic.utils.MapUtils;
+
import org.junit.Test;
import jsettlers.common.CommonConstants;
@@ -28,7 +28,8 @@
import jsettlers.logic.player.PlayerSetting;
import jsettlers.main.JSettlersGame;
import jsettlers.main.replay.ReplayUtils;
-import jsettlers.testutils.TestUtils;
+import jsettlers.logic.utils.TestUtils;
+
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
diff --git a/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiSomethingTest.java b/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiSomethingTest.java
index fb0827d81b..494525f9fe 100644
--- a/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiSomethingTest.java
+++ b/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiSomethingTest.java
@@ -14,7 +14,8 @@
import jsettlers.main.JSettlersGame;
import jsettlers.main.replay.ReplayUtils;
import jsettlers.network.client.OfflineNetworkConnector;
-import jsettlers.testutils.TestUtils;
+import jsettlers.logic.utils.TestUtils;
+
import org.junit.Test;
import static jsettlers.integration.ai.AiTestUtils.MINUTES;
import static jsettlers.integration.ai.AiTestUtils.createStartingGame;
diff --git a/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiTestUtils.java b/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiTestUtils.java
index b790ac9c7e..6f55e65af7 100644
--- a/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiTestUtils.java
+++ b/jsettlers.logic/src/test/java/jsettlers/integration/ai/AiTestUtils.java
@@ -17,7 +17,8 @@
import jsettlers.main.JSettlersGame;
import jsettlers.main.replay.ReplayUtils;
import jsettlers.network.client.OfflineNetworkConnector;
-import jsettlers.testutils.map.MapUtils;
+import jsettlers.logic.utils.MapUtils;
+
import org.junit.Assert;
public class AiTestUtils {
diff --git a/jsettlers.logic/src/test/java/jsettlers/integration/replay/AutoReplayIT.java b/jsettlers.logic/src/test/java/jsettlers/integration/replay/AutoReplayIT.java
index b684e6aacb..56377c022b 100644
--- a/jsettlers.logic/src/test/java/jsettlers/integration/replay/AutoReplayIT.java
+++ b/jsettlers.logic/src/test/java/jsettlers/integration/replay/AutoReplayIT.java
@@ -22,8 +22,9 @@
import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.logic.constants.Constants;
import jsettlers.logic.map.loading.MapLoader;
+import jsettlers.logic.replay.AutoReplaySetting;
+import jsettlers.logic.utils.TestUtils;
import jsettlers.main.replay.ReplayUtils;
-import jsettlers.testutils.TestUtils;
import org.junit.BeforeClass;
import org.junit.Test;
diff --git a/jsettlers.logic/src/test/java/jsettlers/integration/replay/ReplayValidationIT.java b/jsettlers.logic/src/test/java/jsettlers/integration/replay/ReplayValidationIT.java
index 0c9b02108e..2cfba814f6 100644
--- a/jsettlers.logic/src/test/java/jsettlers/integration/replay/ReplayValidationIT.java
+++ b/jsettlers.logic/src/test/java/jsettlers/integration/replay/ReplayValidationIT.java
@@ -35,8 +35,8 @@
import jsettlers.main.JSettlersGame;
import jsettlers.main.replay.ReplayUtils;
import jsettlers.network.synchronic.timer.NetworkTimer;
-import jsettlers.testutils.TestUtils;
-import jsettlers.testutils.map.MapUtils;
+import jsettlers.logic.utils.MapUtils;
+import jsettlers.logic.utils.TestUtils;
/**
*
diff --git a/jsettlers.logic/src/test/java/jsettlers/logic/map/grid/partition/manager/materials/MaterialsManagerTest.java b/jsettlers.logic/src/test/java/jsettlers/logic/map/grid/partition/manager/materials/MaterialsManagerTest.java
index bc8fab82c5..1cd1c0bc09 100644
--- a/jsettlers.logic/src/test/java/jsettlers/logic/map/grid/partition/manager/materials/MaterialsManagerTest.java
+++ b/jsettlers.logic/src/test/java/jsettlers/logic/map/grid/partition/manager/materials/MaterialsManagerTest.java
@@ -21,7 +21,8 @@
import jsettlers.logic.map.grid.partition.manager.materials.offers.EOfferPriority;
import jsettlers.logic.map.grid.partition.manager.materials.offers.OffersList;
import jsettlers.logic.map.grid.partition.manager.settings.PartitionManagerSettings;
-import jsettlers.testutils.TestUtils;
+import jsettlers.logic.utils.TestUtils;
+
import org.junit.Test;
import java.io.IOException;
diff --git a/jsettlers.logic/src/test/java/jsettlers/logic/map/grid/partition/manager/materials/requests/SimpleMaterialRequestPriorityQueueTest.java b/jsettlers.logic/src/test/java/jsettlers/logic/map/grid/partition/manager/materials/requests/SimpleMaterialRequestPriorityQueueTest.java
index 6c6313a054..6db897bcae 100644
--- a/jsettlers.logic/src/test/java/jsettlers/logic/map/grid/partition/manager/materials/requests/SimpleMaterialRequestPriorityQueueTest.java
+++ b/jsettlers.logic/src/test/java/jsettlers/logic/map/grid/partition/manager/materials/requests/SimpleMaterialRequestPriorityQueueTest.java
@@ -22,12 +22,12 @@
import java.io.IOException;
-import jsettlers.testutils.TestUtils;
import jsettlers.common.buildings.EBuildingType;
import jsettlers.common.material.EPriority;
import jsettlers.common.position.ShortPoint2D;
import jsettlers.logic.constants.Constants;
import jsettlers.logic.constants.MatchConstants;
+import jsettlers.logic.utils.TestUtils;
import org.junit.Test;
diff --git a/jsettlers.main.android/build.gradle b/jsettlers.main.android/build.gradle
index f9911795a2..b0718178c4 100644
--- a/jsettlers.main.android/build.gradle
+++ b/jsettlers.main.android/build.gradle
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
+apply plugin: 'eclipse'
android {
compileSdkVersion rootProject.ext.androidCompileSdkVersion
@@ -57,7 +58,6 @@ dependencies {
implementation project(':jsettlers.graphics')
implementation project(':jsettlers.logic')
implementation project(':jsettlers.common')
- implementation project(':jsettlers.network')
implementation "android.arch.lifecycle:extensions:1.1.1"
implementation 'com.android.support:appcompat-v7:' + rootProject.ext.androidSupportLibraryVersion
@@ -76,7 +76,6 @@ dependencies {
annotationProcessor 'org.androidannotations:androidannotations:' + rootProject.ext.androidAnnotationsVersion
// test dependencies
- androidTestImplementation project(':jsettlers.testutils')
androidTestImplementation 'com.android.support:support-annotations:' + rootProject.ext.androidSupportLibraryVersion
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
diff --git a/jsettlers.main.swing/build.gradle b/jsettlers.main.swing/build.gradle
index 78bcce0b0f..ad92765610 100644
--- a/jsettlers.main.swing/build.gradle
+++ b/jsettlers.main.swing/build.gradle
@@ -1,6 +1,8 @@
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'application'
+ id 'eclipse'
+ id 'java-library'
}
/*add music dependencies
@@ -27,16 +29,11 @@ startScripts {
mainClassName = 'jsettlers.main.swing.SwingManagedJSettlers'
dependencies {
- implementation project(':go.graphics')
- implementation project(':go.graphics.swing')
- implementation project(':jsettlers.common')
- implementation project(':jsettlers.graphics')
- implementation project(':jsettlers.logic')
- implementation project(':jsettlers.network')
- runtimeOnly project(':jsettlers.testutils')
- implementation 'com.google.code.gson:gson:2.9.0'
-
- for (String lpglDependency : lgplDependencies) {
+ api project(':jsettlers.graphics')
+ api project(':go.graphics.swing')
+ api project(':jsettlers.logic')
+
+ for (String lpglDependency : lgplDependencies) {
lgplDeps lpglDependency
}
}
diff --git a/jsettlers.main.swing/src/main/java/jsettlers/main/replay/ReplayToolApp.java b/jsettlers.main.swing/src/main/java/jsettlers/main/replay/ReplayToolApp.java
index 71af044710..58c0e20396 100644
--- a/jsettlers.main.swing/src/main/java/jsettlers/main/replay/ReplayToolApp.java
+++ b/jsettlers.main.swing/src/main/java/jsettlers/main/replay/ReplayToolApp.java
@@ -14,17 +14,17 @@
*******************************************************************************/
package jsettlers.main.replay;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
import jsettlers.common.CommonConstants;
import jsettlers.common.resources.ResourceManager;
+import jsettlers.common.resources.SwingResourceProvider;
import jsettlers.logic.map.loading.MapLoadException;
-import jsettlers.main.swing.resources.SwingResourceLoader;
-import jsettlers.main.swing.resources.SwingResourceProvider;
+import jsettlers.main.swing.SwingResourceLoader;
import jsettlers.main.swing.settings.SettingsManager;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
/**
* @author Andreas Eberle
*/
diff --git a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/SwingManagedJSettlers.java b/jsettlers.main.swing/src/main/java/jsettlers/main/swing/SwingManagedJSettlers.java
index ce8b3a8717..1f57b2a5ad 100644
--- a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/SwingManagedJSettlers.java
+++ b/jsettlers.main.swing/src/main/java/jsettlers/main/swing/SwingManagedJSettlers.java
@@ -25,6 +25,7 @@
import jsettlers.common.menu.IStartedGame;
import jsettlers.common.menu.IStartingGame;
import jsettlers.common.resources.ResourceManager;
+import jsettlers.common.resources.SwingResourceProvider;
import jsettlers.graphics.localization.AbstractLabels;
import jsettlers.graphics.localization.Labels;
import jsettlers.logic.constants.MatchConstants;
@@ -32,19 +33,15 @@
import jsettlers.logic.map.loading.MapLoader;
import jsettlers.logic.map.loading.list.DirectoryMapLister;
import jsettlers.logic.map.loading.newmap.MapFileHeader;
-import jsettlers.logic.movable.civilian.BuildingWorkerMovable;
-import jsettlers.logic.movable.other.AttackableHumanMovable;
import jsettlers.logic.player.InitialGameState;
import jsettlers.logic.player.PlayerSetting;
import jsettlers.main.JSettlersGame;
import jsettlers.main.ReplayStartInformation;
import jsettlers.main.replay.ReplayUtils;
+import jsettlers.main.swing.SwingResourceLoader.ResourceSetupException;
import jsettlers.main.swing.foldertree.SelectSettlersFolderDialog;
import jsettlers.main.swing.lookandfeel.JSettlersLookAndFeel;
import jsettlers.main.swing.lookandfeel.JSettlersLookAndFeelExecption;
-import jsettlers.main.swing.resources.SwingResourceLoader;
-import jsettlers.main.swing.resources.SwingResourceLoader.ResourceSetupException;
-import jsettlers.main.swing.resources.SwingResourceProvider;
import jsettlers.main.swing.settings.SettingsManager;
import jsettlers.network.client.OfflineNetworkConnector;
diff --git a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/resources/SwingResourceLoader.java b/jsettlers.main.swing/src/main/java/jsettlers/main/swing/SwingResourceLoader.java
similarity index 98%
rename from jsettlers.main.swing/src/main/java/jsettlers/main/swing/resources/SwingResourceLoader.java
rename to jsettlers.main.swing/src/main/java/jsettlers/main/swing/SwingResourceLoader.java
index 9be5a225e2..efcde1dfe1 100644
--- a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/resources/SwingResourceLoader.java
+++ b/jsettlers.main.swing/src/main/java/jsettlers/main/swing/SwingResourceLoader.java
@@ -12,7 +12,9 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*******************************************************************************/
-package jsettlers.main.swing.resources;
+package jsettlers.main.swing;
+
+import java.io.File;
import jsettlers.common.resources.SettlersFolderChecker;
import jsettlers.common.resources.SettlersFolderChecker.SettlersFolderInfo;
@@ -22,11 +24,10 @@
import jsettlers.graphics.sound.SoundManager;
import jsettlers.logic.map.loading.list.MapList;
import jsettlers.logic.map.loading.list.MapList.DefaultMapListFactory;
+import jsettlers.main.swing.resources.ResourceMapLister;
import jsettlers.main.swing.settings.ServerManager;
import jsettlers.main.swing.settings.SettingsManager;
-import java.io.File;
-
/**
* This class just loads the resources and sets up paths needed for jsettlers when used with a swing UI.
*
diff --git a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/lookandfeel/JSettlersLookAndFeelExecption.java b/jsettlers.main.swing/src/main/java/jsettlers/main/swing/lookandfeel/JSettlersLookAndFeelExecption.java
index 91557a85fd..4c0d7d9bad 100644
--- a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/lookandfeel/JSettlersLookAndFeelExecption.java
+++ b/jsettlers.main.swing/src/main/java/jsettlers/main/swing/lookandfeel/JSettlersLookAndFeelExecption.java
@@ -19,7 +19,7 @@
* @author Andreas Eberle
*
*/
-public class JSettlersLookAndFeelExecption extends Exception {
+public class JSettlersLookAndFeelExecption extends RuntimeException {
private static final long serialVersionUID = 4998706762006095932L;
public JSettlersLookAndFeelExecption(Throwable cause) {
diff --git a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/settings/ServerManager.java b/jsettlers.main.swing/src/main/java/jsettlers/main/swing/settings/ServerManager.java
index 79184fef87..69db4571c2 100644
--- a/jsettlers.main.swing/src/main/java/jsettlers/main/swing/settings/ServerManager.java
+++ b/jsettlers.main.swing/src/main/java/jsettlers/main/swing/settings/ServerManager.java
@@ -28,10 +28,8 @@
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Semaphore;
-
import java.util.function.Consumer;
-import javax.swing.AbstractListModel;
import javax.swing.ListModel;
import jsettlers.common.resources.ResourceManager;
diff --git a/jsettlers.logic/src/test/java/jsettlers/algorithms/distances/DistanceCalculationAlgorithmTest.java b/jsettlers.main.swing/src/test/java/jsettlers/main/swing/test/DistanceCalculationAlgorithmTest.java
similarity index 95%
rename from jsettlers.logic/src/test/java/jsettlers/algorithms/distances/DistanceCalculationAlgorithmTest.java
rename to jsettlers.main.swing/src/test/java/jsettlers/main/swing/test/DistanceCalculationAlgorithmTest.java
index f6947e5377..a5699eba3f 100644
--- a/jsettlers.logic/src/test/java/jsettlers/algorithms/distances/DistanceCalculationAlgorithmTest.java
+++ b/jsettlers.main.swing/src/test/java/jsettlers/main/swing/test/DistanceCalculationAlgorithmTest.java
@@ -12,7 +12,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*******************************************************************************/
-package jsettlers.algorithms.distances;
+package jsettlers.main.swing.test;
import static jsettlers.common.buildings.EBuildingType.FISHER;
import static org.junit.Assert.assertTrue;
@@ -22,16 +22,17 @@
import org.junit.BeforeClass;
import org.junit.Test;
+import jsettlers.algorithms.distances.DistancesCalculationAlgorithm;
import jsettlers.common.logging.MilliStopWatch;
-import jsettlers.common.player.ECivilisation;
-import jsettlers.logic.map.loading.data.IMapData;
-import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.common.map.shapes.HexGridArea;
-import jsettlers.testutils.DebugImagesHelper;
+import jsettlers.common.player.ECivilisation;
import jsettlers.common.utils.coordinates.ICoordinatePredicate;
+import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.logic.map.loading.MapLoader;
+import jsettlers.logic.map.loading.data.IMapData;
import jsettlers.logic.map.loading.list.MapList;
-import jsettlers.main.swing.resources.SwingResourceLoader;
+import jsettlers.logic.utils.DebugImagesHelper;
+import jsettlers.main.swing.SwingResourceLoader;
/**
* Created by Andreas Eberle on 06.01.2017.
diff --git a/jsettlers.mapcreator/build.gradle b/jsettlers.mapcreator/build.gradle
index 4d5caf3f19..728dd0fced 100644
--- a/jsettlers.mapcreator/build.gradle
+++ b/jsettlers.mapcreator/build.gradle
@@ -1,5 +1,6 @@
plugins {
id 'application'
+ id 'eclipse'
}
startScripts {
@@ -9,14 +10,8 @@ startScripts {
mainClassName = 'jsettlers.mapcreator.main.MapCreatorApp'
dependencies {
- implementation project(':go.graphics')
- implementation project(':go.graphics.swing')
- implementation project(':jsettlers.common')
- implementation project(':jsettlers.network')
- implementation project(':jsettlers.graphics')
- implementation project(':jsettlers.logic')
- implementation project(':jsettlers.main.swing')
implementation 'javax.xml.bind:jaxb-api:2.3.1'
+ implementation project(':jsettlers.main.swing')
runtimeOnly 'com.sun.xml.bind:jaxb-impl:2.3.2'
runtimeOnly 'com.sun.xml.bind:jaxb-core:2.3.0.1'
diff --git a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/data/objects/BuildingContainer.java b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/data/objects/BuildingContainer.java
index 3b26b94cf7..48edfa8215 100644
--- a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/data/objects/BuildingContainer.java
+++ b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/data/objects/BuildingContainer.java
@@ -28,7 +28,6 @@
import jsettlers.common.mapobject.IMapObject;
import jsettlers.common.material.EPriority;
import jsettlers.common.movable.ESoldierClass;
-import jsettlers.common.player.ECivilisation;
import jsettlers.common.player.IPlayer;
import jsettlers.common.position.RelativePoint;
import jsettlers.common.position.ShortPoint2D;
diff --git a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/main/MapCreatorApp.java b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/main/MapCreatorApp.java
index e8d065fcbc..50c81237ea 100644
--- a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/main/MapCreatorApp.java
+++ b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/main/MapCreatorApp.java
@@ -19,12 +19,9 @@
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
-import jsettlers.common.resources.ResourceManager;
-import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.exceptionhandler.ExceptionHandler;
+import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.main.swing.SwingManagedJSettlers;
-import jsettlers.main.swing.resources.SwingResourceProvider;
-import jsettlers.main.swing.settings.SettingsManager;
import jsettlers.mapcreator.control.EditorControl;
import jsettlers.mapcreator.main.window.EditorFrame;
import jsettlers.mapcreator.main.window.NewFilePanel;
diff --git a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/tools/landscape/FixHeightsTool.java b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/tools/landscape/FixHeightsTool.java
index e35a067de7..95228808bc 100644
--- a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/tools/landscape/FixHeightsTool.java
+++ b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/tools/landscape/FixHeightsTool.java
@@ -20,7 +20,6 @@
import jsettlers.mapcreator.data.MapData;
import jsettlers.mapcreator.data.objects.ObjectContainer;
import jsettlers.mapcreator.mapvalidator.tasks.error.ValidateLandscape;
-import jsettlers.mapcreator.mapvalidator.tasks.error.ValidateResources;
import jsettlers.mapcreator.tools.AbstractTool;
import jsettlers.mapcreator.tools.shapes.ShapeType;
diff --git a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/tools/landscape/PlaceResource.java b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/tools/landscape/PlaceResource.java
index 264cf3bfe6..f19fccd3ef 100644
--- a/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/tools/landscape/PlaceResource.java
+++ b/jsettlers.mapcreator/src/main/java/jsettlers/mapcreator/tools/landscape/PlaceResource.java
@@ -14,19 +14,17 @@
*******************************************************************************/
package jsettlers.mapcreator.tools.landscape;
+import java.util.stream.Stream;
+
import jsettlers.common.landscape.EResourceType;
import jsettlers.common.position.ShortPoint2D;
import jsettlers.graphics.localization.Labels;
import jsettlers.mapcreator.data.MapData;
import jsettlers.mapcreator.localization.EditorLabels;
-import jsettlers.mapcreator.mapvalidator.tasks.error.ValidateResources;
import jsettlers.mapcreator.tools.AbstractTool;
-import jsettlers.mapcreator.tools.icons.ToolIcon;
import jsettlers.mapcreator.tools.shapes.EShapeType;
import jsettlers.mapcreator.tools.shapes.ShapeType;
-import java.util.stream.Stream;
-
/**
* Tool to place resources
*
diff --git a/jsettlers.network/build.gradle b/jsettlers.network/build.gradle
index fb4c439b5b..e936903ca7 100644
--- a/jsettlers.network/build.gradle
+++ b/jsettlers.network/build.gradle
@@ -1,6 +1,7 @@
plugins {
id 'com.github.johnrengelman.shadow' version '5.2.0'
id 'application'
+ id 'eclipse'
}
mainClassName = 'jsettlers.network.server.DedicatedServerApp'
@@ -18,7 +19,3 @@ shadowJar {
archiveBaseName = 'DedicatedJSettlersServer'
classifier = ''
}
-
-dependencies {
- implementation 'com.google.code.gson:gson:2.8.9'
-}
diff --git a/jsettlers.tests/build.gradle b/jsettlers.tests/build.gradle
deleted file mode 100644
index c968ab798b..0000000000
--- a/jsettlers.tests/build.gradle
+++ /dev/null
@@ -1,40 +0,0 @@
-apply plugin: 'java'
-
-// This runs the unit tests and some more validation tests.
-
-test {
- minHeapSize = "128m"
- maxHeapSize = "512m"
- testLogging.showStandardStreams = true
- filter {
- includeTestsMatching '*Test'
- includeTestsMatching '*AutoReplayIT'
- includeTestsMatching '*ReplayValidationIT'
- includeTestsMatching '*AiDifficultiesIT'
- }
-
- environment.put('JSETTLERS_RESOURCES', project(':jsettlers.common').file('resources').getAbsolutePath())
-}
-
-
-sourceSets {
- main {
- java.srcDirs = []
- resources.srcDirs = []
- }
- test {
- java.srcDirs = ['helpers', 'tests.network', 'tests']
- resources.srcDirs = ['resources']
- }
-}
-
-dependencies {
- testImplementation 'junit:junit:4.12'
- testImplementation project(':go.graphics')
- testImplementation project(':go.graphics.swing')
- testImplementation project(':jsettlers.common')
- testImplementation project(':jsettlers.graphics')
- testImplementation project(':jsettlers.logic')
- testImplementation project(':jsettlers.main.swing')
- testImplementation project(':jsettlers.network')
-}
diff --git a/jsettlers.tests/libs/hamcrest-core-1.3.jar b/jsettlers.tests/libs/hamcrest-core-1.3.jar
deleted file mode 100644
index 52ab887c93..0000000000
Binary files a/jsettlers.tests/libs/hamcrest-core-1.3.jar and /dev/null differ
diff --git a/jsettlers.tests/libs/junit-4.11.jar b/jsettlers.tests/libs/junit-4.11.jar
deleted file mode 100644
index aaf7444849..0000000000
Binary files a/jsettlers.tests/libs/junit-4.11.jar and /dev/null differ
diff --git a/jsettlers.tests/tests/jsettlers/mapcreator/mapvalidator/ValidationTest.java_ b/jsettlers.tests/tests/jsettlers/mapcreator/mapvalidator/ValidationTest.java_
deleted file mode 100644
index 6e0d939c7a..0000000000
--- a/jsettlers.tests/tests/jsettlers/mapcreator/mapvalidator/ValidationTest.java_
+++ /dev/null
@@ -1,425 +0,0 @@
-package jsettlers.mapcreator.mapvalidator;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import jsettlers.testutils.TestUtils;
-import jsettlers.common.map.MapLoadException;
-import jsettlers.logic.map.loading.list.IMapListFactory;
-import jsettlers.logic.map.loading.list.MapList;
-import jsettlers.mapcreator.data.MapData;
-import jsettlers.mapcreator.mapvalidator.result.AbstractErrorEntry;
-import jsettlers.mapcreator.mapvalidator.result.ErrorEntry;
-import jsettlers.mapcreator.mapvalidator.result.ValidationList;
-import jsettlers.mapcreator.mapvalidator.tasks.AbstractValidationTask;
-import jsettlers.mapcreator.mapvalidator.tasks.ValidateBlockingBorderPositions;
-import jsettlers.mapcreator.mapvalidator.tasks.ValidateBuildings;
-import jsettlers.mapcreator.mapvalidator.tasks.ValidateDrawBuildingCircle;
-import jsettlers.mapcreator.mapvalidator.tasks.ValidateLandscape;
-import jsettlers.mapcreator.mapvalidator.tasks.ValidatePlayerStartPosition;
-import jsettlers.mapcreator.mapvalidator.tasks.ValidateResources;
-
-/**
- * Unit Test to test Editor map validation
- *
- * @author Andreas Butti
- */
-public class ValidationTest {
-
- private IMapListFactory mapListFactory = new IMapListFactory() {
- @Override
- public MapList getMapList() {
- return new MapList(new File("validationmaps"));
- }
- };
-
- private MapData loadMap(String name) throws MapLoadException {
- MapList mapList = mapListFactory.getMapList();
- return new MapData(mapList.getMapByName(name).getMapData());
- }
-
- private class TestResultListener implements ValidationResultListener {
- private ValidationList list;
-
- @Override
- public void validationFinished(ValidationList list) {
- this.list = list;
- }
- };
-
- private TestResultListener resultListener = new TestResultListener();
-
- /**
- * Checks if the result error list contains this ID
- *
- * @param id
- * ID to check
- * @param contains
- * true: Should contains, false: should not contains
- */
- private void assertListContains(String id, boolean contains) {
- boolean found = false;
- ValidationList l = resultListener.list;
- for (int i = 0; i < l.size(); i++) {
- AbstractErrorEntry e = l.get(i);
- if (!(e instanceof ErrorEntry)) {
- continue;
- }
- ErrorEntry entry = (ErrorEntry) e;
-
- if (entry.getTypeId().equals(id)) {
- found = true;
- break;
- }
- }
-
- if (contains == found) {
- // check passed
- return;
- }
-
- System.out.println("=======================");
- for (int i = 0; i < l.size(); i++) {
- AbstractErrorEntry e = l.get(i);
- if (!(e instanceof ErrorEntry)) {
- continue;
- }
- ErrorEntry entry = (ErrorEntry) e;
-
- System.out.println(entry.getText());
- System.out.println(entry.getTypeId());
- System.out.println("---");
- }
- System.out.println("=======================");
-
- // check failed
- fail("Check \"" + id + "\" " + contains + " failed!");
- }
-
- @Before
- public void setUp() {
- TestUtils.setupResourcesManager();
- }
-
- @Test
- public void testFishOnLand() throws Exception {
- MapData map = loadMap("test_fish_on_land");
-
- // ValidateDrawBuildingCircle
-
- List tasks = new ArrayList<>();
- tasks.add(new ValidateResources());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("resource.text", true);
- }
-
- @Test
- public void testFishValid() throws Exception {
- MapData map = loadMap("test_fish_valid");
-
- List tasks = new ArrayList<>();
- tasks.add(new ValidateResources());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("validation.resource.text", false);
- }
-
- @Test
- public void testGoldOnWater() throws Exception {
- MapData map = loadMap("test_gold_on_water");
-
- List tasks = new ArrayList<>();
- tasks.add(new ValidateResources());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("resource.text", true);
- }
-
- @Test
- public void testGoldValid() throws Exception {
- MapData map = loadMap("test_gold_vald");
-
- List tasks = new ArrayList<>();
- tasks.add(new ValidateResources());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("validation.resource.text", false);
- }
-
- @Test
- public void testPlayerPositionInvalid() throws Exception {
- MapData map = loadMap("test_player_position_invalid");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidatePlayerStartPosition());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("playerstart.text", true);
- }
-
- @Test
- public void testPlayerPositionValid() throws Exception {
- MapData map = loadMap("test_player_position_valid");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidatePlayerStartPosition());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("playerstart.text", false);
- }
-
- @Test
- public void testBlockingBorder() throws Exception {
- MapData map = loadMap("test_blocking_border");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBlockingBorderPositions());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("at-position", true);
- }
-
- @Test
- public void testNoBlockingBorder() throws Exception {
- MapData map = loadMap("test_border_ok");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBlockingBorderPositions());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("at-position", false);
- }
-
- @Test
- @Ignore
- public void testBuildingOutsideMap() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBuildings());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("building.outside-map", true);
- }
-
- @Test
- @Ignore
- public void testBuildingInsideMap() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBuildings());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("building.outside-map", false);
- }
-
- @Test
- @Ignore
- public void testBuildingWrongLandscape() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBuildings());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("building.wrong-landscape", true);
- }
-
- @Test
- @Ignore
- public void testBuildingCorrectLandscape() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBuildings());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("building.wrong-landscape", false);
- }
-
- @Test
- public void testBuildingWrongLand() throws Exception {
- MapData map = loadMap("test_building_wrong_land");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBuildings());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("building.wrong-land", true);
- }
-
- @Test
- public void testBuildingCorrectLand() throws Exception {
- MapData map = loadMap("test_building_correct_land");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBuildings());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("building.wrong-land", false);
- }
-
- /**
- * TODO Create MAP for this Test!
- */
- @Test
- @Ignore
- public void testBuildingOnStone() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBuildings());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("building.flat-ground", true);
- }
-
- /**
- * TODO Create MAP for this Test!
- */
- @Test
- @Ignore
- public void testBuildingOnFlatGround() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- // preparation
- tasks.add(new ValidateDrawBuildingCircle());
- tasks.add(new ValidateBuildings());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("building.flat-ground", false);
- }
-
- /**
- * TODO Create MAP for this Test!
- */
- @Test
- @Ignore
- public void testLandscapeInvalidHeight() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- tasks.add(new ValidateLandscape());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("landscape.height", true);
- }
-
- /**
- * TODO Create MAP for this Test!
- */
- @Test
- @Ignore
- public void testLandscapeValidHeight() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- tasks.add(new ValidateLandscape());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("landscape.height", false);
- }
-
- /**
- * TODO Create MAP for this Test!
- */
- @Test
- @Ignore
- public void testLandscapeInvalidPair() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- tasks.add(new ValidateLandscape());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("landscape.wrong-pair", true);
- }
-
- /**
- * TODO Create MAP for this Test!
- */
- @Test
- @Ignore
- public void testLandscapeValidPair() throws Exception {
- MapData map = loadMap("TODO_xxxxxxxxxxxxxxxx");
-
- List tasks = new ArrayList<>();
- tasks.add(new ValidateLandscape());
- ValidatorRunnable validator = new ValidatorRunnable(resultListener, map, null, tasks);
- validator.run();
-
- assertNotNull(resultListener.list);
- assertListContains("landscape.wrong-pair", false);
- }
-}
diff --git a/jsettlers.tests/validationmaps/maps/test_blocking_border-2016-01-02_10-24-28.map b/jsettlers.tests/validationmaps/maps/test_blocking_border-2016-01-02_10-24-28.map
deleted file mode 100644
index 00f1daef4a..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_blocking_border-2016-01-02_10-24-28.map and /dev/null differ
diff --git a/jsettlers.tests/validationmaps/maps/test_border_ok-2016-01-02_10-24-16.map b/jsettlers.tests/validationmaps/maps/test_border_ok-2016-01-02_10-24-16.map
deleted file mode 100644
index 45fb159215..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_border_ok-2016-01-02_10-24-16.map and /dev/null differ
diff --git a/jsettlers.tests/validationmaps/maps/test_building_correct_land-2016-01-02_10-27-16.map b/jsettlers.tests/validationmaps/maps/test_building_correct_land-2016-01-02_10-27-16.map
deleted file mode 100644
index 4300bf251f..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_building_correct_land-2016-01-02_10-27-16.map and /dev/null differ
diff --git a/jsettlers.tests/validationmaps/maps/test_building_wrong_land-2016-01-02_10-27-47.map b/jsettlers.tests/validationmaps/maps/test_building_wrong_land-2016-01-02_10-27-47.map
deleted file mode 100644
index 3a43a679aa..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_building_wrong_land-2016-01-02_10-27-47.map and /dev/null differ
diff --git a/jsettlers.tests/validationmaps/maps/test_fish_on_land-2016-01-02_09-19-57.map b/jsettlers.tests/validationmaps/maps/test_fish_on_land-2016-01-02_09-19-57.map
deleted file mode 100644
index 77b277667b..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_fish_on_land-2016-01-02_09-19-57.map and /dev/null differ
diff --git a/jsettlers.tests/validationmaps/maps/test_fish_valid-2016-01-02_09-23-30.map b/jsettlers.tests/validationmaps/maps/test_fish_valid-2016-01-02_09-23-30.map
deleted file mode 100644
index 45b4ebe358..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_fish_valid-2016-01-02_09-23-30.map and /dev/null differ
diff --git a/jsettlers.tests/validationmaps/maps/test_gold_on_water-2016-01-02_10-19-52.map b/jsettlers.tests/validationmaps/maps/test_gold_on_water-2016-01-02_10-19-52.map
deleted file mode 100644
index 2e6d07dcd8..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_gold_on_water-2016-01-02_10-19-52.map and /dev/null differ
diff --git a/jsettlers.tests/validationmaps/maps/test_gold_vald-2016-01-02_10-19-26.map b/jsettlers.tests/validationmaps/maps/test_gold_vald-2016-01-02_10-19-26.map
deleted file mode 100644
index 27701cf33a..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_gold_vald-2016-01-02_10-19-26.map and /dev/null differ
diff --git a/jsettlers.tests/validationmaps/maps/test_player_position_invalid-2016-01-02_10-22-59.map b/jsettlers.tests/validationmaps/maps/test_player_position_invalid-2016-01-02_10-22-59.map
deleted file mode 100644
index 87b258e20c..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_player_position_invalid-2016-01-02_10-22-59.map and /dev/null differ
diff --git a/jsettlers.tests/validationmaps/maps/test_player_position_valid-2016-01-02_10-22-41.map b/jsettlers.tests/validationmaps/maps/test_player_position_valid-2016-01-02_10-22-41.map
deleted file mode 100644
index 0ab65530bb..0000000000
Binary files a/jsettlers.tests/validationmaps/maps/test_player_position_valid-2016-01-02_10-22-41.map and /dev/null differ
diff --git a/jsettlers.testutils/build.gradle b/jsettlers.testutils/build.gradle
deleted file mode 100644
index 5cd9747dba..0000000000
--- a/jsettlers.testutils/build.gradle
+++ /dev/null
@@ -1,9 +0,0 @@
-apply plugin: 'java'
-
-dependencies {
- implementation 'junit:junit:4.12'
- implementation project(':jsettlers.common')
- implementation project(':jsettlers.logic')
- implementation project(':jsettlers.network')
- implementation project(':jsettlers.main.swing')
-}
diff --git a/jsettlers.tools/build.gradle b/jsettlers.tools/build.gradle
index 6338e54422..ecfd5a3831 100644
--- a/jsettlers.tools/build.gradle
+++ b/jsettlers.tools/build.gradle
@@ -1,18 +1,12 @@
+apply plugin: 'java'
apply plugin: 'application'
+apply plugin: 'eclipse'
mainClassName = 'jsettlers.ToolsMain'
dependencies {
implementation 'junit:junit:4.12'
- implementation project(':go.graphics')
- implementation project(':go.graphics.swing')
- implementation project(':jsettlers.common')
- implementation project(':jsettlers.graphics')
- implementation project(':jsettlers.logic')
implementation project(':jsettlers.main.swing')
- implementation project(':jsettlers.network')
- implementation project(':jsettlers.testutils')
- implementation project(':jsettlers.tests')
}
jar {
diff --git a/jsettlers.tools/src/main/java/jsettlers/TestToolUtils.java b/jsettlers.tools/src/main/java/jsettlers/TestToolUtils.java
index ceb2c149f6..6b87d5cb09 100644
--- a/jsettlers.tools/src/main/java/jsettlers/TestToolUtils.java
+++ b/jsettlers.tools/src/main/java/jsettlers/TestToolUtils.java
@@ -14,6 +14,8 @@
*/
package jsettlers;
+import java.io.IOException;
+
import jsettlers.common.action.EActionType;
import jsettlers.common.action.PointAction;
import jsettlers.common.ai.EPlayerType;
@@ -25,11 +27,9 @@
import jsettlers.graphics.map.draw.ImageProvider;
import jsettlers.logic.player.Player;
import jsettlers.logic.player.Team;
+import jsettlers.logic.utils.TestUtils;
import jsettlers.main.swing.SwingManagedJSettlers;
import jsettlers.main.swing.lookandfeel.JSettlersLookAndFeelExecption;
-import jsettlers.testutils.TestUtils;
-
-import java.io.IOException;
public class TestToolUtils extends TestUtils {
public static IMapInterfaceConnector openTestWindow(final IGraphicsGrid map) throws JSettlersLookAndFeelExecption, IOException {
diff --git a/jsettlers.tools/src/main/java/jsettlers/algorithms/LandmarksThreadTester.java b/jsettlers.tools/src/main/java/jsettlers/algorithms/LandmarksThreadTester.java
index 7eef8ad674..7ab1b31fe8 100644
--- a/jsettlers.tools/src/main/java/jsettlers/algorithms/LandmarksThreadTester.java
+++ b/jsettlers.tools/src/main/java/jsettlers/algorithms/LandmarksThreadTester.java
@@ -34,7 +34,7 @@
import jsettlers.common.action.PointAction;
import jsettlers.common.player.IPlayer;
import jsettlers.main.swing.lookandfeel.JSettlersLookAndFeelExecption;
-import jsettlers.main.swing.resources.SwingResourceLoader;
+import jsettlers.main.swing.SwingResourceLoader;
public class LandmarksThreadTester {
private static final int WIDTH = 20;
diff --git a/jsettlers.tools/src/main/java/jsettlers/buildingcreator/editor/BuildingCreatorApp.java b/jsettlers.tools/src/main/java/jsettlers/buildingcreator/editor/BuildingCreatorApp.java
index a83a028f93..5a3524a4d1 100644
--- a/jsettlers.tools/src/main/java/jsettlers/buildingcreator/editor/BuildingCreatorApp.java
+++ b/jsettlers.tools/src/main/java/jsettlers/buildingcreator/editor/BuildingCreatorApp.java
@@ -14,7 +14,23 @@
*******************************************************************************/
package jsettlers.buildingcreator.editor;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Comparator;
+import java.util.List;
+
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
import jsettlers.buildingcreator.editor.map.BuildingtestMap;
import jsettlers.buildingcreator.editor.map.PseudoTile;
@@ -37,24 +53,6 @@
import jsettlers.common.position.RelativePoint;
import jsettlers.common.position.ShortPoint2D;
import jsettlers.main.swing.SwingManagedJSettlers;
-import jsettlers.main.swing.lookandfeel.JSettlersLookAndFeelExecption;
-
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.SwingUtilities;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
/**
* This is the main building creator class.
@@ -71,33 +69,29 @@ public class BuildingCreatorApp implements IMapInterfaceListener, Runnable {
@Override
public void run() {
- try {
- EBuildingType type = askType();
- BuildingVariant variant = askVariant(type);
-
- definition = new BuildingDefinition(variant);
- map = new BuildingtestMap(definition);
- for (int x = 0; x < map.getWidth(); x++) {
- for (int y = 0; y < map.getHeight(); y++) {
- reloadColor(new ShortPoint2D(x, y));
- }
+ EBuildingType type = askType();
+ BuildingVariant variant = askVariant(type);
+
+ definition = new BuildingDefinition(variant);
+ map = new BuildingtestMap(definition);
+ for (int x = 0; x < map.getWidth(); x++) {
+ for (int y = 0; y < map.getHeight(); y++) {
+ reloadColor(new ShortPoint2D(x, y));
}
+ }
- IMapInterfaceConnector connector = startMapWindow();
- connector.addListener(this);
+ IMapInterfaceConnector connector = startMapWindow();
+ connector.addListener(this);
- JPanel menu = generateMenu();
+ JPanel menu = generateMenu();
- window = new JFrame("Edit " + variant.toString());
- window.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
- window.add(menu);
- window.pack();
- window.setVisible(true);
+ window = new JFrame("Edit " + variant.toString());
+ window.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
+ window.add(menu);
+ window.pack();
+ window.setVisible(true);
- connector.fireAction(new Action(EActionType.TOGGLE_DEBUG));
- } catch (JSettlersLookAndFeelExecption e) {
- throw new RuntimeException(e);
- }
+ connector.fireAction(new Action(EActionType.TOGGLE_DEBUG));
}
private JPanel generateMenu() {
@@ -113,7 +107,7 @@ private JPanel generateMenu() {
return menu;
}
- private IMapInterfaceConnector startMapWindow() throws JSettlersLookAndFeelExecption {
+ private IMapInterfaceConnector startMapWindow() {
return SwingManagedJSettlers.showJSettlers(new FakeMapGame(map));
}
diff --git a/jsettlers.tools/src/main/java/jsettlers/buildingcreator/editor/map/PseudoBuilding.java b/jsettlers.tools/src/main/java/jsettlers/buildingcreator/editor/map/PseudoBuilding.java
index 7a971dbac2..358b21b41c 100644
--- a/jsettlers.tools/src/main/java/jsettlers/buildingcreator/editor/map/PseudoBuilding.java
+++ b/jsettlers.tools/src/main/java/jsettlers/buildingcreator/editor/map/PseudoBuilding.java
@@ -18,7 +18,6 @@
import java.util.List;
import jsettlers.common.buildings.BuildingVariant;
-import jsettlers.common.buildings.EBuildingType;
import jsettlers.common.buildings.IBuilding;
import jsettlers.common.buildings.IBuildingMaterial;
import jsettlers.common.mapobject.EMapObjectType;
diff --git a/jsettlers.tools/src/main/java/jsettlers/graphics/debug/DatFileTester.java b/jsettlers.tools/src/main/java/jsettlers/graphics/debug/DatFileTester.java
index 5fc2179be9..4659fd85bb 100644
--- a/jsettlers.tools/src/main/java/jsettlers/graphics/debug/DatFileTester.java
+++ b/jsettlers.tools/src/main/java/jsettlers/graphics/debug/DatFileTester.java
@@ -14,9 +14,21 @@
*******************************************************************************/
package jsettlers.graphics.debug;
+import java.awt.Dimension;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Locale;
+
+import javax.imageio.ImageIO;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.WindowConstants;
+
import go.graphics.EPrimitiveType;
import go.graphics.GLDrawContext;
-import go.graphics.IllegalBufferException;
import go.graphics.UnifiedDrawHandle;
import go.graphics.area.Area;
import go.graphics.event.GOEvent;
@@ -29,31 +41,19 @@
import jsettlers.common.Color;
import jsettlers.common.resources.ResourceManager;
import jsettlers.common.resources.SettlersFolderChecker;
+import jsettlers.common.resources.SwingResourceProvider;
import jsettlers.common.utils.FileUtils;
import jsettlers.common.utils.mutables.Mutable;
-import jsettlers.graphics.image.SingleImage;
import jsettlers.graphics.image.Image;
import jsettlers.graphics.image.SettlerImage;
+import jsettlers.graphics.image.SingleImage;
import jsettlers.graphics.image.reader.AdvancedDatFileReader;
import jsettlers.graphics.image.reader.DatFileReader;
import jsettlers.graphics.image.reader.DatFileType;
-import jsettlers.graphics.image.sequence.SequenceList;
import jsettlers.graphics.image.sequence.Sequence;
-import jsettlers.main.swing.resources.SwingResourceProvider;
+import jsettlers.graphics.image.sequence.SequenceList;
import jsettlers.main.swing.settings.SettingsManager;
-import javax.imageio.ImageIO;
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-import javax.swing.WindowConstants;
-import java.awt.Dimension;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Locale;
-
public class DatFileTester {
private static final int DAT_FILE_INDEX = 13;
private static final DatFileType TYPE = DatFileType.RGB565;
diff --git a/jsettlers.tools/src/main/java/jsettlers/graphics/test/TestBuilding.java b/jsettlers.tools/src/main/java/jsettlers/graphics/test/TestBuilding.java
index 4d98f40755..f55e2df898 100644
--- a/jsettlers.tools/src/main/java/jsettlers/graphics/test/TestBuilding.java
+++ b/jsettlers.tools/src/main/java/jsettlers/graphics/test/TestBuilding.java
@@ -18,7 +18,6 @@
import java.util.List;
import jsettlers.common.buildings.BuildingVariant;
-import jsettlers.common.buildings.EBuildingType;
import jsettlers.common.buildings.IBuilding;
import jsettlers.common.buildings.IBuildingMaterial;
import jsettlers.common.mapobject.EMapObjectType;
diff --git a/jsettlers.tools/src/main/java/jsettlers/graphics/test/WindowTest.java b/jsettlers.tools/src/main/java/jsettlers/graphics/test/WindowTest.java
index da919cc8a3..7d4808b8b4 100644
--- a/jsettlers.tools/src/main/java/jsettlers/graphics/test/WindowTest.java
+++ b/jsettlers.tools/src/main/java/jsettlers/graphics/test/WindowTest.java
@@ -19,8 +19,8 @@
import jsettlers.TestToolUtils;
import jsettlers.common.menu.IMapInterfaceConnector;
import jsettlers.input.SelectionSet;
+import jsettlers.main.swing.SwingResourceLoader;
import jsettlers.main.swing.lookandfeel.JSettlersLookAndFeelExecption;
-import jsettlers.main.swing.resources.SwingResourceLoader;
public class WindowTest {
diff --git a/jsettlers.tools/src/main/java/jsettlers/integration/replay/RegenerateAutoReplayITReferences.java b/jsettlers.tools/src/main/java/jsettlers/integration/replay/RegenerateAutoReplayITReferences.java
index ce42dda14d..d84c38395a 100644
--- a/jsettlers.tools/src/main/java/jsettlers/integration/replay/RegenerateAutoReplayITReferences.java
+++ b/jsettlers.tools/src/main/java/jsettlers/integration/replay/RegenerateAutoReplayITReferences.java
@@ -20,13 +20,13 @@
import java.nio.file.StandardCopyOption;
import jsettlers.common.CommonConstants;
-import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.logic.constants.Constants;
+import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.logic.map.loading.MapLoader;
+import jsettlers.logic.replay.AutoReplaySetting;
+import jsettlers.logic.utils.MapUtils;
+import jsettlers.logic.utils.TestUtils;
import jsettlers.main.replay.ReplayUtils;
-import jsettlers.main.swing.resources.SwingResourceLoader;
-import jsettlers.testutils.TestUtils;
-import jsettlers.testutils.map.MapUtils;
/**
* Created by Andreas Eberle on 23.04.2016.
diff --git a/jsettlers.tools/src/main/java/jsettlers/logic/map/grid/TestExecutionWithDebugDisplay.java b/jsettlers.tools/src/main/java/jsettlers/logic/map/grid/TestExecutionWithDebugDisplay.java
index 40ed28cb5b..7d915b709d 100644
--- a/jsettlers.tools/src/main/java/jsettlers/logic/map/grid/TestExecutionWithDebugDisplay.java
+++ b/jsettlers.tools/src/main/java/jsettlers/logic/map/grid/TestExecutionWithDebugDisplay.java
@@ -20,13 +20,13 @@
import jsettlers.TestToolUtils;
import jsettlers.common.Color;
import jsettlers.common.map.EDebugColorModes;
-import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.logic.constants.MatchConstants;
import jsettlers.logic.map.grid.partition.PartitionsGrid;
+import jsettlers.logic.map.loading.MapLoadException;
import jsettlers.logic.map.loading.list.MapList;
import jsettlers.main.swing.SwingManagedJSettlers;
+import jsettlers.main.swing.SwingResourceLoader;
import jsettlers.main.swing.lookandfeel.JSettlersLookAndFeelExecption;
-import jsettlers.main.swing.resources.SwingResourceLoader;
import jsettlers.network.synchronic.timer.NetworkTimer;
public class TestExecutionWithDebugDisplay {
diff --git a/jsettlers.tools/src/main/java/jsettlers/logic/map/grid/partition/PartitionsGridTestingWnd.java b/jsettlers.tools/src/main/java/jsettlers/logic/map/grid/partition/PartitionsGridTestingWnd.java
index f92248c5b2..39be3b13df 100644
--- a/jsettlers.tools/src/main/java/jsettlers/logic/map/grid/partition/PartitionsGridTestingWnd.java
+++ b/jsettlers.tools/src/main/java/jsettlers/logic/map/grid/partition/PartitionsGridTestingWnd.java
@@ -16,11 +16,13 @@
import java.io.IOException;
import java.util.BitSet;
-
import java.util.Objects;
+
import jsettlers.TestToolUtils;
import jsettlers.common.Color;
import jsettlers.common.CommonConstants;
+import jsettlers.common.action.Action;
+import jsettlers.common.action.EActionType;
import jsettlers.common.buildings.BuildingVariant;
import jsettlers.common.buildings.EBuildingType;
import jsettlers.common.landscape.ELandscapeType;
@@ -34,16 +36,14 @@
import jsettlers.common.map.shapes.MapCircle;
import jsettlers.common.mapobject.IMapObject;
import jsettlers.common.menu.IMapInterfaceConnector;
-import jsettlers.common.action.EActionType;
import jsettlers.common.movable.EDirection;
import jsettlers.common.movable.IGraphicsMovable;
import jsettlers.common.player.ECivilisation;
import jsettlers.common.player.IPlayer;
import jsettlers.common.position.ShortPoint2D;
-import jsettlers.common.action.Action;
import jsettlers.logic.player.PlayerSetting;
+import jsettlers.main.swing.SwingResourceLoader;
import jsettlers.main.swing.lookandfeel.JSettlersLookAndFeelExecption;
-import jsettlers.main.swing.resources.SwingResourceLoader;
public class PartitionsGridTestingWnd {
diff --git a/jsettlers.tools/src/main/java/jsettlers/logic/movable/MovableTestWindow.java b/jsettlers.tools/src/main/java/jsettlers/logic/movable/MovableTestWindow.java
index b1af2a3ac0..dd0d29d8d3 100644
--- a/jsettlers.tools/src/main/java/jsettlers/logic/movable/MovableTestWindow.java
+++ b/jsettlers.tools/src/main/java/jsettlers/logic/movable/MovableTestWindow.java
@@ -17,6 +17,7 @@
import java.io.IOException;
import jsettlers.TestToolUtils;
+import jsettlers.common.action.EMoveToType;
import jsettlers.common.action.MoveToAction;
import jsettlers.common.ai.EPlayerType;
import jsettlers.common.material.EMaterialType;
@@ -31,10 +32,9 @@
import jsettlers.logic.player.Player;
import jsettlers.logic.player.Team;
import jsettlers.logic.timer.RescheduleTimer;
+import jsettlers.main.swing.SwingResourceLoader;
import jsettlers.main.swing.lookandfeel.JSettlersLookAndFeelExecption;
-import jsettlers.main.swing.resources.SwingResourceLoader;
import jsettlers.network.synchronic.timer.NetworkTimer;
-import jsettlers.common.action.EMoveToType;
public class MovableTestWindow {
private static final Player PLAYER_0 = new Player((byte) 0, new Team((byte) 0), (byte) 1, EPlayerType.HUMAN, ECivilisation.ROMAN);
diff --git a/settings.gradle b/settings.gradle
index 8579d60369..7bcb958368 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -11,8 +11,6 @@ include ':jsettlers.logic'
include ':jsettlers.main.swing'
include ':jsettlers.mapcreator'
include ':jsettlers.network'
-include ':jsettlers.tests'
-include ':jsettlers.testutils'
include ':jsettlers.tools'
// Android projects