Skip to content

Replace legacy @hide package.html files with package-info.java in - #2528

Merged
copybara-service[bot] merged 1 commit into
mainfrom
piper_1015488718
Nov 7, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
piper_1015488718

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Replace legacy @hide package.html files with package-info.java in
AndroidX Test.

Remove the three remaining {@hide} package.html files in
androidx.test in favor of @RestrictTo(Scope.LIBRARY)
package-info.java declarations:

  • Delete espresso/internal/package.html and add package-info.java
    annotated with @RestrictTo(Scope.LIBRARY) for
    androidx.test.espresso.internal.inject. The parent directory
    espresso/internal/ has no source files or BUILD target (so a
    package-info.java there would not be compiled, and @RestrictTo
    does not inherit to subpackages), while the other two subpackages
    under espresso/internal/ (data and data.model) already have
    package-info.java files with @RestrictTo(Scope.LIBRARY).
  • Delete duplicate package.html files in
    androidx.test.internal.runner.tracker and
    androidx.test.services.storage.internal, which already have
    package-info.java files annotated with @RestrictTo(Scope.LIBRARY).

Replacing {@hide} package.html files with @RestrictTo
package-info.java declarations:

  • Unlocks passing --ignore-comments on non-doc Metalava runs,
    improving build performance and memory usage by skipping Javadoc/HTML
    comment extraction and tag parsing.
  • Enables Metalava declarative <api-surfaces> XML configuration,
    which ignores @hide and @removed doc tags by design.
  • Enforces package-level visibility in compilers, Android Lint, Dackka,
    and IDEs (which do not propagate HTML @hide tags across packages).

@copybara-service
copybara-service Bot force-pushed the piper_1015488718 branch 6 times, most recently from 19743c1 to c40e2cd Compare November 7, 2026 04:02
AndroidX Test.

Remove the three remaining `{@hide}` `package.html` files in
`androidx.test` in favor of `@RestrictTo(Scope.LIBRARY)`
`package-info.java` declarations:

- Delete `espresso/internal/package.html` and add `package-info.java`
  annotated with `@RestrictTo(Scope.LIBRARY)` for
  `androidx.test.espresso.internal.inject`. The parent directory
  `espresso/internal/` has no source files or `BUILD` target (so a
  `package-info.java` there would not be compiled, and `@RestrictTo`
  does not inherit to subpackages), while the other two subpackages
  under `espresso/internal/` (`data` and `data.model`) already have
  `package-info.java` files with `@RestrictTo(Scope.LIBRARY)`.
- Delete duplicate `package.html` files in
  `androidx.test.internal.runner.tracker` and
  `androidx.test.services.storage.internal`, which already have
  `package-info.java` files annotated with `@RestrictTo(Scope.LIBRARY)`.

Replacing `{@hide}` `package.html` files with `@RestrictTo`
`package-info.java` declarations:
- Unlocks passing `--ignore-comments` on non-doc Metalava runs,
  improving build performance and memory usage by skipping Javadoc/HTML
  comment extraction and tag parsing.
- Enables Metalava declarative `<api-surfaces>` XML configuration,
  which ignores `@hide` and `@removed` doc tags by design.
- Enforces package-level visibility in compilers, Android Lint, Dackka,
  and IDEs (which do not propagate HTML `@hide` tags across packages).

PiperOrigin-RevId: 1016068880
@copybara-service
copybara-service Bot merged commit fc34c4b into main Nov 7, 2026
4 checks passed
@copybara-service
copybara-service Bot deleted the piper_1015488718 branch November 7, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant