diff --git a/.gitignore b/.gitignore index c9bc61a..8c501e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ bin .DS_Store .idea +.gradle +.eclipse .settings *.iml classes diff --git a/android/src/main/AndroidManifest.xml b/android/AndroidManifest.xml similarity index 69% rename from android/src/main/AndroidManifest.xml rename to android/AndroidManifest.xml index eb3dc6e..435d2a8 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -7,16 +7,16 @@ - + - - - + + + diff --git a/android/build.gradle b/android/build.gradle index 342cde9..7f82b3d 100755 --- a/android/build.gradle +++ b/android/build.gradle @@ -31,6 +31,19 @@ version = '0.3' // Androids!!! android { compileSdkVersion 14 + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aild.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + } + + instrumentTest.setRoot('tests') + } } // Setup build script repositories starting with Maven repositories @@ -43,4 +56,5 @@ repositories { // Dependency management dependencies { compile project(':core') -} \ No newline at end of file + //compile 'org.slf4j:slf4j-android:1.6.1-RC1' +} diff --git a/android/src/main/proguard.cfg b/android/proguard.cfg similarity index 100% rename from android/src/main/proguard.cfg rename to android/proguard.cfg diff --git a/android/src/main/project.properties b/android/project.properties similarity index 100% rename from android/src/main/project.properties rename to android/project.properties diff --git a/android/src/main/res/drawable-hdpi/attack_king.png b/android/res/drawable-hdpi/attack_king.png similarity index 100% rename from android/src/main/res/drawable-hdpi/attack_king.png rename to android/res/drawable-hdpi/attack_king.png diff --git a/android/src/main/res/drawable-hdpi/attack_pawn.png b/android/res/drawable-hdpi/attack_pawn.png similarity index 100% rename from android/src/main/res/drawable-hdpi/attack_pawn.png rename to android/res/drawable-hdpi/attack_pawn.png diff --git a/android/src/main/res/drawable-hdpi/backdrop.jpg b/android/res/drawable-hdpi/backdrop.jpg similarity index 100% rename from android/src/main/res/drawable-hdpi/backdrop.jpg rename to android/res/drawable-hdpi/backdrop.jpg diff --git a/android/src/main/res/drawable-hdpi/defend_king.png b/android/res/drawable-hdpi/defend_king.png similarity index 100% rename from android/src/main/res/drawable-hdpi/defend_king.png rename to android/res/drawable-hdpi/defend_king.png diff --git a/android/src/main/res/drawable-hdpi/defend_pawn.png b/android/res/drawable-hdpi/defend_pawn.png similarity index 100% rename from android/src/main/res/drawable-hdpi/defend_pawn.png rename to android/res/drawable-hdpi/defend_pawn.png diff --git a/android/src/main/res/drawable-hdpi/icon.png b/android/res/drawable-hdpi/icon.png similarity index 100% rename from android/src/main/res/drawable-hdpi/icon.png rename to android/res/drawable-hdpi/icon.png diff --git a/android/src/main/res/drawable-hdpi/idea.png b/android/res/drawable-hdpi/idea.png similarity index 100% rename from android/src/main/res/drawable-hdpi/idea.png rename to android/res/drawable-hdpi/idea.png diff --git a/android/src/main/res/drawable-hdpi/logo.png b/android/res/drawable-hdpi/logo.png similarity index 100% rename from android/src/main/res/drawable-hdpi/logo.png rename to android/res/drawable-hdpi/logo.png diff --git a/android/src/main/res/drawable-hdpi/non_play.png b/android/res/drawable-hdpi/non_play.png similarity index 100% rename from android/src/main/res/drawable-hdpi/non_play.png rename to android/res/drawable-hdpi/non_play.png diff --git a/android/src/main/res/drawable-hdpi/play.png b/android/res/drawable-hdpi/play.png similarity index 100% rename from android/src/main/res/drawable-hdpi/play.png rename to android/res/drawable-hdpi/play.png diff --git a/android/src/main/res/drawable-hdpi/splash.jpg b/android/res/drawable-hdpi/splash.jpg similarity index 100% rename from android/src/main/res/drawable-hdpi/splash.jpg rename to android/res/drawable-hdpi/splash.jpg diff --git a/android/src/main/res/drawable-ldpi/icon.png b/android/res/drawable-ldpi/icon.png similarity index 100% rename from android/src/main/res/drawable-ldpi/icon.png rename to android/res/drawable-ldpi/icon.png diff --git a/android/src/main/res/drawable-mdpi/icon.png b/android/res/drawable-mdpi/icon.png similarity index 100% rename from android/src/main/res/drawable-mdpi/icon.png rename to android/res/drawable-mdpi/icon.png diff --git a/android/src/main/res/layout/game_screen_landscape.xml b/android/res/layout/game_screen_landscape.xml similarity index 100% rename from android/src/main/res/layout/game_screen_landscape.xml rename to android/res/layout/game_screen_landscape.xml diff --git a/android/src/main/res/layout/game_screen_portrait.xml b/android/res/layout/game_screen_portrait.xml similarity index 100% rename from android/src/main/res/layout/game_screen_portrait.xml rename to android/res/layout/game_screen_portrait.xml diff --git a/android/src/main/res/layout/info_screen.xml b/android/res/layout/info_screen.xml similarity index 100% rename from android/src/main/res/layout/info_screen.xml rename to android/res/layout/info_screen.xml diff --git a/android/src/main/res/layout/main_menu.xml b/android/res/layout/main_menu.xml similarity index 100% rename from android/src/main/res/layout/main_menu.xml rename to android/res/layout/main_menu.xml diff --git a/android/src/main/res/layout/settings_screen.xml b/android/res/layout/settings_screen.xml similarity index 100% rename from android/src/main/res/layout/settings_screen.xml rename to android/res/layout/settings_screen.xml diff --git a/android/src/main/res/raw/gpl_3_license.txt b/android/res/raw/gpl_3_license.txt similarity index 100% rename from android/src/main/res/raw/gpl_3_license.txt rename to android/res/raw/gpl_3_license.txt diff --git a/android/src/main/res/raw/readme.txt b/android/res/raw/readme.txt similarity index 100% rename from android/src/main/res/raw/readme.txt rename to android/res/raw/readme.txt diff --git a/android/src/main/res/values/strings.xml b/android/res/values/strings.xml similarity index 100% rename from android/src/main/res/values/strings.xml rename to android/res/values/strings.xml diff --git a/android/src/main/res/values/user_interface_en.xml b/android/res/values/user_interface_en.xml similarity index 100% rename from android/src/main/res/values/user_interface_en.xml rename to android/res/values/user_interface_en.xml diff --git a/android/src/main/res/values/user_interface_template.xml b/android/res/values/user_interface_template.xml similarity index 100% rename from android/src/main/res/values/user_interface_template.xml rename to android/res/values/user_interface_template.xml diff --git a/android/src/main/java/org/justcheckers/android/GameActivity.java b/android/src/org/justcheckers/android/GameActivity.java similarity index 100% rename from android/src/main/java/org/justcheckers/android/GameActivity.java rename to android/src/org/justcheckers/android/GameActivity.java diff --git a/android/src/main/java/org/justcheckers/android/InfoActivity.java b/android/src/org/justcheckers/android/InfoActivity.java similarity index 100% rename from android/src/main/java/org/justcheckers/android/InfoActivity.java rename to android/src/org/justcheckers/android/InfoActivity.java diff --git a/android/src/main/java/org/justcheckers/android/MenuActivity.java b/android/src/org/justcheckers/android/MenuActivity.java similarity index 100% rename from android/src/main/java/org/justcheckers/android/MenuActivity.java rename to android/src/org/justcheckers/android/MenuActivity.java diff --git a/android/src/main/java/org/justcheckers/android/SettingsActivity.java b/android/src/org/justcheckers/android/SettingsActivity.java similarity index 100% rename from android/src/main/java/org/justcheckers/android/SettingsActivity.java rename to android/src/org/justcheckers/android/SettingsActivity.java diff --git a/core/src/test/java/org/justcheckers/test/game/AmericanGameTest.java b/core/src/test/java/org/justcheckers/test/game/AmericanGameTest.java index 92d7d43..45db1b8 100644 --- a/core/src/test/java/org/justcheckers/test/game/AmericanGameTest.java +++ b/core/src/test/java/org/justcheckers/test/game/AmericanGameTest.java @@ -20,7 +20,7 @@ along with justCheckers. If not, see . *****************************************************************************/ -package main.java.org.justcheckers.test.game; +package org.justcheckers.test.game; /** * Regression test for a game of checkers played according to American rules. diff --git a/core/src/test/java/org/justcheckers/test/game/GameLogicTest.java b/core/src/test/java/org/justcheckers/test/game/GameLogicTest.java index b750285..496d655 100644 --- a/core/src/test/java/org/justcheckers/test/game/GameLogicTest.java +++ b/core/src/test/java/org/justcheckers/test/game/GameLogicTest.java @@ -19,7 +19,7 @@ along with justCheckers. If not, see . *****************************************************************************/ -package main.java.org.justcheckers.test.game; +package org.justcheckers.test.game; /** * Test the game engine logic. Tests if the game engine can manipulate the diff --git a/core/src/test/java/org/justcheckers/test/game/GameStateTest.java b/core/src/test/java/org/justcheckers/test/game/GameStateTest.java index b77d7a5..aba3663 100644 --- a/core/src/test/java/org/justcheckers/test/game/GameStateTest.java +++ b/core/src/test/java/org/justcheckers/test/game/GameStateTest.java @@ -23,6 +23,9 @@ package org.justcheckers.test.game; import org.justcheckers.game.Game; import org.justcheckers.game.Rulebook; +import org.testng.Assert; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; /** * Test the game state logic. Tests the NQPOJO (not quite plain old Java @@ -43,7 +46,7 @@ public class GameStateTest { * Sets up a rather plain game of checkers. Game is based on the American * rules, to make life easier. */ - //@BeforeClass + @BeforeClass public void setUp() { this.testGame = new Game(); } @@ -51,11 +54,11 @@ public class GameStateTest { /** * Test the rulebook of a default initialized game. */ - //@Test + @Test public void testDefaultRulebookSetup() { Rulebook testRules = this.testGame.getGameRules(); - junit.framework.Assert.assertNull(testRules); + Assert.assertNull(testRules); //TODO: Test the ruleset that is gets initialized properly. } diff --git a/core/src/test/java/org/justcheckers/test/game/InternationalGameTest.java b/core/src/test/java/org/justcheckers/test/game/InternationalGameTest.java index 606a4f5..28c5883 100644 --- a/core/src/test/java/org/justcheckers/test/game/InternationalGameTest.java +++ b/core/src/test/java/org/justcheckers/test/game/InternationalGameTest.java @@ -20,7 +20,7 @@ along with justCheckers. If not, see . *****************************************************************************/ -package main.java.org.justcheckers.test.game; +package org.justcheckers.test.game; /** * Regression test for a game of checkers played according to International diff --git a/web/build.gradle b/web/build.gradle index 44d1129..2ba7c5e 100755 --- a/web/build.gradle +++ b/web/build.gradle @@ -9,8 +9,6 @@ http://www.gradle.org/docs/current/userguide/userguide_single.html */ -apply plugin: 'java' - sourceCompatibility = 1.6 targetCompatibility = 1.6 @@ -34,14 +32,9 @@ project.ext { appBaseName = "justcheckers" hibernateVersion = '3.5.4-Final' - slf4jVersion = '1.6.0' + slf4jVersion = '1.7.5' springVersion = '3.1.3.RELEASE' } - -// Setup everything to work with the Eclipse friendly Web setup. -//sourceSets.main.java.srcDirs = ['src', 'gen'] -//sourceSets.main.resources.srcDirs = ['res'] -//sourceSets.test.java.srcDirs = ['test-src'] // Setup build script repositories starting with Maven repositories repositories { @@ -53,12 +46,10 @@ repositories { // Dependency management dependencies { - //compile 'org.jdom:jdom:1.1' - //compile 'jdom:jdom:0.9' - compile 'jdom:jdom:0.7' + compile project(':core') // Spring Framework + SLF4J - /*compile ('org.springframework:spring-context:' + project.springVersion) { + compile ('org.springframework:spring-context:' + project.springVersion) { exclude module: 'commons-logging' } compile 'log4j:log4j:1.2.16' @@ -70,29 +61,21 @@ dependencies { compile 'org.springframework:spring-orm:' + project.springVersion compile 'org.springframework:spring-webmvc:' + project.springVersion compile 'org.springframework:spring-parent:' + project.springVersion - */ -//compile 'mysql:mysql-connector-java:5.1.22' // xstream - //compile 'com.thoughtworks.xstream:xstream:1.4.4' + compile 'com.thoughtworks.xstream:xstream:1.4.4' // Hibernate + C3P0 -/* compile 'org.hibernate:hibernate:' + project.hibernateVersion compile 'org.hibernate:hibernate-annotations:' + project.hibernateVersion compile 'org.hibernate:hibernate-c3p0:' + project.hibernateVersion compile 'javassist:javassist:3.9.0.GA' -*/ - - // Apache Commons Libraries - //compile 'commons-httpclient:commons-httpclient:3.1' - //compile 'commons-lang:commons-lang:2.4' // FlexJson -// compile 'net.sf.flexjson:flexjson:2.1' + compile 'net.sf.flexjson:flexjson:2.1' // Javax Servlet and Mail APIs - //providedCompile 'javax.servlet:servlet-api:2.5' + providedCompile 'javax.servlet:servlet-api:2.5' } // At the end of day we just need a JAR and a WAR.