summaryrefslogtreecommitdiff
path: root/sdk/exports_test.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2020-09-29 16:00:55 +0100
committer Paul Duffin <paulduffin@google.com> 2020-10-01 18:20:13 +0100
commitd99d997238b5b3a0bed1e859ef7bdd6fd6109340 (patch)
treee22022b0d6944065b33e0e9d2c0e5ee467e77580 /sdk/exports_test.go
parent45dda43df0b32122d833d43166f2fa2f9a170889 (diff)
Explicitly specify visibility in sdk/module_exports snapshot
This change ensures that each prebuilt in a snapshot explicitly specifies its visibility even when that visibility is the current default. This is done for two reasons: 1. It simplifies a follow up change that adds visibility rules to an existing set of rules. 2. It ensures that the snapshots are independent of the current Soong default visibility. The latter is important because we intend to switch from modules being visible to everyone by default (i.e. //visibility:public) to only being visible to modules in the same package (i.e. //visibility:private). By making the snapshots of modules that do not specify any visibility explicitly specify that they are "//visibility:public" it ensures that the snapshots will not need to be changed when the default changes. Bug: 168301990 Test: m nothing Change-Id: Ia034f4a1e5124c17f46d73b0e9a6c5f2a251038e
Diffstat (limited to 'sdk/exports_test.go')
-rw-r--r--sdk/exports_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/sdk/exports_test.go b/sdk/exports_test.go
index 20e25212c..aa1200fed 100644
--- a/sdk/exports_test.go
+++ b/sdk/exports_test.go
@@ -49,17 +49,20 @@ func TestModuleExportsSnapshot(t *testing.T) {
java_import {
name: "myexports_myjavalib@current",
sdk_member_name: "myjavalib",
+ visibility: ["//visibility:public"],
jars: ["java/myjavalib.jar"],
}
java_import {
name: "myjavalib",
prefer: false,
+ visibility: ["//visibility:public"],
jars: ["java/myjavalib.jar"],
}
module_exports_snapshot {
name: "myexports@current",
+ visibility: ["//visibility:public"],
java_libs: ["myexports_myjavalib@current"],
}
`))