Commit Graph

20 Commits

Author SHA1 Message Date
Paul Duffin
854ab3a588 Finalize using the for-next-build SDK snapshots
Previously, the SDK finalization script consumed the SDK snapshots from
the `for-latest-build` directory. However, in trunk stable that is no
longer viable as that directory will include flagged APIs but the
finalized SDK cannot use flagged APIs. It is not possible to remove
flagged APIs from `for-latest-build` as the snapshots in there are
dropped into Android itself and so must include flagged APIs.

This change switches the script to use `for-next-build` which is
currently identical to `for-latest-build` but will, eventually contain
no flagged APIs.

Bug: 313065235
Test: TBD
Change-Id: I2e7a63a02aa218e259d6b970d64016d15f42fb0f
2023-11-24 17:51:50 +00:00
Ronish Kalia
bac05582c4 Revert "Add new sdk-> repo mapping to finalize_sdk.py"
This reverts commit 5dcaf63c5a.

Reason for revert: Not required after ag/21907841

Change-Id: I7385d43a9c4f46656afb642f4e865ba8399e67b9
2023-03-09 20:14:33 +00:00
Alex Buynytskyy
5dcaf63c5a Add new sdk-> repo mapping to finalize_sdk.py
The script tries to automatically work out the right directory
for a given sdk name, but some modules don't fit the current
heuristic. Add those in manually.

Test: run finalize_sdk.py
Change-Id: I1eeedae80edfe1dc4d7a7dc27402f40189d00644
2023-02-16 18:12:45 +00:00
Alex Buynytskyy
354a18b679 Addressing CL comments.
Bug: 260755259
Test: run locally
Change-Id: Ica6e1dbcd0ef5b0db54465d7a33ef13ea53471bc
2023-01-21 11:57:55 -08:00
Alex Buynytskyy
56c36b3bb1 Add local mode to the script.
Local mainline SDK artifacts can be built via
TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true vendor/google/build/mainline_modules_sdks.sh

Bug: 260755259
Test: run locally
Change-Id: I0eb13441201d62db1686f2930957e33b4aa4ce37
2023-01-19 11:21:21 -08:00
Anton Hansson
2c74fda1e2 Add new sdk-> repo mapping to finalize_sdk.py
The script tries to automatically work out the right directory
for a given sdk name, but some modules don't fit the current
heuristic. Add those in manually.

Test: run finalize_sdk.py
Change-Id: I9d9b375d686e3406375cdd06fc6c11399290af15
2022-12-20 18:11:11 +00:00
Gurpreet Singh
7903f55125 Fix the target for sdk finalization.
Using 'mainline_modules_sdks-userdebug' target for fetch the artifacts.

Bug: 256848771
Test: The code builds.
Change-Id: Ic6a171f43031c4da7f71a4cbf88812365efc4fef
2022-11-02 14:05:19 +00:00
Mårten Kongstad
ebf96164a8 finalize_sdk.py: strip '-stubs' from stub jar filenames
Rename stubs jar from '*-stubs.jar' to '*.jar' when importing artifacts.
(This was supposed to be part of b9868b1a58 but was lost in a rebase.)

Bug: 235578272
Test: manual: run finalize_sdk.py and inspect prebuilts/sdk/extensions
Change-Id: I93a3ef6f75a566ff5d0c525a15e2003fb7b890ed
2022-09-23 08:56:53 +02:00
Mårten Kongstad
ab80ac5142 finalize_sdk.py: correctly escape --readme argument
finalize_sdk.py will include the command line used in the commit
messages it creates. However, it fails to correctly esacpe the
arguments. Correct this.

Before:

  ... -r This is some text ...

After:

  ... -r 'This is some text' ...

Test: manual: run finalize_sdk.py, check commit message in prebuilts/sdk
Change-Id: I67f1dd5fe8b36658c76cdcfa31a6c8fbc610621a
2022-09-22 15:56:53 +02:00
Mårten Kongstad
b9868b1a58 finalize_sdk.py: copy jar stub files files
Update finalize_sdk.py to extract the jar stub files from a build,
similarly to how it already extracts diff text files.

Also remove the '-stubs' part from the jar filenames.

Bug: 235578272
Test: manual: run finalize_sdk.py and inspect prebuilts/sdk/extensions
Change-Id: I4a67f2c06dd11c9ea91cf6eaf10035c729d55a32
2022-09-22 15:56:53 +02:00
Anton Hansson
593ce4d22a Deal with inconsistent module names
Conscrypt and ART have some history of using dist_stem names in
prebuilts/sdk that are different from the module names of their
java_sdk_library, leading to same naming inconsistensies.

Update the finalize script to reconcile these inconsistensies during
import.

Note that the build has already been updated to throw an error when
inconsistensies are discovered, so this update to the script is to
make sure the next import of conscrypt/art goes smoothly.

Test: finalize_sdk.py with conscrypt/art
Change-Id: If82fadf73d508d4807aef11b960e0860d54874b7
2022-09-21 16:41:38 +00:00
Anton Hansson
211a4e2b51 Update path to module SDKs
The "current" directory is going to be removed.

Test: No
Change-Id: I69669cfba5514ccb590e441537ae0377fb3cdf71
2022-05-12 11:42:06 +00:00
Anton Hansson
22a794f499 Address review comments on finalize_sdk.py
- Keep the Android.bp -- but rename to Android.bp.auto
- Use 'or' instead of 'if not'

Bug: 222050148
Test: Run finalize_sdk.py
Merged-In: I919c3d37916d3854cd0c8d59fddb8a1420f429b9
Change-Id: I919c3d37916d3854cd0c8d59fddb8a1420f429b9
2022-04-29 11:11:54 +00:00
Mårten Kongstad
018e0d0f54 finalize_sdk.py: add --readme option
Every time an SDK is finalized, a new version history entry should be
added to prebuilts/sdk/extensions/README.md. Introduce a new option,
--readme <msg>, to better enforce this.

Test: manual: run finalized_sdk.py, inspect README.md
Change-Id: I2257dc2bcf710bb2cb616afa9b8e3d3cb307de8e
2022-04-26 07:35:51 +00:00
Anton Hansson
b853f31f28 Make finalization script also copy compat txt files
We need to duplicate the txt files in an additional location in
order for compatibility tracking to work. Make the script copy them
to that location as well.

Test: run finalize.py for version 2
Change-Id: I31848ad3f5cd0c264c68b4cdd874c93615de600a
2022-04-07 11:01:05 +01:00
Anton Hansson
53c913e727 Add support to finalize only a subset of modules
Finalization often doesn't include all modules, so make the script
support both modes of operation.

Test: together with the rest of the CLs in this set
Change-Id: Icaf4937b549118ae92457f25c08427a62de1274b
2022-04-06 15:30:55 +01:00
Anton Hansson
3e8dcd4a92 finalize_sdk.py maintenance
- Update to use new build server output structure
- Customize to work with train builds and continuous builds
- Don't finalize Android.bp files for now, we don't need them

Test: together with the rest of the CLs in this set
Change-Id: Ie7b44da3cf0a784d732702bce86cbe52f75493a4
2022-04-06 15:30:17 +01:00
Anton Hansson
0e8dbf88fb Convert finalize_sdk.py to use pathlib
The legacy os path stuff is a bit cumbersome to work with.

Test: together with the rest of the CLs in this set
Change-Id: I94f7c6f04e9f3e1644b1cc6585c2c8752f6b33ef
2022-04-06 11:58:01 +01:00
Anton Hansson
3886a9a7ed Remove workaround for IPSec buildfile not working
The bug has been fixed.

Bug: 190499958
Test: No
Change-Id: Iaa255586103daf76fa336560f3cd1b31668cf414
Merged-In: Iaa255586103daf76fa336560f3cd1b31668cf414
2021-06-28 12:56:35 +01:00
Anton Hansson
f05db63424 Add tool to help finalize extension SDK
Not intended to be a long-term solution, but allows us to get off
the ground and download/commit the artifacts in an efficient way.

Bug: 188787081
Test: run script on test topic
Change-Id: Ia01929cd3614f18cdad1e1b23594dd473a11051e
Merged-In: Ia01929cd3614f18cdad1e1b23594dd473a11051e
(cherry picked from commit a874e95adc)
2021-06-15 11:33:12 +00:00