Merge "Remove prebuilt_visibility
from sdk
" into main am: 7873049d98
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3263045 Change-Id: If3f0bab45232e7050f8e2456bafe4356bee6c84d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
16
sdk/sdk.go
16
sdk/sdk.go
@@ -84,20 +84,6 @@ type sdkProperties struct {
|
|||||||
|
|
||||||
// True if this is a module_exports (or module_exports_snapshot) module type.
|
// True if this is a module_exports (or module_exports_snapshot) module type.
|
||||||
Module_exports bool `blueprint:"mutated"`
|
Module_exports bool `blueprint:"mutated"`
|
||||||
|
|
||||||
// The additional visibility to add to the prebuilt modules to allow them to
|
|
||||||
// reference each other.
|
|
||||||
//
|
|
||||||
// This can only be used to widen the visibility of the members:
|
|
||||||
//
|
|
||||||
// * Specifying //visibility:public here will make all members visible and
|
|
||||||
// essentially ignore their own visibility.
|
|
||||||
// * Specifying //visibility:private here is an error.
|
|
||||||
// * Specifying any other rule here will add it to the members visibility and
|
|
||||||
// be output to the member prebuilt in the snapshot. Duplicates will be
|
|
||||||
// dropped. Adding a rule to members that have //visibility:private will
|
|
||||||
// cause the //visibility:private to be discarded.
|
|
||||||
Prebuilt_visibility []string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// sdk defines an SDK which is a logical group of modules (e.g. native libs, headers, java libs, etc.)
|
// sdk defines an SDK which is a logical group of modules (e.g. native libs, headers, java libs, etc.)
|
||||||
@@ -130,8 +116,6 @@ func newSdkModule(moduleExports bool) *sdk {
|
|||||||
|
|
||||||
s.AddProperties(&s.properties, s.dynamicMemberTypeListProperties, &traitsWrapper)
|
s.AddProperties(&s.properties, s.dynamicMemberTypeListProperties, &traitsWrapper)
|
||||||
|
|
||||||
// Make sure that the prebuilt visibility property is verified for errors.
|
|
||||||
android.AddVisibilityProperty(s, "prebuilt_visibility", &s.properties.Prebuilt_visibility)
|
|
||||||
android.InitCommonOSAndroidMultiTargetsArchModule(s, android.HostAndDeviceSupported, android.MultilibCommon)
|
android.InitCommonOSAndroidMultiTargetsArchModule(s, android.HostAndDeviceSupported, android.MultilibCommon)
|
||||||
android.InitDefaultableModule(s)
|
android.InitDefaultableModule(s)
|
||||||
android.AddLoadHook(s, func(ctx android.LoadHookContext) {
|
android.AddLoadHook(s, func(ctx android.LoadHookContext) {
|
||||||
|
@@ -53,9 +53,6 @@ func TestSnapshotVisibility(t *testing.T) {
|
|||||||
// generated sdk_snapshot.
|
// generated sdk_snapshot.
|
||||||
":__subpackages__",
|
":__subpackages__",
|
||||||
],
|
],
|
||||||
prebuilt_visibility: [
|
|
||||||
"//prebuilts/mysdk",
|
|
||||||
],
|
|
||||||
java_header_libs: [
|
java_header_libs: [
|
||||||
"myjavalib",
|
"myjavalib",
|
||||||
"mypublicjavalib",
|
"mypublicjavalib",
|
||||||
@@ -162,18 +159,6 @@ java_import {
|
|||||||
`))
|
`))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPrebuiltVisibilityProperty_IsValidated(t *testing.T) {
|
|
||||||
testSdkError(t, `prebuilt_visibility: cannot mix "//visibility:private" with any other visibility rules`, `
|
|
||||||
sdk {
|
|
||||||
name: "mysdk",
|
|
||||||
prebuilt_visibility: [
|
|
||||||
"//foo",
|
|
||||||
"//visibility:private",
|
|
||||||
],
|
|
||||||
}
|
|
||||||
`)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestSdkInstall(t *testing.T) {
|
func TestSdkInstall(t *testing.T) {
|
||||||
sdk := `
|
sdk := `
|
||||||
sdk {
|
sdk {
|
||||||
|
Reference in New Issue
Block a user