diff --git a/build.gradle b/build.gradle
index 62d4ac841..d9f5cd2ea 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,10 +1,23 @@
import org.gradle.api.artifacts.*
+buildscript {
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.1.0'
+ }
+}
+
apply plugin: 'base'
// This is applied to all sub projects
subprojects {
- apply from: rootProject.file('common.gradle')
+ if(!project.name.equals('jme3-android-examples')) {
+ apply from: rootProject.file('common.gradle')
+ } else {
+ apply from: rootProject.file('common-android-app.gradle')
+ }
}
task run(dependsOn: ':jme3-examples:run') {
diff --git a/common-android-app.gradle b/common-android-app.gradle
new file mode 100644
index 000000000..0ec48fbd7
--- /dev/null
+++ b/common-android-app.gradle
@@ -0,0 +1,13 @@
+apply plugin: 'com.android.application'
+
+group = 'com.jme3'
+version = jmeVersion + '-' + jmeVersionTag
+
+sourceCompatibility = '1.6'
+
+repositories {
+ mavenCentral()
+ maven {
+ url "http://nifty-gui.sourceforge.net/nifty-maven-repo"
+ }
+}
\ No newline at end of file
diff --git a/jme3-android-examples/build.gradle b/jme3-android-examples/build.gradle
new file mode 100644
index 000000000..68b4539a0
--- /dev/null
+++ b/jme3-android-examples/build.gradle
@@ -0,0 +1,40 @@
+dependencies {
+ compile project(':jme3-core')
+ compile project(':jme3-android')
+ compile project(':jme3-effects')
+ compile project(':jme3-bullet')
+ compile project(':jme3-bullet-native')
+ compile project(':jme3-networking')
+ compile project(':jme3-niftygui')
+ compile project(':jme3-plugins')
+ compile project(':jme3-terrain')
+ compile project(':jme3-testdata')
+}
+
+android {
+ compileSdkVersion 10
+ buildToolsVersion "22.0.1"
+
+ lintOptions {
+ // Fix nifty gui referencing "java.awt" package.
+ disable 'InvalidPackage'
+ }
+
+ defaultConfig {
+ applicationId "com.jme3.android"
+ minSdkVersion 10 // Android 2.3 GINGERBREAD
+ targetSdkVersion 22 // Android 5.1 LOLLIPOP
+ versionCode 1
+ versionName "1.0" // TODO: from settings.gradle
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ }
+ debug {
+ applicationIdSuffix ".debug"
+ debuggable true
+ }
+ }
+}
\ No newline at end of file
diff --git a/jme3-android-examples/src/main/AndroidManifest.xml b/jme3-android-examples/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..ee80b6b28
--- /dev/null
+++ b/jme3-android-examples/src/main/AndroidManifest.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jme3-android-examples/src/main/java/jme3test/android/TestChooserAndroid.java b/jme3-android-examples/src/main/java/jme3test/android/TestChooserAndroid.java
new file mode 100644
index 000000000..e704bc85a
--- /dev/null
+++ b/jme3-android-examples/src/main/java/jme3test/android/TestChooserAndroid.java
@@ -0,0 +1,12 @@
+package jme3test.android;
+
+import android.content.pm.ActivityInfo;
+import android.app.*;
+import android.os.Bundle;
+
+public class TestChooserAndroid extends Activity {
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ }
+}
\ No newline at end of file
diff --git a/jme3-android-examples/src/main/res/values/strings.xml b/jme3-android-examples/src/main/res/values/strings.xml
new file mode 100644
index 000000000..b184fa936
--- /dev/null
+++ b/jme3-android-examples/src/main/res/values/strings.xml
@@ -0,0 +1,6 @@
+
+
+ JMEAndroidTest
+ About
+ Quit
+
\ No newline at end of file
diff --git a/local.properties b/local.properties
new file mode 100644
index 000000000..27e823fff
--- /dev/null
+++ b/local.properties
@@ -0,0 +1 @@
+sdk.dir=C:\\AndroidSDK
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 346532460..80d932d64 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -34,6 +34,7 @@ include 'jme3-testdata'
// Example projects
include 'jme3-examples'
+include 'jme3-android-examples'
if(buildSdkProject == "true"){
include 'sdk'