Skip to content

Commit fc34c4b

Browse files
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). PiperOrigin-RevId: 1016068880
1 parent 44a1a85 commit fc34c4b

4 files changed

Lines changed: 21 additions & 63 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2026 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
@RestrictTo(Scope.LIBRARY)
18+
package androidx.test.espresso.internal.inject;
19+
20+
import androidx.annotation.RestrictTo;
21+
import androidx.annotation.RestrictTo.Scope;

‎espresso/core/java/androidx/test/espresso/internal/package.html‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎runner/android_junit_runner/java/androidx/test/internal/runner/tracker/package.html‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎services/storage/java/androidx/test/services/storage/internal/package.html‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)