Don't print :__pkg__ for package rules, since that's the default.
To reduce clutter a little.
// Added for rvc-dev. Used this bug as it is the bug that needs all the build changes.
Bug: 155164730
Test: m nothing
Merged-In: I0d2d86f00c3d38e603d6f58c4b1dd9a4170bf819
Change-Id: I0d2d86f00c3d38e603d6f58c4b1dd9a4170bf819
(cherry picked from commit 01407c525a
)
This commit is contained in:
parent
18a289560d
commit
68e9d96d61
2 changed files with 6 additions and 6 deletions
|
@ -140,7 +140,7 @@ func (r packageRule) matches(m qualifiedModuleName) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r packageRule) String() string {
|
func (r packageRule) String() string {
|
||||||
return fmt.Sprintf("//%s:__pkg__", r.pkg)
|
return fmt.Sprintf("//%s", r.pkg) // :__pkg__ is the default, so skip it.
|
||||||
}
|
}
|
||||||
|
|
||||||
// A subpackagesRule is a visibility rule that matches modules in a specific package (i.e.
|
// A subpackagesRule is a visibility rule that matches modules in a specific package (i.e.
|
||||||
|
|
|
@ -155,14 +155,14 @@ func TestSnapshotVisibility(t *testing.T) {
|
||||||
java_import {
|
java_import {
|
||||||
name: "mysdk_myjavalib@current",
|
name: "mysdk_myjavalib@current",
|
||||||
sdk_member_name: "myjavalib",
|
sdk_member_name: "myjavalib",
|
||||||
visibility: ["//other/foo:__pkg__"],
|
visibility: ["//other/foo"],
|
||||||
jars: ["java/myjavalib.jar"],
|
jars: ["java/myjavalib.jar"],
|
||||||
}
|
}
|
||||||
|
|
||||||
java_import {
|
java_import {
|
||||||
name: "myjavalib",
|
name: "myjavalib",
|
||||||
prefer: false,
|
prefer: false,
|
||||||
visibility: ["//other/foo:__pkg__"],
|
visibility: ["//other/foo"],
|
||||||
jars: ["java/myjavalib.jar"],
|
jars: ["java/myjavalib.jar"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,21 +183,21 @@ java_import {
|
||||||
java_import {
|
java_import {
|
||||||
name: "mysdk_mydefaultedjavalib@current",
|
name: "mysdk_mydefaultedjavalib@current",
|
||||||
sdk_member_name: "mydefaultedjavalib",
|
sdk_member_name: "mydefaultedjavalib",
|
||||||
visibility: ["//other/bar:__pkg__"],
|
visibility: ["//other/bar"],
|
||||||
jars: ["java/mydefaultedjavalib.jar"],
|
jars: ["java/mydefaultedjavalib.jar"],
|
||||||
}
|
}
|
||||||
|
|
||||||
java_import {
|
java_import {
|
||||||
name: "mydefaultedjavalib",
|
name: "mydefaultedjavalib",
|
||||||
prefer: false,
|
prefer: false,
|
||||||
visibility: ["//other/bar:__pkg__"],
|
visibility: ["//other/bar"],
|
||||||
jars: ["java/mydefaultedjavalib.jar"],
|
jars: ["java/mydefaultedjavalib.jar"],
|
||||||
}
|
}
|
||||||
|
|
||||||
sdk_snapshot {
|
sdk_snapshot {
|
||||||
name: "mysdk@current",
|
name: "mysdk@current",
|
||||||
visibility: [
|
visibility: [
|
||||||
"//other/foo:__pkg__",
|
"//other/foo",
|
||||||
"//package:__subpackages__",
|
"//package:__subpackages__",
|
||||||
],
|
],
|
||||||
java_header_libs: [
|
java_header_libs: [
|
||||||
|
|
Loading…
Reference in a new issue