Merge branch 'master' of https://bitbucket.org/brycecovertoperations/advent
4
android/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
target
|
||||
\#*#
|
||||
checkouts
|
||||
.nrepl-port
|
||||
@@ -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,36 +1,59 @@
|
||||
(defproject advent "0.0.1-SNAPSHOT"
|
||||
:description "FIXME: write description"
|
||||
|
||||
:dependencies [[com.badlogicgames.gdx/gdx "1.3.0" :use-resources true]
|
||||
[com.badlogicgames.gdx/gdx-backend-android "1.3.0"]
|
||||
[com.badlogicgames.gdx/gdx-box2d "1.3.0"]
|
||||
[com.badlogicgames.gdx/gdx-bullet "1.3.0"]
|
||||
[neko/neko "3.0.2"]
|
||||
[org.clojure-android/clojure "1.6.0-RC1" :use-resources true]
|
||||
[play-clj "0.3.9"]]
|
||||
: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.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.4-SNAPSHOT"]]
|
||||
|
||||
|
||||
:profiles {:dev {:dependencies [[android/tools.nrepl "0.2.0-bigstack"]
|
||||
[compliment "0.1.3"]]
|
||||
:android {:aot :all-with-unused}}
|
||||
: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
|
||||
;; key you want to sign APKs with.
|
||||
;; :keystore-path "/home/user/.android/private.keystore"
|
||||
;; :key-alias "mykeyalias"
|
||||
:aot :all}}}
|
||||
:aot :all
|
||||
:aot-exclude-ns [cljs.core.async.macros cljs.core.impl-ioc-macros cljs.core.impl.ioc_macros]}}}
|
||||
|
||||
:android {;; Specify the path to the Android SDK directory either
|
||||
;; here or in your ~/.lein/profiles.clj file.
|
||||
;; :sdk-path "/home/user/path/to/android-sdk/"
|
||||
: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"]
|
||||
:dex-opts ["-JXmx2048M"]}
|
||||
:target-version "15" ; 18+
|
||||
: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
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |