jme3-android-examples: add project for android examples

experimental
Kirill Vainer 10 years ago
parent 9e4360cd6a
commit bea1601994
  1. 15
      build.gradle
  2. 13
      common-android-app.gradle
  3. 40
      jme3-android-examples/build.gradle
  4. 20
      jme3-android-examples/src/main/AndroidManifest.xml
  5. 12
      jme3-android-examples/src/main/java/jme3test/android/TestChooserAndroid.java
  6. 6
      jme3-android-examples/src/main/res/values/strings.xml
  7. 1
      local.properties
  8. 1
      settings.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') {

@ -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"
}
}

@ -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
}
}
}

@ -0,0 +1,20 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jme3.android">
<!-- Tell the system that you need ES 2.0. -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<!-- Tell the system that you need distinct touches (for the zoom gesture). -->
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="true" />
<application android:label="@string/app_name" android:allowBackup="true">
<activity android:name="jme3test.android.TestChooserAndroid"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

@ -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);
}
}

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">JMEAndroidTest</string>
<string name="about">About</string>
<string name="quit">Quit</string>
</resources>

@ -0,0 +1 @@
sdk.dir=C:\\AndroidSDK

@ -34,6 +34,7 @@ include 'jme3-testdata'
// Example projects
include 'jme3-examples'
include 'jme3-android-examples'
if(buildSdkProject == "true"){
include 'sdk'

Loading…
Cancel
Save