bootclasspath_fragment: Require at least one hidden_api package property
Previously, the split_packages, single_packages and package_prefixes properties were all optional and the split_packages defaulted to ["*"]. As that value conflicted with the other package properties that meant that split_packages always had to be specified even if it was to just set it to an empty array. This change requires at least one of them to be specified and defaults split_packages to an empty list which means it is not required, although it can be helpful to make that explicit. Bug: 194063708 Test: m nothing Change-Id: I5a4c2d68e72e39f5c4a2441326dfce8685fc8ff2
This commit is contained in:
@@ -110,6 +110,9 @@ func TestBootclasspathFragments(t *testing.T) {
|
||||
apex_available: [
|
||||
"com.android.art",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
`,
|
||||
)
|
||||
@@ -209,6 +212,9 @@ func TestBootclasspathFragments_FragmentDependency(t *testing.T) {
|
||||
apex_available: [
|
||||
"com.android.art",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
bootclasspath_fragment {
|
||||
@@ -220,6 +226,9 @@ func TestBootclasspathFragments_FragmentDependency(t *testing.T) {
|
||||
module: "art-bootclasspath-fragment",
|
||||
},
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
`,
|
||||
)
|
||||
@@ -361,6 +370,9 @@ func TestBootclasspathFragmentInArtApex(t *testing.T) {
|
||||
apex_available: [
|
||||
"com.android.art",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
`, contentsInsert(contents))
|
||||
|
||||
@@ -853,6 +865,9 @@ func TestBootclasspathFragmentContentsNoName(t *testing.T) {
|
||||
apex_available: [
|
||||
"myapex",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
`)
|
||||
|
||||
@@ -959,6 +974,9 @@ func TestBootclasspathFragment_HiddenAPIList(t *testing.T) {
|
||||
apex_available: [
|
||||
"com.android.art",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
apex {
|
||||
@@ -1010,6 +1028,9 @@ func TestBootclasspathFragment_HiddenAPIList(t *testing.T) {
|
||||
module: "art-bootclasspath-fragment",
|
||||
},
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
`)
|
||||
|
||||
@@ -1123,6 +1144,9 @@ func TestBootclasspathFragment_AndroidNonUpdatable(t *testing.T) {
|
||||
apex_available: [
|
||||
"com.android.art",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
apex {
|
||||
@@ -1175,6 +1199,9 @@ func TestBootclasspathFragment_AndroidNonUpdatable(t *testing.T) {
|
||||
module: "art-bootclasspath-fragment",
|
||||
},
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
`)
|
||||
|
||||
@@ -1282,6 +1309,9 @@ func TestBootclasspathFragment_AndroidNonUpdatable_AlwaysUsePrebuiltSdks(t *test
|
||||
apex_available: [
|
||||
"com.android.art",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
apex {
|
||||
@@ -1334,6 +1364,9 @@ func TestBootclasspathFragment_AndroidNonUpdatable_AlwaysUsePrebuiltSdks(t *test
|
||||
module: "art-bootclasspath-fragment",
|
||||
},
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
`)
|
||||
|
||||
|
Reference in New Issue
Block a user