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