diff --git a/.gitattributes b/.gitattributes index 8974427e4ae..78153643c11 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,6 +6,7 @@ .settings/net.sf.jautodoc.prefs -text .settings/org.eclipse.jdt.core.prefs -text .settings/org.eclipse.jdt.ui.prefs -text +/AppIcon.png -text forge-ai/.classpath -text forge-ai/.project -text forge-ai/.settings/org.eclipse.core.resources.prefs -text @@ -634,28 +635,26 @@ forge-game/src/main/java/forge/util/package-info.java -text forge-gui-android/.classpath -text forge-gui-android/.project -text forge-gui-android/.settings/org.eclipse.jdt.core.prefs -text +forge-gui-android/.settings/org.eclipse.m2e.core.prefs -text forge-gui-android/AndroidManifest.xml -text -forge-gui-android/gen/com/forge/BuildConfig.java -text -forge-gui-android/gen/com/forge/R.java -text +forge-gui-android/assets/data/Thumbs.db -text +forge-gui-android/assets/data/libgdx.png -text +forge-gui-android/gen/forge/view/BuildConfig.java -text +forge-gui-android/gen/forge/view/R.java -text forge-gui-android/ic_launcher-web.png -text forge-gui-android/libs/android-support-v4.jar -text +forge-gui-android/libs/gdx-backend-android-sources.jar -text forge-gui-android/libs/gdx-backend-android.jar -text -forge-gui-android/proguard-project.txt -text +forge-gui-android/lint.xml -text +forge-gui-android/proguard.cfg -text forge-gui-android/project.properties -text forge-gui-android/res/drawable-hdpi/ic_launcher.png -text forge-gui-android/res/drawable-mdpi/ic_launcher.png -text forge-gui-android/res/drawable-xhdpi/ic_launcher.png -text forge-gui-android/res/drawable-xxhdpi/ic_launcher.png -text -forge-gui-android/res/layout/activity_main.xml -text -forge-gui-android/res/menu/main.xml -text -forge-gui-android/res/values-sw600dp/dimens.xml -text -forge-gui-android/res/values-sw720dp-land/dimens.xml -text -forge-gui-android/res/values-v11/styles.xml -text -forge-gui-android/res/values-v14/styles.xml -text -forge-gui-android/res/values/dimens.xml -text +forge-gui-android/res/layout/main.xml -text forge-gui-android/res/values/strings.xml -text -forge-gui-android/res/values/styles.xml -text -forge-gui-android/src/com/forge/Main.java -text +forge-gui-android/src/forge/view/Main.java -text forge-gui-desktop/.classpath -text forge-gui-desktop/.project -text forge-gui-desktop/.settings/org.eclipse.core.resources.prefs -text diff --git a/AppIcon.png b/AppIcon.png new file mode 100644 index 00000000000..5c2474cea32 Binary files /dev/null and b/AppIcon.png differ diff --git a/forge-gui-android/.classpath b/forge-gui-android/.classpath index ef62de6be3e..ffea4a5130b 100644 --- a/forge-gui-android/.classpath +++ b/forge-gui-android/.classpath @@ -1,14 +1,22 @@ - - + + + + + + + + + - - - - - + + + + + + diff --git a/forge-gui-android/.project b/forge-gui-android/.project index 52c60f726af..8b985f928f3 100644 --- a/forge-gui-android/.project +++ b/forge-gui-android/.project @@ -1,6 +1,6 @@ - forge-gui-android + forge-android @@ -30,17 +30,4 @@ com.android.ide.eclipse.adt.AndroidNature org.eclipse.jdt.core.javanature - - - assets - 2 - copy_PARENT/forge-gui/res - - - - - copy_PARENT - $%7BPARENT-1-PROJECT_LOC%7D/trunk - - diff --git a/forge-gui-android/.settings/org.eclipse.jdt.core.prefs b/forge-gui-android/.settings/org.eclipse.jdt.core.prefs index 48ab4c6b113..8626026241c 100644 --- a/forge-gui-android/.settings/org.eclipse.jdt.core.prefs +++ b/forge-gui-android/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/forge-gui-android/.settings/org.eclipse.m2e.core.prefs b/forge-gui-android/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 00000000000..14b697b7bbb --- /dev/null +++ b/forge-gui-android/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/forge-gui-android/AndroidManifest.xml b/forge-gui-android/AndroidManifest.xml index d7ef7c491e9..f49c019391b 100644 --- a/forge-gui-android/AndroidManifest.xml +++ b/forge-gui-android/AndroidManifest.xml @@ -1,20 +1,19 @@ + android:targetSdkVersion="19" /> + android:label="@string/app_name" > diff --git a/forge-gui-android/assets/data/Thumbs.db b/forge-gui-android/assets/data/Thumbs.db new file mode 100644 index 00000000000..9d7f2071357 Binary files /dev/null and b/forge-gui-android/assets/data/Thumbs.db differ diff --git a/forge-gui-android/assets/data/libgdx.png b/forge-gui-android/assets/data/libgdx.png new file mode 100644 index 00000000000..8cd285aa579 Binary files /dev/null and b/forge-gui-android/assets/data/libgdx.png differ diff --git a/forge-gui-android/gen/com/forge/R.java b/forge-gui-android/gen/com/forge/R.java deleted file mode 100644 index f3d4fd9669a..00000000000 --- a/forge-gui-android/gen/com/forge/R.java +++ /dev/null @@ -1,68 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package com.forge; - -public final class R { - public static final class attr { - } - public static final class dimen { - /** Default screen margins, per the Android Design guidelines. - - Customize dimensions originally defined in res/values/dimens.xml (such as - screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. - - */ - public static final int activity_horizontal_margin=0x7f040000; - public static final int activity_vertical_margin=0x7f040001; - } - public static final class drawable { - public static final int ic_launcher=0x7f020000; - } - public static final class id { - public static final int action_settings=0x7f080000; - } - public static final class layout { - public static final int activity_main=0x7f030000; - } - public static final class menu { - public static final int main=0x7f070000; - } - public static final class string { - public static final int action_settings=0x7f050001; - public static final int app_name=0x7f050000; - public static final int hello_world=0x7f050002; - } - public static final class style { - /** - Base application theme, dependent on API level. This theme is replaced - by AppBaseTheme from res/values-vXX/styles.xml on newer devices. - - - Theme customizations available in newer API levels can go in - res/values-vXX/styles.xml, while customizations related to - backward-compatibility can go here. - - - Base application theme for API 11+. This theme completely replaces - AppBaseTheme from res/values/styles.xml on API 11+ devices. - - API 11 theme customizations can go here. - - Base application theme for API 14+. This theme completely replaces - AppBaseTheme from BOTH res/values/styles.xml and - res/values-v11/styles.xml on API 14+ devices. - - API 14 theme customizations can go here. - */ - public static final int AppBaseTheme=0x7f060000; - /** Application theme. - All customizations that are NOT specific to a particular API-level can go here. - */ - public static final int AppTheme=0x7f060001; - } -} diff --git a/forge-gui-android/gen/com/forge/BuildConfig.java b/forge-gui-android/gen/forge/view/BuildConfig.java similarity index 86% rename from forge-gui-android/gen/com/forge/BuildConfig.java rename to forge-gui-android/gen/forge/view/BuildConfig.java index ee06be68fc1..df23f242841 100644 --- a/forge-gui-android/gen/com/forge/BuildConfig.java +++ b/forge-gui-android/gen/forge/view/BuildConfig.java @@ -1,5 +1,5 @@ /** Automatically generated file. DO NOT MODIFY */ -package com.forge; +package forge.view; public final class BuildConfig { public final static boolean DEBUG = true; diff --git a/forge-gui-android/gen/forge/view/R.java b/forge-gui-android/gen/forge/view/R.java new file mode 100644 index 00000000000..b835e6d2148 --- /dev/null +++ b/forge-gui-android/gen/forge/view/R.java @@ -0,0 +1,22 @@ +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package forge.view; + +public final class R { + public static final class attr { + } + public static final class drawable { + public static final int ic_launcher=0x7f020000; + } + public static final class layout { + public static final int main=0x7f030000; + } + public static final class string { + public static final int app_name=0x7f040000; + } +} diff --git a/forge-gui-android/ic_launcher-web.png b/forge-gui-android/ic_launcher-web.png index a18cbb48c43..d02e01d1b7d 100644 Binary files a/forge-gui-android/ic_launcher-web.png and b/forge-gui-android/ic_launcher-web.png differ diff --git a/forge-gui-android/libs/android-support-v4.jar b/forge-gui-android/libs/android-support-v4.jar index 96644edbead..187bdf48b1d 100644 Binary files a/forge-gui-android/libs/android-support-v4.jar and b/forge-gui-android/libs/android-support-v4.jar differ diff --git a/forge-gui-android/libs/gdx-backend-android-sources.jar b/forge-gui-android/libs/gdx-backend-android-sources.jar new file mode 100644 index 00000000000..fa061f21760 Binary files /dev/null and b/forge-gui-android/libs/gdx-backend-android-sources.jar differ diff --git a/forge-gui-android/lint.xml b/forge-gui-android/lint.xml new file mode 100644 index 00000000000..ee0eead5bb7 --- /dev/null +++ b/forge-gui-android/lint.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/forge-gui-android/proguard-project.txt b/forge-gui-android/proguard-project.txt deleted file mode 100644 index f2fe1559a21..00000000000 --- a/forge-gui-android/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/forge-gui-android/proguard.cfg b/forge-gui-android/proguard.cfg new file mode 100644 index 00000000000..b1cdf17b5bb --- /dev/null +++ b/forge-gui-android/proguard.cfg @@ -0,0 +1,40 @@ +-optimizationpasses 5 +-dontusemixedcaseclassnames +-dontskipnonpubliclibraryclasses +-dontpreverify +-verbose +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService + +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} diff --git a/forge-gui-android/project.properties b/forge-gui-android/project.properties index 4ab125693c7..a2cd250bf26 100644 --- a/forge-gui-android/project.properties +++ b/forge-gui-android/project.properties @@ -3,12 +3,9 @@ # # This file must be checked in Version Control Systems. # -# To customize properties used by the Ant build system edit +# To customize properties used by the Ant build system use, # "ant.properties", and override values to adapt the script to your # project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-19 +target=android-19 \ No newline at end of file diff --git a/forge-gui-android/res/drawable-hdpi/ic_launcher.png b/forge-gui-android/res/drawable-hdpi/ic_launcher.png index 288b66551d1..6647996c77a 100644 Binary files a/forge-gui-android/res/drawable-hdpi/ic_launcher.png and b/forge-gui-android/res/drawable-hdpi/ic_launcher.png differ diff --git a/forge-gui-android/res/drawable-mdpi/ic_launcher.png b/forge-gui-android/res/drawable-mdpi/ic_launcher.png index 6ae570b4db4..e227b2a6a36 100644 Binary files a/forge-gui-android/res/drawable-mdpi/ic_launcher.png and b/forge-gui-android/res/drawable-mdpi/ic_launcher.png differ diff --git a/forge-gui-android/res/drawable-xhdpi/ic_launcher.png b/forge-gui-android/res/drawable-xhdpi/ic_launcher.png index d4fb7cd9d86..9dd565f4a79 100644 Binary files a/forge-gui-android/res/drawable-xhdpi/ic_launcher.png and b/forge-gui-android/res/drawable-xhdpi/ic_launcher.png differ diff --git a/forge-gui-android/res/drawable-xxhdpi/ic_launcher.png b/forge-gui-android/res/drawable-xxhdpi/ic_launcher.png index 85a6081587e..c5f601dfbcc 100644 Binary files a/forge-gui-android/res/drawable-xxhdpi/ic_launcher.png and b/forge-gui-android/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/forge-gui-android/res/layout/activity_main.xml b/forge-gui-android/res/layout/activity_main.xml deleted file mode 100644 index 6f1fa047199..00000000000 --- a/forge-gui-android/res/layout/activity_main.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/forge-gui-android/res/layout/main.xml b/forge-gui-android/res/layout/main.xml new file mode 100644 index 00000000000..5c4fde294dd --- /dev/null +++ b/forge-gui-android/res/layout/main.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/forge-gui-android/res/menu/main.xml b/forge-gui-android/res/menu/main.xml deleted file mode 100644 index d122a4b7543..00000000000 --- a/forge-gui-android/res/menu/main.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/forge-gui-android/res/values-sw600dp/dimens.xml b/forge-gui-android/res/values-sw600dp/dimens.xml deleted file mode 100644 index c876987e27c..00000000000 --- a/forge-gui-android/res/values-sw600dp/dimens.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/forge-gui-android/res/values-sw720dp-land/dimens.xml b/forge-gui-android/res/values-sw720dp-land/dimens.xml deleted file mode 100644 index 0df30679a5d..00000000000 --- a/forge-gui-android/res/values-sw720dp-land/dimens.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - 128dp - - diff --git a/forge-gui-android/res/values-v11/styles.xml b/forge-gui-android/res/values-v11/styles.xml deleted file mode 100644 index e3ef53d96bb..00000000000 --- a/forge-gui-android/res/values-v11/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/forge-gui-android/res/values-v14/styles.xml b/forge-gui-android/res/values-v14/styles.xml deleted file mode 100644 index 94dd245c99e..00000000000 --- a/forge-gui-android/res/values-v14/styles.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/forge-gui-android/res/values/dimens.xml b/forge-gui-android/res/values/dimens.xml deleted file mode 100644 index 2e0e2ae4bd5..00000000000 --- a/forge-gui-android/res/values/dimens.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - 16dp - 16dp - - diff --git a/forge-gui-android/res/values/strings.xml b/forge-gui-android/res/values/strings.xml index 0e6f84ddf7a..665f6966fcc 100644 --- a/forge-gui-android/res/values/strings.xml +++ b/forge-gui-android/res/values/strings.xml @@ -1,8 +1,4 @@ - + - - forge - Settings - Hello world! - - + Forge + \ No newline at end of file diff --git a/forge-gui-android/res/values/styles.xml b/forge-gui-android/res/values/styles.xml deleted file mode 100644 index 4ea93266474..00000000000 --- a/forge-gui-android/res/values/styles.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/forge-gui-android/src/com/forge/Main.java b/forge-gui-android/src/com/forge/Main.java deleted file mode 100644 index a46b69c59b4..00000000000 --- a/forge-gui-android/src/com/forge/Main.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.forge; - -import android.os.Bundle; - -import com.badlogic.gdx.backends.android.AndroidApplication; - -import forge.Forge; - -public class Main extends AndroidApplication { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - initialize(new Forge(getClipboard()), false); - } -} diff --git a/forge-gui-android/src/forge/view/Main.java b/forge-gui-android/src/forge/view/Main.java new file mode 100644 index 00000000000..25055ae5c0d --- /dev/null +++ b/forge-gui-android/src/forge/view/Main.java @@ -0,0 +1,24 @@ +package forge.view; + +import android.content.pm.ActivityInfo; +import android.os.Build; +import android.os.Bundle; + +import com.badlogic.gdx.backends.android.AndroidApplication; + +import forge.Forge; + +public class Main extends AndroidApplication { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + //setup portrait orientation + this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + if (Build.VERSION.SDK_INT > 8) { //use dual-side portrait mode if supported + this.setRequestedOrientation(7); + } + + initialize(new Forge(getClipboard()), false); + } +} diff --git a/forge-gui-mobile-dev/pom.xml b/forge-gui-mobile-dev/pom.xml index f9c451a888e..1beeb11f5ed 100644 --- a/forge-gui-mobile-dev/pom.xml +++ b/forge-gui-mobile-dev/pom.xml @@ -1,8 +1,9 @@ 4.0.0 - forge-gui-mobile-dev + forge forge-gui-mobile-dev 1.5.16-SNAPSHOT + Forge src diff --git a/forge-gui-mobile/pom.xml b/forge-gui-mobile/pom.xml index ed3775063db..29f3238e4c1 100644 --- a/forge-gui-mobile/pom.xml +++ b/forge-gui-mobile/pom.xml @@ -3,6 +3,7 @@ forge forge-gui-mobile 1.5.16-SNAPSHOT + Forge src