This should be / is in the wiki, but this is the general idea.
I guess the gradle part is confusing at the beginning, so I’ll show you mine, for whatever help it may be. My gradle dependencies also include the required bullet physics stuff. You might also want to ammend the jmeVersion to a release build.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
lintOptions {
// Fix nifty gui referencing "java.awt" package.
disable 'InvalidPackage'
abortOnError false
}
defaultConfig {
applicationId "com.jayfella.motorunner"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
// testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'com/simsilica/lemur/style/base/glass-styles.groovy'
}
}
project.ext {
jmeVersion = "[3.3,)"
lemurVersion = "1.10.1"
lemurProtoVersion = "1.9.1"
lemurPropsVersion = "1.0.1"
jacksonVer = "2.9.5"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// testImplementation 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.1'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
// Google / Android
implementation "com.android.support:appcompat-v7:27.1.1"
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation "com.google.android.gms:play-services-ads:15.0.1"
implementation "com.google.firebase:firebase-core:15.0.2"
implementation "com.android.support:customtabs:27.1.1"
implementation "com.android.support:support-media-compat:27.1.1"
implementation "com.android.support:support-v4:27.1.1"
// use android-native bullet on android/desktop
implementation "org.jmonkeyengine:jme3-core:$jmeVersion",
"org.jmonkeyengine:jme3-android-native:$jmeVersion",
"org.jmonkeyengine:jme3-bullet-native-android:$jmeVersion"
// lemur
implementation "com.simsilica:lemur:$lemurVersion",
"com.simsilica:lemur-proto:$lemurProtoVersion"
//"com.simsilica:lemur-props:$lemurPropsVersion",
// jackson JSON
implementation "com.fasterxml.jackson.core:jackson-core:$jacksonVer",
"com.fasterxml.jackson.core:jackson-annotations:$jacksonVer",
"com.fasterxml.jackson.core:jackson-databind:$jacksonVer"
// android permissions
implementation 'com.intentfilter:android-permissions:0.1.7'
// Choose one as appropriate.
// ANDROID
implementation "org.jmonkeyengine:jme3-android-native:$jmeVersion"
// DESKTOP
/*
implementation "org.jmonkeyengine:jme3-lwjgl:$jmeVersion",
"org.jmonkeyengine:jme3-desktop:$jmeVersion",
"org.jmonkeyengine:jme3-jogg:$jmeVersion",
"org.jmonkeyengine:jme3-jogl:$jmeVersion"
*/
}
// apply from: '../android.gradle'
// apply from: '../desktop.gradle'
apply plugin: 'com.google.gms.google-services'
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.2.1' // google-services plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenLocal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}