Commit b7fb15b1 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Bump default target_sdk_version 24 -> SDK used to compile

Why do this?
* It's best practice to target the latest sdk, so this makes for a
  better default.
* Many targets were neglecting to ever update this value

TBR=agrieve  # Minor BUILD.gn refactoring

Bug: None
Change-Id: Idb3983bcfb7a1ddaf13900e0acdbee425a450225
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2265513
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#783112}
parent 6f393379
...@@ -66,7 +66,6 @@ template("system_webview_apk_or_module_tmpl") { ...@@ -66,7 +66,6 @@ template("system_webview_apk_or_module_tmpl") {
} }
} }
target_sdk_version = android_sdk_version
product_config_java_packages = [ webview_product_config_java_package ] product_config_java_packages = [ webview_product_config_java_package ]
if (webview_includes_weblayer) { if (webview_includes_weblayer) {
......
...@@ -43,6 +43,8 @@ python_library("system_webview_wpt") { ...@@ -43,6 +43,8 @@ python_library("system_webview_wpt") {
} }
android_apk("webview_instrumentation_apk") { android_apk("webview_instrumentation_apk") {
# TODO(crbug.com/1099536): Fix tests that break when this is increased.
target_sdk_version = 24
deps = [ deps = [
":webview_instrumentation_apk_assets", ":webview_instrumentation_apk_assets",
":webview_instrumentation_apk_resources", ":webview_instrumentation_apk_resources",
...@@ -157,6 +159,7 @@ instrumentation_test_apk("webview_instrumentation_test_apk") { ...@@ -157,6 +159,7 @@ instrumentation_test_apk("webview_instrumentation_test_apk") {
apk_under_test = ":webview_instrumentation_apk" apk_under_test = ":webview_instrumentation_apk"
android_manifest = "../javatests/AndroidManifest.xml" android_manifest = "../javatests/AndroidManifest.xml"
min_sdk_version = 21 min_sdk_version = 21
deps = [ deps = [
":webview_instrumentation_test_utils_java", ":webview_instrumentation_test_utils_java",
"//android_webview:android_webview_java", "//android_webview:android_webview_java",
......
...@@ -48,7 +48,6 @@ android_apk("system_webview_shell_apk") { ...@@ -48,7 +48,6 @@ android_apk("system_webview_shell_apk") {
] ]
android_manifest = system_webview_shell_android_manifest android_manifest = system_webview_shell_android_manifest
android_manifest_dep = ":system_webview_shell_manifest" android_manifest_dep = ":system_webview_shell_manifest"
target_sdk_version = 29
deps = [ deps = [
":system_webview_shell_apk_resources", ":system_webview_shell_apk_resources",
"//base:base_java", "//base:base_java",
......
...@@ -64,7 +64,6 @@ shared_library("jni_sample_lib") { ...@@ -64,7 +64,6 @@ shared_library("jni_sample_lib") {
android_apk("sample_jni_apk") { android_apk("sample_jni_apk") {
apk_name = "SampleJni" apk_name = "SampleJni"
android_manifest = "AndroidManifest.xml" android_manifest = "AndroidManifest.xml"
target_sdk_version = 24
deps = [ deps = [
":jni_sample_java", ":jni_sample_java",
"//base:base_java", "//base:base_java",
......
...@@ -1374,7 +1374,7 @@ if (enable_java_templates) { ...@@ -1374,7 +1374,7 @@ if (enable_java_templates) {
} }
arsc_output = _resource_arsc_output arsc_output = _resource_arsc_output
min_sdk_version = default_min_sdk_version min_sdk_version = default_min_sdk_version
target_sdk_version = 23 target_sdk_version = android_sdk_version
} }
_jni_srcjar_target = "${target_name}__final_jni" _jni_srcjar_target = "${target_name}__final_jni"
...@@ -2108,7 +2108,7 @@ if (enable_java_templates) { ...@@ -2108,7 +2108,7 @@ if (enable_java_templates) {
# min_sdk_version: The minimum Android SDK version this target supports. # min_sdk_version: The minimum Android SDK version this target supports.
# Optional, default $default_min_sdk_version. # Optional, default $default_min_sdk_version.
# target_sdk_version: The target Android SDK version for this target. # target_sdk_version: The target Android SDK version for this target.
# Optional, default 23. # Optional, default to android_sdk_version.
# max_sdk_version: The maximum Android SDK version this target supports. # max_sdk_version: The maximum Android SDK version this target supports.
# Optional, default not set. # Optional, default not set.
# require_native_mocks: Enforce that any native calls using # require_native_mocks: Enforce that any native calls using
...@@ -2142,7 +2142,7 @@ if (enable_java_templates) { ...@@ -2142,7 +2142,7 @@ if (enable_java_templates) {
_build_config_target = "$target_name$build_config_target_suffix" _build_config_target = "$target_name$build_config_target_suffix"
_min_sdk_version = default_min_sdk_version _min_sdk_version = default_min_sdk_version
_target_sdk_version = 23 _target_sdk_version = android_sdk_version
if (defined(invoker.min_sdk_version)) { if (defined(invoker.min_sdk_version)) {
_min_sdk_version = invoker.min_sdk_version _min_sdk_version = invoker.min_sdk_version
} }
......
...@@ -158,7 +158,6 @@ template("chrome_public_common_apk_or_module_tmpl") { ...@@ -158,7 +158,6 @@ template("chrome_public_common_apk_or_module_tmpl") {
} else { } else {
min_sdk_version = 21 min_sdk_version = 21
} }
target_sdk_version = android_sdk_version
resource_exclusion_regex = common_resource_exclusion_regex resource_exclusion_regex = common_resource_exclusion_regex
resource_exclusion_exceptions = common_resource_exclusion_exceptions resource_exclusion_exceptions = common_resource_exclusion_exceptions
......
...@@ -95,7 +95,6 @@ template("chrome_feature_module") { ...@@ -95,7 +95,6 @@ template("chrome_feature_module") {
"version_name", "version_name",
]) ])
android_manifest = _module_desc.android_manifest android_manifest = _module_desc.android_manifest
target_sdk_version = android_sdk_version
deps = [ ":${target_name}__module_desc_java" ] deps = [ ":${target_name}__module_desc_java" ]
if (defined(_module_desc.pak_deps)) { if (defined(_module_desc.pak_deps)) {
deps += [ ":${target_name}__pak_assets" ] deps += [ ":${target_name}__pak_assets" ]
......
...@@ -108,7 +108,6 @@ template("trichrome_library_apk_tmpl") { ...@@ -108,7 +108,6 @@ template("trichrome_library_apk_tmpl") {
} }
min_sdk_version = 29 min_sdk_version = 29
target_sdk_version = android_sdk_version
if (trichrome_synchronized_proguard) { if (trichrome_synchronized_proguard) {
product_version_resources_dep = product_version_resources_dep =
......
...@@ -242,10 +242,7 @@ template("webapk_tmpl") { ...@@ -242,10 +242,7 @@ template("webapk_tmpl") {
android_manifest = _manifest_output android_manifest = _manifest_output
android_manifest_dep = ":$_manifest_target_name" android_manifest_dep = ":$_manifest_target_name"
min_sdk_version = 21
target_sdk_version = 29
never_incremental = true never_incremental = true
enable_multidex = false
# Force 32 bit mode on 64 bit devices. # Force 32 bit mode on 64 bit devices.
native_lib_placeholders = [ "libfoo.so" ] native_lib_placeholders = [ "libfoo.so" ]
......
...@@ -20,5 +20,4 @@ android_apk("chrome_public_test_support_apk") { ...@@ -20,5 +20,4 @@ android_apk("chrome_public_test_support_apk") {
apk_name = "ChromePublicTestSupport" apk_name = "ChromePublicTestSupport"
android_manifest = "AndroidManifest.xml" android_manifest = "AndroidManifest.xml"
target_sdk_version = 22
} }
...@@ -233,6 +233,9 @@ content_shell_apk_tmpl("content_shell_test_apk") { ...@@ -233,6 +233,9 @@ content_shell_apk_tmpl("content_shell_test_apk") {
if (enable_chrome_android_internal) { if (enable_chrome_android_internal) {
data_deps += [ "//clank/build/bot/filters:content_shell_test_apk_filters" ] data_deps += [ "//clank/build/bot/filters:content_shell_test_apk_filters" ]
} }
# TODO(crbug.com/1099536): Fix tests that break when this is increased.
target_sdk_version = 24
} }
android_library("content_shell_test_java") { android_library("content_shell_test_java") {
......
...@@ -169,6 +169,4 @@ instrumentation_test_apk("mojo_test_apk") { ...@@ -169,6 +169,4 @@ instrumentation_test_apk("mojo_test_apk") {
shared_libraries = [ ":mojo_java_unittests" ] shared_libraries = [ ":mojo_java_unittests" ]
apk_name = "MojoTest" apk_name = "MojoTest"
android_manifest = "javatests/AndroidManifest.xml" android_manifest = "javatests/AndroidManifest.xml"
target_sdk_version = 21
enable_multidex = false
} }
...@@ -165,7 +165,6 @@ remoting_localize("remoting_test_apk_manifest") { ...@@ -165,7 +165,6 @@ remoting_localize("remoting_test_apk_manifest") {
instrumentation_test_apk("remoting_test_apk") { instrumentation_test_apk("remoting_test_apk") {
android_manifest = "$root_gen_dir/remoting/android_test/AndroidManifest.xml" android_manifest = "$root_gen_dir/remoting/android_test/AndroidManifest.xml"
android_manifest_dep = ":remoting_test_apk_manifest" android_manifest_dep = ":remoting_test_apk_manifest"
target_sdk_version = 23
apk_name = "ChromotingTest" apk_name = "ChromotingTest"
apk_under_test = ":remoting_apk" apk_under_test = ":remoting_apk"
sources = [ sources = [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment