| commit | a5cb615755ad500ca225df08adb6f5dc123fe9c2 | [log] [tgz] |
|---|---|---|
| author | Mårten Kongstad <amhk@google.com> | Mon Sep 25 13:48:36 2023 +0200 |
| committer | Mårten Kongstad <amhk@google.com> | Wed Sep 27 15:22:54 2023 +0200 |
| tree | 34fa979e30abd6c6d9b09ccccb9109cce260138a | |
| parent | 6502e3fe1af1557a10d671ae05b5c264e32735ae [diff] |
aconfig-annotations-lib: do not depend on current Android APIs
aconfig-annotations-lib sets "sdk_version: system_current", which means
the library has an (implicit) dependency on
system-api-stubs-docs-non-updatable.
Soong will automatically add a dependency on aconfig-annotations-lib to
every java_aconfig_library. This means that everyh java_aconfig_library
has an (implicit) dependency on system-api-stubs-docs-non-updatable.
In order for metalava to correctly expand the aconfig auto-generated
Flags.FLAG constants when generating API signature files, it needs
access to the defintion of the Flags class(es). This is handled by
adding the relevant java_aconfig_library{.generated_srcjars} as sources.
In the case of system-api-stubs-docs-non-updatable, adding those sources
creates a dependency cycle: in short system-api-stubs-docs-non-updatable
depends on a java_aconfig_library, which in turn depends on
system-api-stubs-docs-non-updatable.
Break this dependency cycle by changing aconfig-annotations-lib to set
"sdk_versions: core_current".
Note: the new value of sdk_version is somewhat arbitrary. It can be
anything (e.g. "34") that doesn't involve the current Android SDK.
(cherry picked from commit a51e64d0f3abcf1115b3170b9150158cb9ffe43a)
Bug: 301859633
Test: m nothing
Merged-In: I7f5249ec23802720d4ef6be865ef41266334d7df
Change-Id: I7f5249ec23802720d4ef6be865ef41266334d7df
Libraries and utilities intended for use by module and framework code.
Since modules use the code in this project, it must adhere to mainline requirements, for example, by setting min_sdk_version in Soong modules.
This project uses a single source path for Java code. All Java code should go in the java directory with subdirectories corresponding to the java package. Android.bp files should go alongside the java source files, and should only include java source for a single java package to encourage good code hygiene.
Tests for java code should go in the javatests directory and follow the same structure.