diff options
author | fhuya <fhuya@google.com> | 2019-09-02 17:31:51 -0700 |
---|---|---|
committer | fhuya <fhuya@google.com> | 2019-09-04 16:20:22 -0700 |
commit | 7fabfd402f235ebcf64cfde3b399b8b62b969243 (patch) | |
tree | 99bb4eacc7828bedae43316f7415091de9782922 /platform/android/SCsub | |
parent | ba854bbc7bb0eae230299de4da8dfcb7caf74b69 (diff) |
Split the Android platform java logic into an Android library module (`lib`) and an application module (`app`).
The application module `app` serves double duties of providing the prebuilt Godot binaries ('android_debug.apk', 'android_release.apk') and the Godot custom build template ('android_source.zip').
Diffstat (limited to 'platform/android/SCsub')
-rw-r--r-- | platform/android/SCsub | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/platform/android/SCsub b/platform/android/SCsub index 1bd8161fa7..65172a12c0 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -50,30 +50,8 @@ if lib_arch_dir != '': else: # release_debug, debug lib_type_dir = 'debug' - out_dir = '#platform/android/java/libs/' + lib_type_dir + '/' + lib_arch_dir + out_dir = '#platform/android/java/lib/libs/' + lib_type_dir + '/' + lib_arch_dir env_android.Command(out_dir + '/libgodot_android.so', '#bin/libgodot' + env['SHLIBSUFFIX'], Move("$TARGET", "$SOURCE")) stl_lib_path = str(env['ANDROID_NDK_ROOT']) + '/sources/cxx-stl/llvm-libc++/libs/' + lib_arch_dir + '/libc++_shared.so' env_android.Command(out_dir + '/libc++_shared.so', stl_lib_path, Copy("$TARGET", "$SOURCE")) - -# Zip android/java folder for the source export template. -print("Archiving platform/android/java as bin/android_source.zip...") -import os -import zipfile -# Change dir to avoid have zipped paths start from the android/java folder. -olddir = os.getcwd() -os.chdir(Dir('#platform/android/java').abspath) -bindir = Dir('#bin').abspath -# Make 'bin' dir if missing, can happen on fresh clone. -if not os.path.exists(bindir): - os.makedirs(bindir) -zipf = zipfile.ZipFile(os.path.join(bindir, 'android_source.zip'), 'w', zipfile.ZIP_DEFLATED) -exclude_dirs = ['.gradle', 'build', 'libs', 'patches'] -for root, dirs, files in os.walk('.', topdown=True): - # Change 'dirs' in place to exclude folders we don't want. - # https://stackoverflow.com/a/19859907 - dirs[:] = [d for d in dirs if d not in exclude_dirs] - for f in files: - zipf.write(os.path.join(root, f)) -zipf.close() -os.chdir(olddir) |