Skip to content
Snippets Groups Projects
Commit 42fd56a0 authored by Anton Hansson's avatar Anton Hansson
Browse files

Limit build visibility of modules in apex/...

This changes the default visibility of soong modules in this directory
to __subpackages__, from the current public default.

This helps accidental dependencies sneaking in without intent from
the module owner.

Bug: 175604587
Test: m nothing
Exempt-From-Owner-Approval: cp
Merged-In: I1df8b8e087d27f62ce8c09d7e6e32d511efdba6b
Change-Id: I1df8b8e087d27f62ce8c09d7e6e32d511efdba6b
parent b9653a95
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package {
default_visibility: [":__subpackages__"],
}
mainline_stubs_args =
"--error UnhiddenSystemApi " +
"--hide BroadcastBehavior " +
......@@ -129,6 +133,13 @@ java_defaults {
enabled: true,
sdk_version: "module_current",
},
defaults_visibility: [
":__subpackages__",
"//frameworks/base/libs/hwui",
"//frameworks/base/wifi",
"//packages/modules:__subpackages__",
"//packages/providers/MediaProvider:__subpackages__",
],
}
// Defaults for mainline module system server provided java_sdk_library instances.
......@@ -140,6 +151,10 @@ java_defaults {
enabled: true,
sdk_version: "module_current",
},
defaults_visibility: [
":__subpackages__",
"//packages/modules:__subpackages__",
],
}
stubs_defaults {
......
......@@ -19,6 +19,7 @@ filegroup {
"java/**/*.aidl"
],
path: "java",
visibility: ["//frameworks/base"],
}
java_library {
......
......@@ -25,4 +25,9 @@ java_library {
"services.core",
"services.usage",
],
visibility: [
// These are required until blobstore is properly unbundled.
"//frameworks/base/services",
"//frameworks/base/services/tests/mockingservicestests",
],
}
......@@ -8,6 +8,7 @@ filegroup {
"java/android/os/IDeviceIdleController.aidl",
],
path: "java",
visibility: ["//frameworks/base"],
}
java_library {
......
......@@ -13,4 +13,12 @@ java_library {
"framework",
"services.core",
],
visibility: [
"//frameworks/base/apex/jobscheduler:__subpackages__",
// These are required until jobscheduler is properly unbundled.
"//frameworks/base/services",
"//frameworks/base/services/tests/mockingservicestests",
"//frameworks/base/services/tests/servicestests",
"//frameworks/base/tests/JobSchedulerPerfTests",
],
}
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
default_visibility: [
":__subpackages__",
"//frameworks/av/apex",
"//frameworks/av/apex/testing",
],
}
......@@ -48,6 +48,10 @@ java_library {
"test_com.android.media",
],
min_sdk_version: "29",
visibility: [
"//frameworks/av/apex:__subpackages__",
"//frameworks/base", // For framework-all
],
}
filegroup {
......@@ -57,6 +61,7 @@ filegroup {
":mediasession2-java-srcs",
":mediasession2-aidl-srcs",
],
visibility: ["//frameworks/base"],
}
filegroup {
......
......@@ -19,6 +19,7 @@ filegroup {
"java/**/*.aidl",
],
path: "java",
visibility: ["//frameworks/base"],
}
java_sdk_library {
......
......@@ -18,6 +18,7 @@ filegroup {
"java/**/*.java",
],
path: "java",
visibility: ["//frameworks/base/services"],
}
java_sdk_library {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment