android kinda works, kinda.
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="advent.core"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
android:versionCode="{{version-code}}"
|
||||
android:versionName="{{version-name}}" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="15" />
|
||||
<uses-sdk android:minSdkVersion="15"
|
||||
android:targetSdkVersion="{{target-version}}" />
|
||||
|
||||
<application
|
||||
android:name="neko.App"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name">
|
||||
android:label="TicksTales">
|
||||
<activity android:name=".SplashActivity"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar">
|
||||
<intent-filter>
|
||||
@@ -16,7 +18,7 @@
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".AndroidLauncher">
|
||||
<activity android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name='advent.core.MAIN'/>
|
||||
<category android:name='android.intent.category.DEFAULT'/>
|
||||
@@ -24,4 +26,10 @@
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
{{#debug-build}}
|
||||
<!-- Inside this section the permission will work only in debug builds (this is -->
|
||||
<!-- needed for remote REPL). If your application logic requires Internet -->
|
||||
<!-- permission too, move it out of the section. -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
{{/debug-build}}
|
||||
</manifest>
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="advent.core"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="15" />
|
||||
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name">
|
||||
<activity android:name=".SplashActivity"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".AndroidLauncher">
|
||||
<intent-filter>
|
||||
<action android:name='advent.core.MAIN'/>
|
||||
<category android:name='android.intent.category.DEFAULT'/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,29 +1,32 @@
|
||||
(defproject advent "0.0.1-SNAPSHOT"
|
||||
:description "FIXME: write description"
|
||||
|
||||
:dependencies [[com.badlogicgames.gdx/gdx "1.5.3"]
|
||||
:dependencies [[com.badlogicgames.gdx/gdx "1.5.3" :use-resources true]
|
||||
[com.badlogicgames.gdx/gdx-backend-lwjgl "1.5.3"]
|
||||
[com.badlogicgames.gdx/gdx-box2d "1.5.3"]
|
||||
[com.badlogicgames.gdx/gdx-tools "1.5.3"]
|
||||
|
||||
[com.badlogicgames.gdx/gdx-bullet "1.5.3"]
|
||||
|
||||
[com.badlogicgames.gdx/gdx-backend-android "1.3.0"]
|
||||
[neko/neko "3.2.0"]
|
||||
[org.clojure-android/clojure "1.6.0-RC1"]
|
||||
[com.badlogicgames.gdx/gdx-backend-android "1.5.3"]
|
||||
[neko/neko "4.0.0-alpha5"]
|
||||
[org.clojure-android/clojure "1.7.0-r2" :use-resources true]
|
||||
|
||||
[org.clojure/tools.nrepl "0.2.7"]
|
||||
[play-clj "0.4.5-BRYCE"]
|
||||
[org.clojure/data.priority-map "0.0.5"]
|
||||
|
||||
[org.clojure/core.async "0.1.346.0-17112a-alpha"]]
|
||||
:plugins [[lein-droid "0.4.3"]]
|
||||
:plugins [[lein-droid "0.4.4-SNAPSHOT"]]
|
||||
|
||||
|
||||
:profiles {:dev {:dependencies [[android/tools.nrepl "0.2.0-bigstack"]
|
||||
[compliment "0.1.3"]]
|
||||
:android {:aot :all
|
||||
:aot-exclude-ns [cljs.core.async.macros cljs.core.impl-ioc-macros cljs.core.impl.ioc_macros]}}
|
||||
:android {:aot :all-with-unused
|
||||
|
||||
:rename-manifest-package "advent.core.debug"
|
||||
:manifest-options {:app-name "ticks tales (debug)"}
|
||||
:aot-exclude-ns [cljs.core.async.impl.ioc-macros]}}
|
||||
:release {:android
|
||||
{;; Specify the path to your private
|
||||
;; keystore and the the alias of the
|
||||
@@ -38,13 +41,19 @@
|
||||
:sdk-path "/usr/local/Cellar/android-sdk/24.3.4/"
|
||||
|
||||
;; Uncomment this if dexer fails with OutOfMemoryException
|
||||
:force-dex-optimize true
|
||||
#_#_:force-dex-optimize true
|
||||
|
||||
:assets-path "../desktop/resources"
|
||||
:assets-paths ["/Users/brycecovert/dev/advent/desktop/resources"]
|
||||
:native-libraries-paths ["libs"]
|
||||
:target-version "15"
|
||||
:aot-exclude-ns ["clojure.parallel" "clojure.core.reducers" "cljs.core.async.macros" "cljs.core.impl-ioc-macros" "cljs.core.impl.ioc_macros"]
|
||||
:dex-opts ["-JXmx8192M" "--no-locals" "--multi-dex"]}
|
||||
:aot-exclude-ns ["clojure.parallel" "clojure.core.reducers"
|
||||
"cider.nrepl" "cider-nrepl.plugin"
|
||||
"cider.nrepl.middleware.util.java.parser"
|
||||
#"cljs-tooling\..+" "cljs.core.async.macros"
|
||||
"cljs.core.async.impl.ioc-macros"
|
||||
"cljs.core.impl.ioc_macros"
|
||||
#"com.badlogic.gdx.physics\..+"]
|
||||
:dex-opts ["-JXmx8192M" "--multi-dex" "--no-locals"]}
|
||||
|
||||
:source-paths ["src/clojure" "../desktop/src-common"]
|
||||
:java-source-paths ["src/java" "gen"]
|
||||
|
||||
1
android/resources
Symbolic link
1
android/resources
Symbolic link
@@ -0,0 +1 @@
|
||||
../desktop/resources
|
||||
@@ -6,7 +6,7 @@ import clojure.lang.Symbol;
|
||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
||||
import com.badlogic.gdx.Game;
|
||||
|
||||
public class AndroidLauncher extends AndroidApplication {
|
||||
public class MainActivity extends AndroidApplication {
|
||||
public void onCreate (android.os.Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
RT.var("clojure.core", "require").invoke(Symbol.intern("advent.core"));
|
||||
@@ -2,24 +2,18 @@ package advent.core;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.util.Log;
|
||||
|
||||
import clojure.lang.Symbol;
|
||||
import clojure.lang.Var;
|
||||
import clojure.lang.RT;
|
||||
import neko.App;
|
||||
|
||||
import advent.core.R;
|
||||
|
||||
public class SplashActivity extends Activity {
|
||||
|
||||
private static boolean firstLaunch = true;
|
||||
private static String TAG = "Splash";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle bundle) {
|
||||
@@ -28,7 +22,12 @@ public class SplashActivity extends Activity {
|
||||
if (firstLaunch) {
|
||||
firstLaunch = false;
|
||||
setupSplash();
|
||||
loadClojure();
|
||||
App.loadAsynchronously("advent.core.MainActivity",
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
proceed();
|
||||
}});
|
||||
} else {
|
||||
proceed();
|
||||
}
|
||||
@@ -50,25 +49,4 @@ public class SplashActivity extends Activity {
|
||||
finish();
|
||||
}
|
||||
|
||||
public void loadClojure() {
|
||||
new Thread(new Runnable(){
|
||||
@Override
|
||||
public void run() {
|
||||
Symbol CLOJURE_MAIN = Symbol.intern("neko.init");
|
||||
Var REQUIRE = RT.var("clojure.core", "require");
|
||||
REQUIRE.invoke(CLOJURE_MAIN);
|
||||
|
||||
Var INIT = RT.var("neko.init", "init");
|
||||
INIT.invoke(SplashActivity.this.getApplication());
|
||||
|
||||
try {
|
||||
Class.forName("advent.core.AndroidLauncher");
|
||||
} catch (ClassNotFoundException e) {
|
||||
Log.e(TAG, "Failed loading AndroidLauncher", e);
|
||||
}
|
||||
|
||||
proceed();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB |
Reference in New Issue
Block a user