Commit a71864a7 authored by Pavel Yatsuk's avatar Pavel Yatsuk Committed by Commit Bot

Revert "Android: Increase default_min_sdk_version 19 -> 21"

This reverts commit ce14e58b.

Reason for revert: The CL causes failures on Cronet KitKat builders https://ci.chromium.org/p/chromium/builders/ci/android-cronet-kitkat-arm-rel

The error code is INSTALL_FAILED_OLDER_SDK
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8878029920810653312/+/steps/cronet_smoketests_missing_native_library_instrumentation_apk_on_Android_device_Nexus_5/0/stdout

Original change's description:
> Android: Increase default_min_sdk_version 19 -> 21
> 
> Cronet is the only project that requires a lower minSdkVersion. To
> continue supporting building of their targets, this change enabled
> proguard on all of their apks in order to have all files desugared at
> the proper minApiVersion.
> 
> This change should speed up compiles somewhat, as it removes the need to
> generate main-dex-lists for legacy multidex purposes.
> 
> Bug: 1091919
> Change-Id: Ifd8089bbf4965b55a13dea11464ccda979fd5028
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2233581
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#776166}

TBR=wnwen@chromium.org,agrieve@chromium.org

Change-Id: Id4b92d5549d13de9684f542ce646993c3833795f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1091919
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2236715Reviewed-by: default avatarPavel Yatsuk <pavely@chromium.org>
Commit-Queue: Pavel Yatsuk <pavely@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776237}
parent 7b82cd18
......@@ -46,8 +46,9 @@ if (is_android || is_chromeos) {
enable_chrome_android_internal = has_chrome_android_internal
# The default to use for android:minSdkVersion for targets that do
# not explicitly set it.
default_min_sdk_version = 21
# not explicitly set it. This can generally be set higher than the
# default, but not lower.
default_min_sdk_version = 19
# Android API level for 32 bits platforms
android32_ndk_api_level = 16
......
......@@ -1304,9 +1304,6 @@ if (enable_java_templates) {
}
}
# It's not safe to dex merge with libraries dex'ed at higher api versions.
assert(!_is_dex_merging || _min_sdk_version >= default_min_sdk_version)
# For D8's backported method desugaring to work properly, the dex merge step
# must not be set to a higher minSdkVersion than it was for the libraries.
if (_enable_desugar && _is_dex_merging) {
......@@ -3255,6 +3252,8 @@ if (enable_java_templates) {
# from the final .jar file.
# jar_included_patterns: Optional list of .class file patterns to include
# in the final .jar file. jar_excluded_patterns take precedence over this.
# min_sdk_version: Optional. The minimum Android SDK version this target
# supports.
#
# For 'android_apk' and 'android_app_bundle_module' targets only:
#
......
......@@ -2430,7 +2430,9 @@ if (enable_java_templates) {
_final_deps = []
_enable_main_dex_list = _enable_multidex && _min_sdk_version < 21
_enable_main_dex_list =
_enable_multidex &&
(!defined(invoker.min_sdk_version) || invoker.min_sdk_version < 21)
if (_enable_main_dex_list) {
_generated_proguard_main_dex_config =
"$_base_path.resources.main-dex-proguard.txt"
......@@ -2925,16 +2927,12 @@ if (enable_java_templates) {
deps += _deps + [ ":$_compile_resources_target" ]
proguard_mapping_path = _proguard_mapping_path
proguard_sourcefile_suffix = "$android_channel-$_version_code"
} else if (_min_sdk_version >= default_min_sdk_version) {
# Enable dex merging only when min_sdk_version is >= what the library
# .dex files were created with.
} else {
input_dex_filearg =
"@FileArg(${_rebased_build_config}:final_dex:all_dex_files)"
if (_enable_main_dex_list) {
main_dex_list_input_classes_filearg = "@FileArg(${_rebased_build_config}:deps_info:java_runtime_classpath)"
}
} else {
input_classes_filearg = "@FileArg($_rebased_build_config:deps_info:java_runtime_classpath)"
}
if (_is_static_library_provider) {
......
......@@ -10,6 +10,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="org.chromium.android_browsertests_apk">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
......
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