[aapt2] dump badging: rename sdkVersion to minSdkVersion
`aapt2 dump badging` will label the minSdkVersion as "sdkVersion". This
is inconsistent with the labels for targetSdkVersion and maxSdkVersion,
which include the target/max prefixes.
Change the label of of minSdkVersion from "sdkVersion" to
"minSdkVersion" to reduce the risk of confusion.
Bug: 292216817
Test: atest aapt2_tests
Test: aapt2 dump badging <path-to-apk> # manually inspect output, compare with aapt2 dump xmltree --file AndroidManifest.xml <path-to-apk>
Change-Id: Ic9f74636ecd1daa67f62bd8839f7ce095f351ad5
diff --git a/tools/aapt2/dump/DumpManifest.cpp b/tools/aapt2/dump/DumpManifest.cpp
index a43bf1b..6bf265d 100644
--- a/tools/aapt2/dump/DumpManifest.cpp
+++ b/tools/aapt2/dump/DumpManifest.cpp
@@ -837,9 +837,9 @@
void Print(text::Printer* printer) override {
if (min_sdk) {
- printer->Print(StringPrintf("sdkVersion:'%d'\n", *min_sdk));
+ printer->Print(StringPrintf("minSdkVersion:'%d'\n", *min_sdk));
} else if (min_sdk_name) {
- printer->Print(StringPrintf("sdkVersion:'%s'\n", min_sdk_name->data()));
+ printer->Print(StringPrintf("minSdkVersion:'%s'\n", min_sdk_name->data()));
}
if (max_sdk) {
printer->Print(StringPrintf("maxSdkVersion:'%d'\n", *max_sdk));
diff --git a/tools/aapt2/integration-tests/DumpTest/built_with_aapt_expected.txt b/tools/aapt2/integration-tests/DumpTest/built_with_aapt_expected.txt
index cc0b3bf..d14e5fb5 100644
--- a/tools/aapt2/integration-tests/DumpTest/built_with_aapt_expected.txt
+++ b/tools/aapt2/integration-tests/DumpTest/built_with_aapt_expected.txt
@@ -1,5 +1,5 @@
package: name='com.aapt.app' versionCode='222' versionName='222' platformBuildVersionName='12' platformBuildVersionCode='32' compileSdkVersion='32' compileSdkVersionCodename='12'
-sdkVersion:'22'
+minSdkVersion:'22'
targetSdkVersion:'32'
application: label='App' icon=''
feature-group: label=''
diff --git a/tools/aapt2/integration-tests/DumpTest/components_expected.txt b/tools/aapt2/integration-tests/DumpTest/components_expected.txt
index 9c81fb8..93cce0a 100644
--- a/tools/aapt2/integration-tests/DumpTest/components_expected.txt
+++ b/tools/aapt2/integration-tests/DumpTest/components_expected.txt
@@ -1,5 +1,5 @@
package: name='com.example.bundletool.minimal' versionCode='1' versionName='1.0' platformBuildVersionName='12' platformBuildVersionCode='31' compileSdkVersion='31' compileSdkVersionCodename='12'
-sdkVersion:'21'
+minSdkVersion:'21'
targetSdkVersion:'31'
uses-configuration: reqTouchScreen='3' reqKeyboardType='2' reqHardKeyboard='-1' reqNavigation='3' reqFiveWayNav='-1'
supports-gl-texture:'GL_OES_compressed_paletted_texture'
diff --git a/tools/aapt2/integration-tests/DumpTest/minimal_expected.txt b/tools/aapt2/integration-tests/DumpTest/minimal_expected.txt
index 85ab5d8..aafca68 100644
--- a/tools/aapt2/integration-tests/DumpTest/minimal_expected.txt
+++ b/tools/aapt2/integration-tests/DumpTest/minimal_expected.txt
@@ -1,5 +1,5 @@
package: name='com.lato.bubblegirl' versionCode='33' versionName='1.0.0' platformBuildVersionName='8.1.0' platformBuildVersionCode='27'
-sdkVersion:'19'
+minSdkVersion:'19'
targetSdkVersion:'26'
application-label:'Bubble Girl'
application-label-ar:'Bubble Girl'
diff --git a/tools/aapt2/integration-tests/DumpTest/multiple_uses_sdk_expected.txt b/tools/aapt2/integration-tests/DumpTest/multiple_uses_sdk_expected.txt
index 85e8d0a..f48f381 100644
--- a/tools/aapt2/integration-tests/DumpTest/multiple_uses_sdk_expected.txt
+++ b/tools/aapt2/integration-tests/DumpTest/multiple_uses_sdk_expected.txt
@@ -1,5 +1,5 @@
package: name='com.test.e17wmultiapknexus' versionCode='107' versionName='14' platformBuildVersionName='2.3.3' platformBuildVersionCode='10'
-sdkVersion:'1'
+minSdkVersion:'1'
application-label:'w45wmultiapknexus_10'
application-icon-120:'res/drawable-ldpi-v4/icon.png'
application-icon-160:'res/drawable-mdpi-v4/icon.png'