summaryrefslogtreecommitdiff
path: root/sdk/sdk_test.go
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2020-05-13 02:20:06 +0100
committer Paul Duffin <paulduffin@google.com> 2020-05-16 12:07:03 +0100
commitf8533bc6369b960e891e5edaa62b997dce95e9d4 (patch)
tree50f0130e10e1c1bcc89297740d8fa7534d03bea4 /sdk/sdk_test.go
parent68e9d96d61049c39698808cf3186c3d9b8cfc6c4 (diff)
Add explicit visibility on the self package in EffectiveVisibilityRules.
Modules in a package is implicitly visible within the same package. When making effective visibility rules which work from another location that visibility needs to be mentioned explicitly. In practice this allows prebuilts to remain visible to other modules in the source package when the prebuilts are preferred. Test: m nothing Test: m conscrypt-module-sdk, check that the snapshot Soong modules give visibility to //external/conscrypt Bug: 151303681 Merged-In: I404f6e5ca7021974a8c7be5e4d6b4982c050b8a5 Change-Id: I404f6e5ca7021974a8c7be5e4d6b4982c050b8a5 (cherry picked from commit 0641d189d0cbf26cd23d584e621fc944c00abb46)
Diffstat (limited to 'sdk/sdk_test.go')
-rw-r--r--sdk/sdk_test.go20
1 files changed, 16 insertions, 4 deletions
diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go
index eb514342b..9bbf410b7 100644
--- a/sdk/sdk_test.go
+++ b/sdk/sdk_test.go
@@ -155,14 +155,20 @@ func TestSnapshotVisibility(t *testing.T) {
java_import {
name: "mysdk_myjavalib@current",
sdk_member_name: "myjavalib",
- visibility: ["//other/foo"],
+ visibility: [
+ "//other/foo",
+ "//package",
+ ],
jars: ["java/myjavalib.jar"],
}
java_import {
name: "myjavalib",
prefer: false,
- visibility: ["//other/foo"],
+ visibility: [
+ "//other/foo",
+ "//package",
+ ],
jars: ["java/myjavalib.jar"],
}
@@ -183,14 +189,20 @@ java_import {
java_import {
name: "mysdk_mydefaultedjavalib@current",
sdk_member_name: "mydefaultedjavalib",
- visibility: ["//other/bar"],
+ visibility: [
+ "//other/bar",
+ "//package",
+ ],
jars: ["java/mydefaultedjavalib.jar"],
}
java_import {
name: "mydefaultedjavalib",
prefer: false,
- visibility: ["//other/bar"],
+ visibility: [
+ "//other/bar",
+ "//package",
+ ],
jars: ["java/mydefaultedjavalib.jar"],
}