You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Update NDK and Maven config
This commit is contained in:
committed by
Anish Mishra
parent
21d7340162
commit
3c645995ca
@@ -226,7 +226,7 @@ static const int EXPORT_FORMAT_AAB = 1;
|
||||
static const char *APK_ASSETS_DIRECTORY = "res://android/build/assets";
|
||||
static const char *AAB_ASSETS_DIRECTORY = "res://android/build/assetPackInstallTime/src/main/assets";
|
||||
|
||||
static const int DEFAULT_MIN_SDK_VERSION = 21; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
|
||||
static const int DEFAULT_MIN_SDK_VERSION = 24; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
|
||||
static const int DEFAULT_TARGET_SDK_VERSION = 35; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
|
||||
|
||||
#ifndef ANDROID_ENABLED
|
||||
@@ -3388,7 +3388,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
|
||||
}
|
||||
|
||||
// Let's zip-align (must be done before signing)
|
||||
|
||||
static const int PAGE_SIZE_KB = 16 * 1024;
|
||||
static const int ZIP_ALIGNMENT = 4;
|
||||
|
||||
// If we're not signing the apk, then the next step should be the last.
|
||||
@@ -3440,6 +3440,12 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
|
||||
// Uncompressed file => Align
|
||||
long new_offset = file_offset + bias;
|
||||
padding = (ZIP_ALIGNMENT - (new_offset % ZIP_ALIGNMENT)) % ZIP_ALIGNMENT;
|
||||
const char *ext = strrchr(fname, '.');
|
||||
if (ext && strcmp(ext, ".so") == 0) {
|
||||
padding = (PAGE_SIZE_KB - (new_offset % PAGE_SIZE_KB)) % PAGE_SIZE_KB;
|
||||
} else {
|
||||
padding = (ZIP_ALIGNMENT - (new_offset % ZIP_ALIGNMENT)) % ZIP_ALIGNMENT;
|
||||
}
|
||||
}
|
||||
|
||||
memset(extra + info.size_file_extra, 0, padding);
|
||||
|
||||
Reference in New Issue
Block a user