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:
@@ -125,6 +125,7 @@ func TestPlatformBootclasspath_Fragments(t *testing.T) {
|
||||
unsupported_packages: [
|
||||
"bar-unsupported-packages.txt",
|
||||
],
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -274,6 +275,9 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
|
||||
"baz",
|
||||
"quuz",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
java_library {
|
||||
@@ -317,6 +321,9 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
|
||||
name: "my-bootclasspath-fragment",
|
||||
contents: ["bar"],
|
||||
apex_available: ["myapex"],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
apex_key {
|
||||
@@ -482,6 +489,9 @@ func TestPlatformBootclasspath_AlwaysUsePrebuiltSdks(t *testing.T) {
|
||||
contents: [
|
||||
"foo", "bar",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
prebuilt_bootclasspath_fragment {
|
||||
@@ -599,6 +609,9 @@ func TestPlatformBootclasspath_IncludesRemainingApexJars(t *testing.T) {
|
||||
generate_classpaths_proto: false,
|
||||
contents: ["foo"],
|
||||
apex_available: ["myapex"],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
java_library {
|
||||
@@ -656,6 +669,9 @@ func TestBootJarNotInApex(t *testing.T) {
|
||||
contents: [
|
||||
"foo",
|
||||
],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
platform_bootclasspath {
|
||||
@@ -696,6 +712,9 @@ func TestBootFragmentNotInApex(t *testing.T) {
|
||||
bootclasspath_fragment {
|
||||
name: "not-in-apex-fragment",
|
||||
contents: ["foo"],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
platform_bootclasspath {
|
||||
@@ -746,6 +765,9 @@ func TestNonBootJarInFragment(t *testing.T) {
|
||||
name: "apex-fragment",
|
||||
contents: ["foo", "bar"],
|
||||
apex_available:[ "myapex" ],
|
||||
hidden_api: {
|
||||
split_packages: ["*"],
|
||||
},
|
||||
}
|
||||
|
||||
platform_bootclasspath {
|
||||
|
Reference in New Issue
Block a user