mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Set up the stuff to build the game for Android. See the Maven module forum topic for details.
This commit is contained in:
7
.gitattributes
vendored
7
.gitattributes
vendored
@@ -644,8 +644,14 @@ 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/armeabi-v7a/libgdx.so -text
|
||||
forge-gui-android/libs/armeabi/libgdx.so -text
|
||||
forge-gui-android/libs/gdx-backend-android-sources.jar -text
|
||||
forge-gui-android/libs/gdx-backend-android.jar -text
|
||||
forge-gui-android/libs/gdx-freetype.jar -text
|
||||
forge-gui-android/libs/gdx-sources.jar -text
|
||||
forge-gui-android/libs/gdx.jar -text
|
||||
forge-gui-android/libs/x86/libgdx.so -text
|
||||
forge-gui-android/lint.xml -text
|
||||
forge-gui-android/proguard.cfg -text
|
||||
forge-gui-android/project.properties -text
|
||||
@@ -1186,6 +1192,7 @@ forge-gui-mobile/src/forge/util/LayoutHelper.java -text
|
||||
forge-gui-mobile/src/forge/util/PhysicsObject.java -text
|
||||
forge-gui-mobile/src/forge/util/Utils.java -text
|
||||
forge-gui-mobile/src/forge/util/WaitRunnable.java -text
|
||||
forge-gui-mobile/src/forge/view/Main.java -text
|
||||
forge-gui/.classpath -text
|
||||
forge-gui/.project -text
|
||||
forge-gui/.settings/org.eclipse.core.resources.prefs -text
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name" >
|
||||
<activity
|
||||
android:name="forge.view.Main"
|
||||
android:name=".Main"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
BIN
forge-gui-android/libs/armeabi-v7a/libgdx.so
Normal file
BIN
forge-gui-android/libs/armeabi-v7a/libgdx.so
Normal file
Binary file not shown.
BIN
forge-gui-android/libs/armeabi/libgdx.so
Normal file
BIN
forge-gui-android/libs/armeabi/libgdx.so
Normal file
Binary file not shown.
BIN
forge-gui-android/libs/gdx-freetype.jar
Normal file
BIN
forge-gui-android/libs/gdx-freetype.jar
Normal file
Binary file not shown.
BIN
forge-gui-android/libs/gdx-sources.jar
Normal file
BIN
forge-gui-android/libs/gdx-sources.jar
Normal file
Binary file not shown.
BIN
forge-gui-android/libs/gdx.jar
Normal file
BIN
forge-gui-android/libs/gdx.jar
Normal file
Binary file not shown.
BIN
forge-gui-android/libs/x86/libgdx.so
Normal file
BIN
forge-gui-android/libs/x86/libgdx.so
Normal file
Binary file not shown.
@@ -6,17 +6,11 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry exported="true" kind="lib" path="libs/gdx.jar" sourcepath="libs/gdx-sources.jar"/>
|
||||
<classpathentry kind="lib" path="libs/gdx-freetype.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<artifactId>forge</artifactId>
|
||||
<groupId>forge</groupId>
|
||||
<artifactId>forge-gui-mobile</artifactId>
|
||||
<version>1.5.18-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>forge-gui-mobile</artifactId>
|
||||
<packaging>apk</packaging>
|
||||
<name>Forge</name>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<plugins>
|
||||
@@ -15,10 +23,40 @@
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
<version>3.9.0-rc.1</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<sign>
|
||||
<debug>true</debug>
|
||||
</sign>
|
||||
<sdk>
|
||||
<platform>19</platform>
|
||||
</sdk>
|
||||
<dexForceJumbo>true</dexForceJumbo>
|
||||
<deleteConflictingFiles>true</deleteConflictingFiles>
|
||||
<androidManifestFile>${project.basedir}/../forge-gui-android/AndroidManifest.xml</androidManifestFile>
|
||||
<assetsDirectory>${project.basedir}/../forge-gui-android/assets</assetsDirectory>
|
||||
<resourceDirectory>${project.basedir}/../forge-gui-android/res</resourceDirectory>
|
||||
<nativeLibrariesDirectory>${project.basedir}/../forge-gui-android/libs</nativeLibrariesDirectory>
|
||||
<extractDuplicates>true</extractDuplicates>
|
||||
<proguard>
|
||||
<config>${project.basedir}/../forge-gui-android/proguard.cfg</config>
|
||||
</proguard>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.android</groupId>
|
||||
<artifactId>android</artifactId>
|
||||
<version>4.1.1.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>forge</groupId>
|
||||
<artifactId>forge-core</artifactId>
|
||||
@@ -59,5 +97,32 @@
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx</artifactId>
|
||||
<version>0.9.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx-freetype</artifactId>
|
||||
<version>0.9.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx-freetype-platform</artifactId>
|
||||
<version>0.9.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xmlpull</groupId>
|
||||
<artifactId>xmlpull</artifactId>
|
||||
<version>1.1.3.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx-backend-android</artifactId>
|
||||
<version>0.9.9</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
24
forge-gui-mobile/src/forge/view/Main.java
Normal file
24
forge-gui-mobile/src/forge/view/Main.java
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user