Repository navigation
Add missing @RestrictTo(Scope.LIBRARY) annotations in AndroidX Test. - #2533
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
force-pushed
the
piper_1015649267
branch
from
November 7, 2026 04:07
365e3e0 to
16bcc0a
Compare
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: 1015649267
copybara-service
Bot
force-pushed
the
piper_1015649267
branch
from
November 7, 2026 04:18
16bcc0a to
757fb8b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add missing @RestrictTo(Scope.LIBRARY) annotations in AndroidX Test.
Annotate three internal
androidx.testdeclarations that previouslyrelied only on
@hideJavadoc 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 incurrent_internal.txt)Neither
androidx.test.internal.platform.utilnorandroidx.test.internal.utilcan use a package-level@RestrictTo(Scope.LIBRARY)package-info.javabecause both packagesalso export
@RestrictTo(Scope.LIBRARY_GROUP)APIs inmonitor'scurrent_internal.txt.Adding explicit
@RestrictToannotations instead of relying on@hidedoc tags:
--ignore-commentson API signature generation,improving build performance and memory usage by skipping Javadoc/KDoc
extraction, comment AST parsing, and
{@link}import caching.<api-surfaces>XML configuration,which ignores
@hideand@removedJavadoc tags by design.and IDEs.