diff --git a/template/project.clj b/template/project.clj index 3962bc9..02d868d 100644 --- a/template/project.clj +++ b/template/project.clj @@ -1,4 +1,4 @@ -(defproject play-clj/lein-template "0.2.4" +(defproject play-clj/lein-template "0.3.0-SNAPSHOT" :description "A template for making play-clj projects" :url "https://github.com/oakes/play-clj" :license {:name "Public Domain" diff --git a/template/resources/armeabi-libgdx.so b/template/resources/armeabi-libgdx.so deleted file mode 100644 index b9fb2e5..0000000 Binary files a/template/resources/armeabi-libgdx.so and /dev/null differ diff --git a/template/resources/armeabi-v7a-libgdx.so b/template/resources/armeabi-v7a-libgdx.so deleted file mode 100644 index 2af6b04..0000000 Binary files a/template/resources/armeabi-v7a-libgdx.so and /dev/null differ diff --git a/template/resources/armeabi-v7a/libgdx-box2d.so b/template/resources/armeabi-v7a/libgdx-box2d.so new file mode 100644 index 0000000..0ce8060 Binary files /dev/null and b/template/resources/armeabi-v7a/libgdx-box2d.so differ diff --git a/template/resources/armeabi-v7a/libgdx-bullet.so b/template/resources/armeabi-v7a/libgdx-bullet.so new file mode 100644 index 0000000..2a19c0f Binary files /dev/null and b/template/resources/armeabi-v7a/libgdx-bullet.so differ diff --git a/template/resources/armeabi-v7a/libgdx.so b/template/resources/armeabi-v7a/libgdx.so new file mode 100644 index 0000000..1761f99 Binary files /dev/null and b/template/resources/armeabi-v7a/libgdx.so differ diff --git a/template/resources/armeabi/libgdx-box2d.so b/template/resources/armeabi/libgdx-box2d.so new file mode 100644 index 0000000..62366ea Binary files /dev/null and b/template/resources/armeabi/libgdx-box2d.so differ diff --git a/template/resources/armeabi/libgdx-bullet.so b/template/resources/armeabi/libgdx-bullet.so new file mode 100644 index 0000000..da10dc3 Binary files /dev/null and b/template/resources/armeabi/libgdx-bullet.so differ diff --git a/template/resources/armeabi/libgdx.so b/template/resources/armeabi/libgdx.so new file mode 100644 index 0000000..397c5eb Binary files /dev/null and b/template/resources/armeabi/libgdx.so differ diff --git a/template/resources/libObjectAL.a b/template/resources/ios/libObjectAL.a similarity index 99% rename from template/resources/libObjectAL.a rename to template/resources/ios/libObjectAL.a index 8e76b69..5b01a01 100644 Binary files a/template/resources/libObjectAL.a and b/template/resources/ios/libObjectAL.a differ diff --git a/template/resources/ios/libgdx-box2d.a b/template/resources/ios/libgdx-box2d.a new file mode 100644 index 0000000..5c25068 Binary files /dev/null and b/template/resources/ios/libgdx-box2d.a differ diff --git a/template/resources/ios/libgdx-bullet.a b/template/resources/ios/libgdx-bullet.a new file mode 100644 index 0000000..194c31a Binary files /dev/null and b/template/resources/ios/libgdx-bullet.a differ diff --git a/template/resources/ios/libgdx.a b/template/resources/ios/libgdx.a new file mode 100644 index 0000000..e070b32 Binary files /dev/null and b/template/resources/ios/libgdx.a differ diff --git a/template/resources/libgdx.a b/template/resources/libgdx.a deleted file mode 100644 index 94caa20..0000000 Binary files a/template/resources/libgdx.a and /dev/null differ diff --git a/template/resources/x86-libgdx.so b/template/resources/x86-libgdx.so deleted file mode 100644 index ad2189e..0000000 Binary files a/template/resources/x86-libgdx.so and /dev/null differ diff --git a/template/resources/x86/libgdx-box2d.so b/template/resources/x86/libgdx-box2d.so new file mode 100644 index 0000000..6e6e00a Binary files /dev/null and b/template/resources/x86/libgdx-box2d.so differ diff --git a/template/resources/x86/libgdx-bullet.so b/template/resources/x86/libgdx-bullet.so new file mode 100644 index 0000000..06e34c2 Binary files /dev/null and b/template/resources/x86/libgdx-bullet.so differ diff --git a/template/resources/x86/libgdx.so b/template/resources/x86/libgdx.so new file mode 100644 index 0000000..4b3fef0 Binary files /dev/null and b/template/resources/x86/libgdx.so differ diff --git a/template/src/leiningen/new/play_clj.clj b/template/src/leiningen/new/play_clj.clj index f38956b..9acbe65 100644 --- a/template/src/leiningen/new/play_clj.clj +++ b/template/src/leiningen/new/play_clj.clj @@ -81,19 +81,41 @@ (lein-droid-render "splashscreen.xml")] ["android/src/java/{{path}}/SplashActivity.java" (lein-droid-render "SplashActivity.java" data)] + ; android libgdx.so ["android/libs/armeabi/libgdx.so" - (-> (io/resource "armeabi-libgdx.so") io/input-stream)] + (-> (io/resource "armeabi/libgdx.so") io/input-stream)] ["android/libs/armeabi-v7a/libgdx.so" - (-> (io/resource "armeabi-v7a-libgdx.so") io/input-stream)] + (-> (io/resource "armeabi-v7a/libgdx.so") io/input-stream)] ["android/libs/x86/libgdx.so" - (-> (io/resource "x86-libgdx.so") io/input-stream)] + (-> (io/resource "x86/libgdx.so") io/input-stream)] + ; android libgdx-box2d.so + ["android/libs/armeabi/libgdx-box2d.so" + (-> (io/resource "armeabi/libgdx-box2d.so") io/input-stream)] + ["android/libs/armeabi-v7a/libgdx-box2d.so" + (-> (io/resource "armeabi-v7a/libgdx-box2d.so") io/input-stream)] + ["android/libs/x86/libgdx-box2d.so" + (-> (io/resource "x86/libgdx-box2d.so") io/input-stream)] + ; android libgdx-bullet.so + ["android/libs/armeabi/libgdx-bullet.so" + (-> (io/resource "armeabi/libgdx-bullet.so") io/input-stream)] + ["android/libs/armeabi-v7a/libgdx-bullet.so" + (-> (io/resource "armeabi-v7a/libgdx-bullet.so") io/input-stream)] + ["android/libs/x86/libgdx-bullet.so" + (-> (io/resource "x86/libgdx-bullet.so") io/input-stream)] ; ios ["ios/project.clj" (render "ios-project.clj" data)] ["ios/Info.plist.xml" (render "Info.plist.xml" data)] "ios/src/clojure" ["ios/src/java/{{ios-path}}.java" (render "IOSLauncher.java" data)] + ; ios libObjectAL.a and libgdx.a ["ios/libs/libObjectAL.a" - (-> (io/resource "libObjectAL.a") io/input-stream)] + (-> (io/resource "ios/libObjectAL.a") io/input-stream)] ["ios/libs/libgdx.a" - (-> (io/resource "libgdx.a") io/input-stream)]))) + (-> (io/resource "ios/libgdx.a") io/input-stream)] + ; ios libgdx-box2d.a + ["ios/libs/libgdx-box2d.a" + (-> (io/resource "ios/libgdx-box2d.a") io/input-stream)] + ; ios libgdx-bullet.a + ["ios/libs/libgdx-bullet.a" + (-> (io/resource "ios/libgdx-bullet.a") io/input-stream)]))) diff --git a/template/src/leiningen/new/play_clj/android-project.clj b/template/src/leiningen/new/play_clj/android-project.clj index 9448f79..86dd309 100644 --- a/template/src/leiningen/new/play_clj/android-project.clj +++ b/template/src/leiningen/new/play_clj/android-project.clj @@ -4,7 +4,9 @@ :dependencies [[com.badlogicgames.gdx/gdx "1.0" :use-resources true] [com.badlogicgames.gdx/gdx-backend-android "1.0"] [neko/neko "3.0.1"] - [org.clojure-android/clojure "1.5.1-jb" :use-resources true] + [com.badlogicgames.gdx/gdx-box2d "1.0"] + [com.badlogicgames.gdx/gdx-bullet "1.0"] + [org.clojure-android/clojure "1.6.0-RC1" :use-resources true] [play-clj "0.3.0"]] :profiles {:dev {:dependencies [[android/tools.nrepl "0.2.0-bigstack"] [compliment "0.0.3"]] diff --git a/template/src/leiningen/new/play_clj/desktop-project.clj b/template/src/leiningen/new/play_clj/desktop-project.clj index c63d7ed..10a1ad7 100644 --- a/template/src/leiningen/new/play_clj/desktop-project.clj +++ b/template/src/leiningen/new/play_clj/desktop-project.clj @@ -3,6 +3,12 @@ :dependencies [[com.badlogicgames.gdx/gdx "1.0"] [com.badlogicgames.gdx/gdx-backend-lwjgl "1.0"] + [com.badlogicgames.gdx/gdx-box2d "1.0"] + [com.badlogicgames.gdx/gdx-box2d-platform "1.0" + :classifier "natives-desktop"] + [com.badlogicgames.gdx/gdx-bullet "1.0"] + [com.badlogicgames.gdx/gdx-bullet-platform "1.0" + :classifier "natives-desktop"] [com.badlogicgames.gdx/gdx-platform "1.0" :classifier "natives-desktop"] [org.clojure/clojure "1.6.0"] diff --git a/template/src/leiningen/new/play_clj/ios-project.clj b/template/src/leiningen/new/play_clj/ios-project.clj index e229de0..e10da57 100644 --- a/template/src/leiningen/new/play_clj/ios-project.clj +++ b/template/src/leiningen/new/play_clj/ios-project.clj @@ -2,13 +2,15 @@ :description "FIXME: write description" :dependencies [[com.badlogicgames.gdx/gdx "1.0"] [com.badlogicgames.gdx/gdx-backend-robovm "1.0"] + [com.badlogicgames.gdx/gdx-box2d "1.0"] + [com.badlogicgames.gdx/gdx-bullet "1.0"] [org.clojure/clojure "1.6.0"] [play-clj "0.3.0"]] :source-paths ["src/clojure" "../desktop/src-common"] :java-source-paths ["src/java"] :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"] :ios {:robovm-opts ["-forcelinkclasses" "{{package-prefix}}.**:clojure.**:com.badlogic.**:play_clj.**" - "-libs" "libs/libObjectAL.a:libs/libgdx.a" + "-libs" "libs/libObjectAL.a:libs/libgdx.a:libs/libgdx-box2d.a:libs/libgdx-bullet.a" "-frameworks" "UIKit:OpenGLES:QuartzCore:CoreGraphics:OpenAL:AudioToolbox:AVFoundation" "-resources" "../desktop/resources/**"]} :aot :all