Repository navigation
Commit 3028afb
committed
Add missing @RestrictTo(Scope.LIBRARY) annotations in AndroidX Test.
Annotate three internal `androidx.test` declarations that previously
relied only on `@hide` Javadoc tags:
- `InstrumentationParameterUtil`
(`androidx.test.internal.platform.util`)
- `ProcSummary` (`androidx.test.internal.util`)
- `PortForwardingRule.Builder` (`androidx.test.rule`, whose enclosing
`@RestrictTo(Scope.LIBRARY_GROUP)` class is included in
`current_internal.txt`)
Neither `androidx.test.internal.platform.util` nor
`androidx.test.internal.util` can use a package-level
`@RestrictTo(Scope.LIBRARY)` `package-info.java` because both packages
also export `@RestrictTo(Scope.LIBRARY_GROUP)` APIs in `monitor`'s
`current_internal.txt`.
Adding explicit `@RestrictTo` annotations instead of relying on `@hide`
doc tags:
- Unlocks passing `--ignore-comments` on API signature generation,
improving build performance and memory usage by skipping Javadoc/KDoc
extraction, comment AST parsing, and `{@link}` import caching.
- Enables Metalava declarative `<api-surfaces>` XML configuration,
which ignores `@hide` and `@removed` Javadoc tags by design.
- Enforces visibility statically in compilers, Android Lint, Dackka,
and IDEs.
PiperOrigin-RevId: 10174910931 parent 9ce436e commit 3028afb
3 files changed
Lines changed: 7 additions & 0 deletions
File tree
- runner
- monitor/java/androidx/test/internal
- platform/util
- util
- rules/java/androidx/test/rule
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
0 commit comments