summaryrefslogtreecommitdiff
path: root/platform/android/SCsub
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2016-06-15 15:21:18 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2016-06-27 10:49:15 +0200
commite7b2626707457fe1d6af36da3d7a1ec3863cd52f (patch)
treee26d425d30bc9ce108ab260e8aff8fca181a3dba /platform/android/SCsub
parent2c59f778850dc4450481680e859efd66660c9119 (diff)
Make Android build smarter (SCons + Gradle)
Upgrade Gradle and Android plugin for Gradle Disable all signing and zip-aligning for the export templates Give correct names to generated APKs Put .so files built by SCons right where Gradle has to pick them according to arch & build type Downgrade NDK platform to 14 to match minSdkVersion
Diffstat (limited to 'platform/android/SCsub')
-rw-r--r--platform/android/SCsub20
1 files changed, 19 insertions, 1 deletions
diff --git a/platform/android/SCsub b/platform/android/SCsub
index c8feac8690..9fcf73972f 100644
--- a/platform/android/SCsub
+++ b/platform/android/SCsub
@@ -103,4 +103,22 @@ pp_baseout.write( manifest )
env_android.SharedLibrary("#bin/libgodot",[android_objects],SHLIBSUFFIX=env["SHLIBSUFFIX"])
-#env.Command('#bin/libgodot_android.so', '#platform/android/libgodot_android.so', Copy('bin/libgodot_android.so', 'platform/android/libgodot_android.so'))
+
+lib_arch_dir = ''
+if env['android_arch'] == 'armv6':
+ lib_arch_dir = 'armeabi'
+elif env['android_arch'] == 'armv7':
+ lib_arch_dir = 'armeabi-v7a'
+elif env['android_arch'] == 'x86':
+ lib_arch_dir = 'x86'
+else:
+ print 'WARN: Architecture not suitable for embedding into APK; keeping .so at \\bin'
+
+if lib_arch_dir != '':
+ if env['target'] == 'release':
+ lib_type_dir = 'release'
+ else: # release_debug, debug
+ lib_type_dir = 'debug'
+
+ out_dir = '#platform/android/java/libs/'+lib_type_dir+'/'+lib_arch_dir
+ env_android.Command(out_dir+'/libgodot_android.so', '#bin/libgodot'+env['SHLIBSUFFIX'], Move("$TARGET", "$SOURCE"))