Merge pull request #73353 from akien-mga/android-default-min-sdk-24
Android: Default Min SDK to 24 for Vulkan mobile
This commit is contained in:
commit
f3e2e4be37
@ -251,7 +251,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/assetPacks/installTime/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 OPENGL_MIN_SDK_VERSION = 21; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
|
||||
static const int VULKAN_MIN_SDK_VERSION = 24;
|
||||
static const int DEFAULT_TARGET_SDK_VERSION = 32; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
|
||||
|
||||
@ -1706,7 +1706,7 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "gradle_build/export_format", PROPERTY_HINT_ENUM, "Export APK,Export AAB"), EXPORT_FORMAT_APK));
|
||||
// Using String instead of int to default to an empty string (no override) with placeholder for instructions (see GH-62465).
|
||||
// This implies doing validation that the string is a proper int.
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "gradle_build/min_sdk", PROPERTY_HINT_PLACEHOLDER_TEXT, vformat("%d (default)", DEFAULT_MIN_SDK_VERSION)), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "gradle_build/min_sdk", PROPERTY_HINT_PLACEHOLDER_TEXT, vformat("%d (default)", VULKAN_MIN_SDK_VERSION)), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "gradle_build/target_sdk", PROPERTY_HINT_PLACEHOLDER_TEXT, vformat("%d (default)", DEFAULT_TARGET_SDK_VERSION)), ""));
|
||||
|
||||
Vector<PluginConfigAndroid> plugins_configs = get_plugins();
|
||||
@ -2337,7 +2337,7 @@ bool EditorExportPlatformAndroid::has_valid_project_configuration(const Ref<Edit
|
||||
|
||||
// Check the min sdk version.
|
||||
String min_sdk_str = p_preset->get("gradle_build/min_sdk");
|
||||
int min_sdk_int = DEFAULT_MIN_SDK_VERSION;
|
||||
int min_sdk_int = VULKAN_MIN_SDK_VERSION;
|
||||
if (!min_sdk_str.is_empty()) { // Empty means no override, nothing to do.
|
||||
if (!gradle_build_enabled) {
|
||||
valid = false;
|
||||
@ -2350,9 +2350,9 @@ bool EditorExportPlatformAndroid::has_valid_project_configuration(const Ref<Edit
|
||||
err += "\n";
|
||||
} else {
|
||||
min_sdk_int = min_sdk_str.to_int();
|
||||
if (min_sdk_int < DEFAULT_MIN_SDK_VERSION) {
|
||||
if (min_sdk_int < OPENGL_MIN_SDK_VERSION) {
|
||||
valid = false;
|
||||
err += vformat(TTR("\"Min SDK\" cannot be lower than %d, which is the version needed by the Godot library."), DEFAULT_MIN_SDK_VERSION);
|
||||
err += vformat(TTR("\"Min SDK\" cannot be lower than %d, which is the version needed by the Godot library."), OPENGL_MIN_SDK_VERSION);
|
||||
err += "\n";
|
||||
}
|
||||
}
|
||||
@ -2808,7 +2808,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
|
||||
String version_name = p_preset->get("version/name");
|
||||
String min_sdk_version = p_preset->get("gradle_build/min_sdk");
|
||||
if (!min_sdk_version.is_valid_int()) {
|
||||
min_sdk_version = itos(DEFAULT_MIN_SDK_VERSION);
|
||||
min_sdk_version = itos(VULKAN_MIN_SDK_VERSION);
|
||||
}
|
||||
String target_sdk_version = p_preset->get("gradle_build/target_sdk");
|
||||
if (!target_sdk_version.is_valid_int()) {
|
||||
|
@ -2856,8 +2856,8 @@ RenderingServer::RenderingServer() {
|
||||
}
|
||||
|
||||
void RenderingServer::init() {
|
||||
GLOBAL_DEF_RST("rendering/textures/vram_compression/import_s3tc_bptc", OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_S3TC_BPTC);
|
||||
GLOBAL_DEF_RST("rendering/textures/vram_compression/import_etc2_astc", OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_ETC2_ASTC);
|
||||
GLOBAL_DEF_RST_BASIC("rendering/textures/vram_compression/import_s3tc_bptc", OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_S3TC_BPTC);
|
||||
GLOBAL_DEF_RST_BASIC("rendering/textures/vram_compression/import_etc2_astc", OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_ETC2_ASTC);
|
||||
|
||||
GLOBAL_DEF("rendering/textures/lossless_compression/force_png", false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user