Add ability to set --rotation-min-sdk-version for signapk via Android.bp files.
(vs via Android.mk files, done earlier in http://ag/16094391)
Bug: 197787352
Test: Added unit tests.
Change-Id: I3ccd2f2134b069fb4c4a90fe384c23c1814c2ba2
diff --git a/java/app_import_test.go b/java/app_import_test.go
index efa52c1..55d24c4 100644
--- a/java/app_import_test.go
+++ b/java/app_import_test.go
@@ -112,6 +112,7 @@
certificate: "platform",
additional_certificates: [":additional_certificate"],
lineage: "lineage.bin",
+ rotationMinSdkVersion: "32",
}
android_app_certificate {
@@ -131,11 +132,12 @@
if expected != certificatesFlag {
t.Errorf("Incorrect certificates flags, expected: %q, got: %q", expected, certificatesFlag)
}
- // Check cert signing lineage flag.
- signingFlag := signedApk.Args["flags"]
- expected = "--lineage lineage.bin"
- if expected != signingFlag {
- t.Errorf("Incorrect signing flags, expected: %q, got: %q", expected, signingFlag)
+
+ // Check cert signing flags.
+ actualCertSigningFlags := signedApk.Args["flags"]
+ expectedCertSigningFlags := "--lineage lineage.bin --rotation-min-sdk-version 32"
+ if expectedCertSigningFlags != actualCertSigningFlags {
+ t.Errorf("Incorrect signing flags, expected: %q, got: %q", expectedCertSigningFlags, actualCertSigningFlags)
}
}