xref: /aosp_15_r20/frameworks/base/OWNERS.md (revision d57664e9bc4670b3ecf6748a746a57c557b6bc9e)
1*d57664e9SAndroid Build Coastguard Worker# Background
2*d57664e9SAndroid Build Coastguard Worker
3*d57664e9SAndroid Build Coastguard WorkerAs general background, `OWNERS` files expedite code reviews by helping code
4*d57664e9SAndroid Build Coastguard Workerauthors quickly find relevant reviewers, and they also ensure that stakeholders
5*d57664e9SAndroid Build Coastguard Workerare involved in code changes in their areas.
6*d57664e9SAndroid Build Coastguard Worker
7*d57664e9SAndroid Build Coastguard WorkerThe structure of `frameworks/base/` is unique among Android repositories, and
8*d57664e9SAndroid Build Coastguard Workerit's evolved into a complex interleaved structure over the years.  Because of
9*d57664e9SAndroid Build Coastguard Workerthis structure, the best place to authoritatively define `OWNERS` can vary
10*d57664e9SAndroid Build Coastguard Workerwildly, but here are some common patterns:
11*d57664e9SAndroid Build Coastguard Worker
12*d57664e9SAndroid Build Coastguard Worker* `core/java/` contains source that is included in the base classpath, and as
13*d57664e9SAndroid Build Coastguard Workersuch it's where most APIs are defined:
14*d57664e9SAndroid Build Coastguard Worker  * `core/java/android/app/`
15*d57664e9SAndroid Build Coastguard Worker  * `core/java/android/content/`
16*d57664e9SAndroid Build Coastguard Worker* `services/core/` contains most system services, and these directories
17*d57664e9SAndroid Build Coastguard Workertypically have more granularity than `core/java/`, since they can be refactored
18*d57664e9SAndroid Build Coastguard Workerwithout API changes:
19*d57664e9SAndroid Build Coastguard Worker  * `services/core/java/com/android/server/net/`
20*d57664e9SAndroid Build Coastguard Worker  * `services/core/java/com/android/server/wm/`
21*d57664e9SAndroid Build Coastguard Worker* `services/` contains several system services that have been isolated from the
22*d57664e9SAndroid Build Coastguard Workermain `services/core/` project:
23*d57664e9SAndroid Build Coastguard Worker  * `services/appwidget/`
24*d57664e9SAndroid Build Coastguard Worker  * `services/midi/`
25*d57664e9SAndroid Build Coastguard Worker* `apex/` contains Mainline modules:
26*d57664e9SAndroid Build Coastguard Worker  * `apex/jobscheduler/`
27*d57664e9SAndroid Build Coastguard Worker  * `apex/permission/`
28*d57664e9SAndroid Build Coastguard Worker* Finally, some teams may have dedicated top-level directories:
29*d57664e9SAndroid Build Coastguard Worker  * `media/`
30*d57664e9SAndroid Build Coastguard Worker  * `wifi/`
31*d57664e9SAndroid Build Coastguard Worker
32*d57664e9SAndroid Build Coastguard Worker# Design
33*d57664e9SAndroid Build Coastguard Worker
34*d57664e9SAndroid Build Coastguard WorkerArea maintainers are strongly encouraged to list people in a single
35*d57664e9SAndroid Build Coastguard Workerauthoritative `OWNERS` file in **exactly one** location.  Then, other paths
36*d57664e9SAndroid Build Coastguard Workershould reference that single authoritative `OWNERS` file using an include
37*d57664e9SAndroid Build Coastguard Workerdirective.  This approach ensures that updates are applied consistently across
38*d57664e9SAndroid Build Coastguard Workerthe tree, reducing maintenance burden.
39*d57664e9SAndroid Build Coastguard Worker
40*d57664e9SAndroid Build Coastguard Worker# Examples
41*d57664e9SAndroid Build Coastguard Worker
42*d57664e9SAndroid Build Coastguard WorkerThe exact syntax of `OWNERS` files can be difficult to get correct, so here are
43*d57664e9SAndroid Build Coastguard Workersome common examples:
44*d57664e9SAndroid Build Coastguard Worker
45*d57664e9SAndroid Build Coastguard Worker```
46*d57664e9SAndroid Build Coastguard Worker# Complete include of top-level owners from this repo
47*d57664e9SAndroid Build Coastguard Workerinclude /ZYGOTE_OWNERS
48*d57664e9SAndroid Build Coastguard Worker# Partial include of top-level owners from this repo
49*d57664e9SAndroid Build Coastguard Workerper-file ZygoteFile.java = file:/ZYGOTE_OWNERS
50*d57664e9SAndroid Build Coastguard Worker```
51*d57664e9SAndroid Build Coastguard Worker```
52*d57664e9SAndroid Build Coastguard Worker# Complete include of subdirectory owners from this repo
53*d57664e9SAndroid Build Coastguard Workerinclude /services/core/java/com/android/server/net/OWNERS
54*d57664e9SAndroid Build Coastguard Worker# Partial include of subdirectory owners from this repo
55*d57664e9SAndroid Build Coastguard Workerper-file NetworkFile.java = file:/services/core/java/com/android/server/net/OWNERS
56*d57664e9SAndroid Build Coastguard Worker```
57*d57664e9SAndroid Build Coastguard Worker```
58*d57664e9SAndroid Build Coastguard Worker# Complete include of top-level owners from another repo
59*d57664e9SAndroid Build Coastguard Workerinclude platform/libcore:/OWNERS
60*d57664e9SAndroid Build Coastguard Worker# Partial include of top-level owners from another repo
61*d57664e9SAndroid Build Coastguard Workerper-file LibcoreFile.java = file:platform/libcore:/OWNERS
62*d57664e9SAndroid Build Coastguard Worker```
63*d57664e9SAndroid Build Coastguard Worker```
64*d57664e9SAndroid Build Coastguard Worker# Complete include of subdirectory owners from another repo
65*d57664e9SAndroid Build Coastguard Workerinclude platform/frameworks/av:/camera/OWNERS
66*d57664e9SAndroid Build Coastguard Worker# Partial include of subdirectory owners from another repo
67*d57664e9SAndroid Build Coastguard Workerper-file CameraFile.java = file:platform/frameworks/av:/camera/OWNERS
68*d57664e9SAndroid Build Coastguard Worker```
69