Commit Graph

175 Commits

Author SHA1 Message Date
Gurpreet Singh
aa9b0f84d5 create directory before writing into the file. am: 789b63dca0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2862127

Change-Id: I4a7a0d60043828c3c01bfebdc30cc4d894aafdf1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 19:30:56 +00:00
Gurpreet Singh
789b63dca0 create directory before writing into the file.
The with open() method creates the file if it does not exist, but
gives a FileNotFound error if the path does not exist.

Hence, creating the path directories before using the file.

Bug: N/A
Test: the build passes.
Change-Id: Id5b285ea5581f7ef526876fb6e13a3bf69098acd
2023-12-06 16:55:53 +00:00
Paul Duffin
c0661c91a5 Generate Gantry Metadata and API Diff for NEXT release am: 6d6755189d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2850969

Change-Id: Idc9a3423f3baac8041fcedf3028d97dcf7e0114f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 17:52:58 +00:00
Paul Duffin
6d6755189d Generate Gantry Metadata and API Diff for NEXT release
Bug: 299570421
Test: packages/modules/common/build/mainline_modules_sdks.sh --build-release=next
Change-Id: I192f551ca670951bbba2faba632fc9f758a5de5e
2023-11-29 11:40:55 +00:00
Paul Duffin
7ed9da0995 Hide flagged apis for all build releases except latest
Passes `SOONG_SDK_SNAPSHOT_HIDE_FLAGGED_APIS` into the build to hide
flagged APIs.

Bug: 299570421
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true vendor/google/build/mainline_modules_sdks.sh
      # Check that flagged APIs are excluded from everything but
      # for-latest-build.
Change-Id: I67c018172dec46320b342a4d7bf89ca36e05a505
Merged-In: Ieb36f7b5e93d0f2b060dee244f2d66d2d20ba7c1
2023-11-26 20:25:42 +00:00
Treehugger Robot
ab52ed7c11 Merge "Add next BuildRelease for use by SDK finalization" into main am: e6413730b7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2845916

Change-Id: I9a0f4b74c01b92664a695fbd913d0469e4e57251
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-24 17:38:14 +00:00
Paul Duffin
530d237a82 Add next BuildRelease for use by SDK finalization
Currently, the SDK finalization script consumes 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 adds a new `NEXT` `BuildRelease` which will create a
`for-next-build` that will contain SDK snapshots that do not contain
flagged APIs. It also adds an `include_flagged_apis` property which
is `False` for everything except `LATEST`. For now that property is
for informational purposes but a follow up change will use it to
determine whether the SDK snapshots include flagged APIs.

A separate follow up change will modify the finalize script to use
the `for-next-build` directory. It is done separately as it will
take a while for this change to have an impact on the build targets
that the finalize script consumes.

Bug: 313065235
Test: packages/modules/common/build/mainline_modules_sdks.sh
      # Make sure that out/dist/mainline-sdks/for-next-build is
      # identical to for-latest-build.
Change-Id: Ib6d18fda129d081e8bbc8bf148cb5d7f38c070ba
2023-11-24 14:43:46 +00:00
Jag
b2ee26f8ba Add MP as optional module.
Bug: 294190883

Test: packages/modules/common/build/mainline_modules_sdks.sh
Change-Id: I5249e879d7b9c419e9a5a91805b5388aed8b48b3
Ignore-AOSP-First: May not be intended for AOSP as MP is a mandatory module and this handles a special use case as per the bug.
2023-10-11 17:24:37 +00:00
Alyssa Ketpreechasawat
dd34bb23fa Use module specific soong variable when last_optional_release is set. am: 25a6a5df1b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2766466

Change-Id: I82f9698c898ea8285bb0bc0b5b3f643a31424e8a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 15:22:26 +00:00
Alyssa Ketpreechasawat
352b2d3f7a Use module specific soong variable when last_optional_release is set. am: 25a6a5df1b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2766466

Change-Id: I3cdb60f4444f2c1a9be565aecb0fd8e1193ddc9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 15:16:40 +00:00
Alyssa Ketpreechasawat
25a6a5df1b Use module specific soong variable when last_optional_release is set.
The original idea of using module specific soong variable was for the modules when they start off as optional module (before transition to mandatory). However, practically at build time, it can remain optional. For now, we will keep self.last_optional_release as the condition and the module can have their specific variable (for enabling/disabling prebuilts) by setting last_optional_release.

Bug: 301183608
Test: atest mainline_modules_sdks_test --host
      packages/modules/common/build/mainline_modules_sdks.sh
Change-Id: I8af5d3dd8733d244c2ade1d9b5118308b3c00622
2023-09-28 08:59:28 +00:00
Martin Stjernholm
367bad1715 Merge "Add an option to skip the allowed deps check." into main am: 2251fddf46
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2748333

Change-Id: I0cdc87490d0e050cb439dcaf57a2cfec6425b4a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-13 11:24:09 +00:00
Martin Stjernholm
076d01ea78 Merge "Add an option to skip the allowed deps check." into main am: 2251fddf46
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2748333

Change-Id: I18dec1c6773c773a3beeea93802c576e6acb7df7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-13 11:22:59 +00:00
Martin Stjernholm
8dfa763dd1 Add an option to skip the allowed deps check.
This is for use on thin manifests where there are `apex` Soong modules
in the tree that lack dependencies to be built. Since the APEX
singleton in Soong adds all such modules to the apex-allowed-deps-check
target it won't work, even if SOONG_ALLOW_MISSING_DEPENDENCIES is used.

Also use the apex-allowed-deps-check phony target rather than
referencing the check file directly.

Test: env TARGET_BUILD_VARIANT=userdebug \
        TARGET_BUILD_APPS="com.android.art com.android.art.debug" \
        BUILD_BROKEN_DISABLE_BAZEL=true \
        packages/modules/common/build/mainline_modules_sdks.sh \
        --skip-allowed-deps-check
  on master-art with https://r.android.com/2743421, which adds a
  project with the com.andoid.tethering APEX, which cannot be built on
  master-art.
Test: env TARGET_BUILD_VARIANT=userdebug \
        TARGET_BUILD_APPS="com.android.art com.android.art.debug" \
        packages/modules/common/build/mainline_modules_sdks.sh \
        --build-release latest
  on AOSP main with libbase removed from allowed_deps.txt, and verify
  that it fails.
Bug: 300072791
Change-Id: I313905e1f00614b263d8240d01504805380e3076
2023-09-12 14:44:11 +01:00
Gurpreet Singh
a04f7d625c Merge "Add sdk modules list in build artifacts root." am: b0f9a59a58 am: 89e5123a70 am: ef38cea759
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2625854

Change-Id: I62373f4951d2c22427405c68cbbeedf17e7e0c9d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 17:39:33 +00:00
Gurpreet Singh
5dcdba7795 Merge "Add sdk modules list in build artifacts root." am: b0f9a59a58
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2625854

Change-Id: Ie69cb3523f817e8be2445860348c9d2e60d891fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 16:11:01 +00:00
Gurpreet Singh
d822398d79 Add sdk modules list in build artifacts root.
Add list of all the sdk supported modules in sdk-modules.txt. This file
should generate for all builds (even when only non-sdk modules build is
requested).
The file only contains modules which are requested by the build, and
supports sdk.

Bug: 242316893

Test: Generate sdk-modules.txt in the dist directory root.
Test: atest --host mainline_modules_sdks_test --no-bazel-mode

Change-Id: Ic8aa3c63209717e1076c4c51f1232dd5afcdd6d4
2023-06-16 14:43:01 +01:00
Gurpreet Singh
667c82296d Add 1 MB max_size constraint on gantry metadata files. am: 58e2b47ab9 am: 64349320f4 am: ecc2eff51a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2597169

Change-Id: I1eeb5164536154103f32dd856730da10c60ddbcd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 19:02:31 +00:00
Gurpreet Singh
18fc87bd32 Add 1 MB max_size constraint on gantry metadata files. am: 58e2b47ab9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2597169

Change-Id: Ie0bbcc5182a974fa214223527ecb89e1ed476cf8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 16:40:35 +00:00
Gurpreet Singh
58e2b47ab9 Add 1 MB max_size constraint on gantry metadata files.
The metadata files are downloaded by gantry gate and hence their size
should not be too high.
On discussion with Gantry team, 1 MB size was decided for the time
being. This size can possibly be increased, if the download only
happens once per build in gantry.

Bug: 242316893
Test: Build passes. Throws build error if metadata file size increases
1 MB.
atest --host mainline_modules_sdks_test --no-bazel-mode

Change-Id: I2f7a3cc55a34cd2c94a3ce4f20af96be757690c2
2023-05-22 15:06:36 +01:00
Gurpreet Singh
294fb65b5f Merge "Add last finalized version to metadata file." am: b2e2b166f5 am: 531358d893 am: 5202e5890b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2509415

Change-Id: Ic45b520cb437be25aa2bfcbf6a00c55f5bb3a28e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 12:19:30 +00:00
Gurpreet Singh
2fd31ce32f Merge "Add last finalized version to metadata file." am: b2e2b166f5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2509415

Change-Id: I0f2388c8d60d49bb697d64ce27a8e408729c497b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 10:56:35 +00:00
Gurpreet Singh
7719a9790a Add last finalized version to metadata file.
This CL builds the .latest.version target which contains the last
finalized version. This version is read and populated inside the
metadata file.
The CL also verifies whether all the java sdk libraries under a module,
which has been finalized atleast once, have the same extension version.

Bug: 242316893
Test: atest --host mainline_modules_sdks_test --no-bazel-mode
Change-Id: I94acf448b25d76c45a4bfd3d54fc276e2f01c7cc
2023-05-10 16:14:29 +00:00
Zhi Dou
02c84ac56b Fix incorrect cherry pick
Change https://r.android.com/2507369 accidentally reverted some of the
changes from https://r.android.com/2507370 and that broke the script.
Unfortunately, that was not picked up by TH.

This change reapplies those changes.

Test: atest mainline_modules_sdks_test --host
      packages/modules/common/build/mainline_modules_sdks.sh
Bug: 254111089
Bug: 275471775
Merged-In: I94989519011e31c7db33656c6730c4f8fd5e0a4f
Change-Id: I42f9cdc7ada0ec9cafbfc381db67e4942a29421a
2023-03-28 12:54:46 +01:00
Zhi Dou
7c3ab89443 Adding additional_transformations
Add additional_transformations for module sdk build. This feature is
only supported by S+ releases.

Bug: 254111089
Test: atest mainline_modules_sdks_test --host
Ignore-AOSP-First: Check into internal branch first to make sure all
testing works.

Merged-In: I94989519011e31c7db33656c6730c4f8fd5e0a4f
Change-Id: Idc8bd682550f59e086c431b0be38bfbdf8a75127
2023-03-24 16:20:42 +00:00
Zhi Dou
b50e8ce2fb Pass BuildRelease to apply and _apply_transformation methods
Pass BuildRelease to apply and _apply_transformation methods in class of
transformations, so that transformation could use the build_release
information to decide whether certain steps of the transformation should
be performed.

Test: atest mainline_modules_sdks_test --host
Bug: 254111089
Merged-In: If71a921752f4c481030efb0fd391fb328b5dffb6

Change-Id: I8341541572072ef72ab37dfe816296a1375e4cea
2023-03-24 16:15:44 +00:00
Zhi Dou
12f919f8d5 Adding additional_transformations am: c04c32fec1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/common/+/22225602

Change-Id: I0f13c1a269a544c8aa46fe610a9e7034449a5e26
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 13:28:37 +00:00
Zhi Dou
0fac811da7 Pass BuildRelease to apply and _apply_transformation methods am: 3f18d87e1a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/common/+/22203161

Change-Id: I67551cdf3829ae9c1fb4faeeb8a321c4c75729e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 13:28:35 +00:00
Zhi Dou
c04c32fec1 Adding additional_transformations
Add additional_transformations for module sdk build. This feature is
only supported by S+ releases.

Bug: 254111089
Test: atest mainline_modules_sdks_test --host
Ignore-AOSP-First: Check into internal branch first to make sure all
testing works.

Change-Id: I94989519011e31c7db33656c6730c4f8fd5e0a4f
2023-03-24 13:00:32 +00:00
Zhi Dou
3f18d87e1a Pass BuildRelease to apply and _apply_transformation methods
Pass BuildRelease to apply and _apply_transformation methods in class of
transformations, so that transformation could use the build_release
information to decide whether certain steps of the transformation should
be performed.

Test: atest mainline_modules_sdks_test --host
Ignore-AOSP-First: Check into internal branch first to make sure all
testing works.
Bug: 254111089
Change-Id: If71a921752f4c481030efb0fd391fb328b5dffb6
2023-03-23 15:41:34 +00:00
Gurpreet Singh
8a70ce9032 Create metadata json file for each module am: 653f881161 am: d884ae3cc6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2304275

Change-Id: Ic30392b0369fd89dc6a0b2ea184a275077c77f95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 11:33:37 +00:00
Gurpreet Singh
d884ae3cc6 Create metadata json file for each module am: 653f881161
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2304275

Change-Id: Ibe5e456ddab06776ebd075811cfb7037074b5f07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 10:56:15 +00:00
Gurpreet Singh
653f881161 Create metadata json file for each module
This CL creates a metadata json file for each module that support java
APIs. The metadata file contains the information about -
1. the api-diff file name
2. the size of the api-diff file
3. module extension version

More information will be added to this metadata file, which will be
used by the mainline module api checks gantry gate to improve its
functionality.

Bug: 242316893
Test: Generate metadata file for each module. Passes all tests.
Test: atest --host mainline_modules_sdks_test --no-bazel-mode

Change-Id: I517e59e5a7bb0f6675950d7455a724816d599692
2023-03-22 10:39:47 +00:00
Paul Duffin
96981d24c2 Ensure that healthfitness module SDK snapshot is built for UDC
Bug: 259958590
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true TARGET_BUILD_APPS=com.google.android.healthfitness vendor/google/build/mainline_modules_sdks.sh --build-release=UpsideDownCake
Ignore-AOSP-First: UpsideDownCake is not yet in AOSP
Change-Id: Ie27fa2f98b5e88c66e13741accaac043d5ea9bdb
2023-03-16 19:46:22 +00:00
Paul Duffin
e7ab23f61b Ensure that btservices module SDK snapshot is built for UDC
Bug: 259958590
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true TARGET_BUILD_APPS=com.google.android.btservices vendor/google/build/mainline_modules_sdks.sh --build-release=UpsideDownCake
Ignore-AOSP-First: UpsideDownCake is not yet in AOSP
Change-Id: I751b1270275189e7dcba0016edc92c27df83d1bd
2023-03-16 15:07:44 +00:00
Ronish Kalia
45c462f2ee Merge "Rename healthconnect to healthfitness" 2023-02-14 12:08:46 +00:00
ronish
d397fb8b2b Rename healthconnect to healthfitness
Bug: 264516143
Change-Id: If2f3e5e79f3b7a2e852b30961f4046c3e7167096
2023-02-07 18:13:10 +00:00
Paul Duffin
7ddb639f83 Mark rkpd module SDKs as optional
This will generate SDK snapshots that use an rkpd specific Soong config
variable to allow a product to select whether to build from sources or
prebuilts.

Ignore-AOSP-First: rkpd is internal only
Bug: 266683341
Test: TARGET_BUILD_APPS=com.android.rkpd packages/modules/common/build/mainline_modules_sdks.sh --build-release=UpsideDownCake
      # Check the Android.bp file in out/dist/mainline-sdks/for-UpsideDownCake-build/current/com.android.rkpd/sdk/rkpd-sdk-current.zip
      # uses the rkpd_module/source_build Soong config variable and not
      # ANDROID/module_build_from_source.
Change-Id: Ib59b60eefef0d1e893e77aa93f911e80ecb696e3
2023-01-31 16:55:19 +00:00
Vikram Gaur
ab45d2e606 Add RemoteKeyProvisioning in mainline_modules_sdks.py
Test: Build
Change-Id: Ifb5284a9a0057611aaee32a28273f9583c3cad42
Merged-In: Ifb5284a9a0057611aaee32a28273f9583c3cad42
Merged-In: Ie3a4f694dabee4224444b1aa6da0a0048b69fc75
2022-12-14 17:48:45 +00:00
Vikram Gaur
50c3177ee0 Add RemoteKeyProvisioning in mainline_modules_sdks.py
Ignore-AOSP-First: need to prevent it from being merged into tm-mainline-prod
Bug: 259958590
Test: Build
Change-Id: Ifb5284a9a0057611aaee32a28273f9583c3cad42
2022-12-12 17:23:12 +00:00
Hassan Ali
b7d3294173 Continuous build for configinfrastructure
Add configinfrastructure to he list of MainlineModule objects in packages/modules/common/build/mainline_modules_sdks.py

Test: m
Bug: 248552678
Ignore-AOSP-First: this module is available for internal master will be merged
to aosp after completing the development.

Change-Id: I63e7d7c0ca2298e4f9b50961619cd56852f4cdf5
2022-12-06 11:26:47 +00:00
Paul Duffin
57be479915 Merge "Stop setting SOONG_SDK_SNAPSHOT_VERSION" am: 47f779a5a6 am: ead2609f50
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2315019

Change-Id: I13ffdba212af3a5f7a5282c0aeb44129623673af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-23 20:34:29 +00:00
Paul Duffin
ead2609f50 Merge "Stop setting SOONG_SDK_SNAPSHOT_VERSION" am: 47f779a5a6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2315019

Change-Id: I202f7a776c9d76c05cc554629820652f96442742
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-23 19:57:21 +00:00
Paul Duffin
224b9e44b1 Stop setting SOONG_SDK_SNAPSHOT_VERSION
Soong no longer supports the SOONG_SDK_SNAPSHOT_VERSION environment
variable so there is no need to set it. This change removes the setting
of that environment variable and stops passing the sdk_version around.
The few places that need to access the sdk_version in order to
construct file names just use the SDK_VERSION global variable which is
always "current" for legacy purposes.

Bug: 259095197
Test: BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh
      # Run the above before and after this change and compare the
      # out/dist/*mainline-sdks directory contents to ensure that there are no
      # changes.
Change-Id: I9554eb48dfd04877d09d7e8101129d0fe1724101
2022-11-23 15:08:49 +00:00
Nick Chalko
c08299b663 Merge "Revert "Add Device Lock module."" 2022-10-21 20:31:22 +00:00
Amos Bianchi
6e3e732949 Revert "Add Device Lock module."
This reverts commit 678a907829.

Reason for revert: breaking mainline sdk build

Change-Id: I013b0d30cab1167025dbe8b5bafba81d06ca8750
Bug: 254879336
2022-10-21 19:42:10 +00:00
Amos Bianchi
796d5064d6 Merge changes from topic "device_lock"
* changes:
  Add Device Lock module.
  Add allowed dependencies for Device Lock module.
2022-10-21 17:48:58 +00:00
Gurpreet Singh
f2e5830c44 Remove timestamps from api diff files by using labels. am: 71883fca02 am: d2b740516e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2264470

Change-Id: I6038b351a0a21c63c33d1b3ef9791ff60edaef3b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 16:51:10 +00:00
Gurpreet Singh
d2b740516e Remove timestamps from api diff files by using labels. am: 71883fca02
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2264470

Change-Id: I97224ba5873a41c7ab6ad40943a00cd5fe54af4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 16:22:49 +00:00
Gurpreet Singh
43e79d3a86 Revert "Use fixed timestamps before performing api diff operation." am: 28a0ee3240 am: 2677fdad04
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2265384

Change-Id: Ifb419d5c54a9d97055d9691cfd6b2ca33195904b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 14:12:39 +00:00