diff options
author | 2025-01-20 10:35:45 +0000 | |
---|---|---|
committer | 2025-01-21 09:03:58 +0000 | |
commit | 9820c1aa2e48eeea13df6861a477f675bbd2ba72 (patch) | |
tree | ed83491a597f070896b271b5325b1d34b4104de9 /java/base.go | |
parent | a9434998cd03c3564b231e7b5c607a428c9ef59c (diff) |
Use {version:major.minor?} when generating api-versions.xml
Previously, `droidstubs` would pass Metalava `--android-jar-pattern`
options using `{version:level}` as the placeholder for the version.
That meant that Metalava would only use historical API version jars
that had a single integer version, e.g. `prebuilts/sdk/36`. While that
was sufficient in the past, it will not be sufficient in future when
Android starts supporting `major.minor` versions.
This change switches the pattern to use `{version:major.minor?}`. That
will match files without `.minor` so it will match all the files that
would have been matched by the existing `{version:level}`, It will also
match files with `.minor`, e.g. files like `prebuilts/sdk/37.1`.
Bug: 302189716
Test: # Before applying this change run:
tools/metalava/scripts/gather-android-metalava-artifacts.py before
# After applying this change run:
tools/metalava/scripts/gather-android-metalava-artifacts.py after
# Make sure that there are no differences.
meld before after
# Then create a major.minor version in prebuilts/sdk by running:
cp -r prebuilts/sdk/35 prebuilts/sdk/34.1
# Run the following
tools/metalava/scripts/gather-android-metalava-artifacts.py major-minor
# Make sure references to 35 in `api-versions.xml` and doc stubs have
# been replaced with 34.1.
meld before major-minor
Change-Id: I94167ae12f1059853e8e2253eb20442b61dfdebb
Diffstat (limited to 'java/base.go')
0 files changed, 0 insertions, 0 deletions