Commit Graph

149 Commits

Author SHA1 Message Date
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
Gurpreet Singh
2677fdad04 Revert "Use fixed timestamps before performing api diff operation." am: 28a0ee3240
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2265384

Change-Id: I174120c09a6dcc467d519d00c54a23b602393daa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 13:43:49 +00:00
Gurpreet Singh
71883fca02 Remove timestamps from api diff files by using labels.
The api diff files contain the timestamp of files which are being
diffed. This results in different diffs getting generated everytime
even if all the APIs are the same.
In order to generate same diffs, timestamps have been removed by
using the label flag while performing the diff operation.

Bug: 238757360
Test: The builds passed and the api diff files does not contain
timestamps.

Change-Id: If894f5a6632542b566eb0657d22d4c4b2f6afa83
2022-10-21 13:14:49 +00:00
Gurpreet Singh
28a0ee3240 Revert "Use fixed timestamps before performing api diff operation."
This reverts commit a772ee4cb1.

Reason for revert: The timestamps can be completely avoid by using labels instead.

Change-Id: If72a9e8aba6209ebe81d11cae1ed6defb43d6079
2022-10-21 11:13:29 +00:00
Amos Bianchi
678a907829 Add Device Lock module.
Bug: b/241442337
Test: service successfully starts
Test: atest DeviceLockUnitTests
Test: cts-tradefed run cts -m CtsDeviceLockTestCases
Ignore-AOSP-First: Module for U, developed internally

Change-Id: I445cadcabf70381b08b499c4360967c54faeacff
2022-10-20 20:17:53 -07:00
Gurpreet Singh
95d56c8e3c Use fixed timestamps before performing api diff operation. am: a772ee4cb1 am: f35a4eb4ad
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2259607

Change-Id: Ic789ecd9145e543a2b713494d306babe093adf0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 20:48:04 +00:00
Gurpreet Singh
f35a4eb4ad Use fixed timestamps before performing api diff operation. am: a772ee4cb1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2259607

Change-Id: Ie2271f9e70bb711e598243c482f23f5683c573bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 20:16:04 +00:00
Gurpreet Singh
a772ee4cb1 Use fixed timestamps before performing api diff operation.
The api diff files contain the timestamp of files which are being
diffed. This results in different diffs getting generated everytime
even if all the APIs are the same.
In order to generate same diffs, fixed timestamps are assigned to the
files being diffed before the diff operation.

Bug: 238757360
Test: The builds passed and the api diff files contain the fixed
timestamps.

Change-Id: I89f88aa709b5a7a7f52d610b2f8ddf501712e529
2022-10-19 15:25:49 +00:00
Anna Zhuravleva
84c610bbfa Add HealthConnect to mainline_modules_sdks.py
Ignore-AOSP-First: The module is not in AOSP yet
Bug: 251393380
Test: TARGET_BUILD_APPS=com.android.healthconnect
packages/modules/common/build/mainline_modules_sdks.sh

Change-Id: I3019b599d61643e35d986448be7b34fd891535d0
2022-10-17 16:06:51 +00:00
Treehugger Robot
be223f7537 Merge "Exclude test_com.android.tethering from R snapshot" am: 9113931152 am: a0c16be5dd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2251415

Change-Id: I023e7b57f87ebed2bc289a8be04c97099ccf49c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-12 20:23:46 +00:00
Treehugger Robot
a0c16be5dd Merge "Exclude test_com.android.tethering from R snapshot" am: 9113931152
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2251415

Change-Id: Ib953643f5f7af0fa0854e75e8b04c0c627c03e4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-12 19:54:49 +00:00
Paul Duffin
378d990a95 Exclude test_com.android.tethering from R snapshot
Bug: 218685706
Test: BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh --build-release=R
      # Run before and after making this change and verify that the
      # only difference is to remove test_com.android.tethering.
      atest --no-bazel-mode --host mainline_modules_sdks_test
Change-Id: Ic24ce4afbe9f84b1afd65dca9cee2154dc436646
2022-10-12 18:47:30 +01:00
Paul Duffin
77869eacad Add UpsideDownCake to releases that need snapshots to be built
Bug: 249769908
Test: packages/modules/common/mainline_modules_sdks.sh
Change-Id: I2b945f9db628c90b3823972787713dce39b9df75
Merged-In: I39804d89ad15109da47b5caa4a20ca2ef74b0e37
(cherry picked from commit 5fc8511dff)
Merged-In: I2b945f9db628c90b3823972787713dce39b9df75
2022-10-03 10:49:53 +00:00
Paul Duffin
5fc8511dff Add UpsideDownCake to releases that need snapshots to be built
Bug: 249769908
Test: packages/modules/common/mainline_modules_sdks.sh
Change-Id: I2b945f9db628c90b3823972787713dce39b9df75
Merged-In: I39804d89ad15109da47b5caa4a20ca2ef74b0e37
2022-10-03 10:48:10 +00:00
Anton Hansson
2e9dd0fae5 Revert "Use inline soong_config_module_type for Tiramisu"
This reverts commit 2a3ad4c9ee.

Reason for revert: Not going for this after all

DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/hub?filter=highFailureRate&tab=clusterView&clusterId=5071029569483450748

Bug: 249572758

Change-Id: Id8e87d05afe4297e0c5735c67c15935a6a34d9ca
2022-09-28 20:52:13 +00:00
Paul Duffin
2a3ad4c9ee Use inline soong_config_module_type for Tiramisu
Previously, Tiramisu snapshots would use the use_source_config_var
property but that does not properly without r.android.com/2234128 so
this switches Tiramisu to use inline soong_config_module_type just like
is used by S.

Bug: 249192297
Test: m nothing
      BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdk.sh
      # Run above with and without this change and make sure that it
      # only changes the for-Tiramisu-build contents and switches to
      # using inline soong_config_module_type modules to set the prefer
      # property.
Change-Id: I429aeac064c986de654a49258a5f31d7bd9fc3a7
2022-09-27 18:11:10 +01:00
Paul Duffin
69c064b1c2 Bluetooth was not released as a mainline module in Tiramisu
Bug: 240406019
Test: m nothing
Change-Id: I0b3efdcc7665b5d2d18e313db086a87bd7c7eb48
2022-09-14 17:54:44 +01:00
Anton Hansson
648be3371c Don't delete the output dirs in prepare
In some builds, this script is invoked several times in a single
target. The removal of the dist dirs leads to the output of the
first invocation to be deleted at the beginning of the second
invocation.

Test: atest mainline_modules_sdks_test
Change-Id: I39620b849ae8029719dc6cf150dae5092a093ea9
Merged-In: I39620b849ae8029719dc6cf150dae5092a093ea9
2022-09-12 14:47:13 +00:00
Paul Duffin
574c7d88e8 Retry: Generate soong_config_module_type inline in the snapshot am: f3c17ef416
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2165046

Change-Id: If90ccbc28cdc8ed17cca58a126d8d8d6bc187cc5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 00:51:36 +00:00
Paul Duffin
d5b0d18b43 Create SdkType to encapsulate behavioral differences of sdk and exports am: d7b7cddf54
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2165045

Change-Id: I3f7f5034c97739c5352bb2d06301cc92bd119646
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 19:36:24 +00:00
Paul Duffin
957ba765e5 Switch T+ sdk snapshots to use use_source_config_var property am: db3a3c7df6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2165043

Change-Id: I17a489e2def737629711be6bc10f49a3e4a8ebd8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 19:36:17 +00:00
Paul Duffin
a807cdf6ae Clean up pylint warnings am: 6f5c8d7afb
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2165044

Change-Id: I71de5234b01a72eb5f359d1288d7c968f7d11277
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 18:35:46 +00:00
Paul Duffin
f3c17ef416 Retry: Generate soong_config_module_type inline in the snapshot
Previously, this imported the soong_config_module_type definitions from
a manually curated file. That had a couple of problems:
1. It required that the file be manually updated everytime that a new
   module_type was added to an sdk snapshot controlled by a specific
   config variable.
2. Adding a new config variable required creating another file to be
   manually curated.
3. It made a snapshot that was generated for an earlier release
   dependent on an additional file from that release which was in a
   separate repository and would require a lot of extra work to update
   if necessary.

This change generates the soong_config_module_type inline in the
snapshot Android.bp file and while it makes it slightly bigger it makes
each snapshot much more self contained and makes it easier to add
module specific config variables.

The latter is the main driver for this change as follow up changes will
add module specific variables for the optional modules.

Due to bug 235475711 each soong_config_module_type has to be unique
across all mainline modules so this uses both the module short name
and a prefix associated with the SdkType to generate unique module
names. However, that only affects the S snapshots as from T onwards is
is not necessary to use soong_config_module_type modules at all.

Bug: 233965247
Test: atest --host mainline_modules_sdks_test
      packages/modules/common/build/mainline_modules_sdks.sh
      # Extract art sdk and module_exports snapshots into
      # prebuilts/module_sdk/art and then run "m nothing"
Change-Id: Ib0e2ece1779451dffff6dfaca7ca39b264004b5b
2022-07-26 16:40:25 +00:00
Paul Duffin
d7b7cddf54 Create SdkType to encapsulate behavioral differences of sdk and exports
Previously, the differences in behavior between the sdk and
module_exports modules was implemented by checking the sdk name
everywhere that it was needed. This change encapsulates the differences
in a new SdkType dataclass which is itself determined from the sdk name
when needed.

Bug: 238203992
Test: atest --host mainline_modules_sdks_test
      packages/modules/common/build/mainline_modules_sdks.sh
      # Compare before and after to make sure that they are
      # consistent.
Change-Id: Ia00069a70fda421dff4aeaa1f833b93e95574b98
2022-07-26 16:40:25 +00:00
Paul Duffin
db3a3c7df6 Switch T+ sdk snapshots to use use_source_config_var property
Previously, T+ sdk snapshots used soong_config_module_type boilerplate
like for S. This change switches T+ sdk snapshots to use the
use_source_config_var property that was added in T.

Bug: 235455192
Test: atest --host mainline_modules_sdks_test
      packages/modules/common/build/mainline_modules_sdks.sh
      # Extract art sdk and module_exports snapshots into
      # prebuilts/module_sdk/art and then run "m nothing"
Change-Id: I65cd462358bceede493623e6a51ffdb36bfc1885
2022-07-26 16:40:23 +00:00
Gurpreet Singh
d682e225e2 Remove service-art exception to build latest api targets. am: 113e7e63a9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2138813

Change-Id: Ic0f1de5726920db26c4cf9d5774b17bdd0c5da52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 15:38:43 +00:00
Paul Duffin
6f5c8d7afb Clean up pylint warnings
Bug: 232546567
Test: atest --host mainline_modules_sdks_test
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc build/mainline_modules_sdks*.py
Change-Id: I114104805f85d7bc1cb5a3b94f076f39c1ddd38e
2022-07-26 15:25:07 +00:00