Revert "Relax apex package restriction for T+ jars"

This reverts commit 1fdd6ca88a.

Reason for revert: b/205289292 tracks the real fix for this

Test: presubmit
Change-Id: I5a2edaf4f930dafa26659f85d9425e9041c72275
Merged-In: I5a2edaf4f930dafa26659f85d9425e9041c72275
This commit is contained in:
Anton Hansson
2021-12-23 15:05:38 +00:00
committed by Spandan Das
parent 3aae38d451
commit e1b1836939
4 changed files with 25 additions and 180 deletions

View File

@@ -327,48 +327,6 @@ var neverallowTests = []struct {
"Only boot images may be imported as a makefile goal.",
},
},
{
name: "min_sdk too low",
fs: map[string][]byte{
"Android.bp": []byte(`
java_library {
name: "min_sdk_too_low",
min_sdk_version: "30",
}`),
},
rules: []Rule{
NeverAllow().WithMatcher("min_sdk_version", LessThanSdkVersion("31")),
},
expectedErrors: []string{
"module \"min_sdk_too_low\": violates neverallow",
},
},
{
name: "min_sdk high enough",
fs: map[string][]byte{
"Android.bp": []byte(`
java_library {
name: "min_sdk_high_enough",
min_sdk_version: "31",
}`),
},
rules: []Rule{
NeverAllow().WithMatcher("min_sdk_version", LessThanSdkVersion("31")),
},
},
{
name: "current min_sdk high enough",
fs: map[string][]byte{
"Android.bp": []byte(`
java_library {
name: "current_min_sdk_high_enough",
min_sdk_version: "current",
}`),
},
rules: []Rule{
NeverAllow().WithMatcher("min_sdk_version", LessThanSdkVersion("31")),
},
},
}
var prepareForNeverAllowTest = GroupFixturePreparers(
@@ -452,10 +410,9 @@ func (p *mockCcLibraryModule) GenerateAndroidBuildActions(ModuleContext) {
}
type mockJavaLibraryProperties struct {
Libs []string
Min_sdk_version *string
Sdk_version *string
Uncompress_dex *bool
Libs []string
Sdk_version *string
Uncompress_dex *bool
}
type mockJavaLibraryModule struct {