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
This reverts commit a772ee4cb1.
Reason for revert: The timestamps can be completely avoid by using labels instead.
Change-Id: If72a9e8aba6209ebe81d11cae1ed6defb43d6079
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
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
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
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
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
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
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
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
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
The service-art java_sdk_library was not generating the latest api
targets as mentioned in the bug - b/235330409.
Hence an exception was added to avoid building latest api targets for
service-art java_sdk_library.
The bug has been fixed now and this exception can be safely removed.
Bug: 235330409
Test: built mainline_modules_sdks.py successfully.
mainline_modules_sdks_test.py passes
The .info files corresponding to art module has latest api fields
populated for service-art java_sdk_library.
Change-Id: Idd13df1410cb3ced8c347a78a48d8524923f3da5
Merged-In: Ib4dd01b64e4e8edc90c8cb992cc3e65681da39bc
Previously, while the snapshot zip files generated by Soong had entries
with fixed timestamps the zip files produced by this script did not
which meant that the contents of the zip files depended on when the zip
file was created. That meant that in order to compare a change affected
the zip file contents it was necessary to unpack the before and after
zip files in order to compare them.
This change causes all zip files created by the script to use the same
fixed timestamp for each of its entries as soong_zip and ziptime do so
it is now possible to check that the contents of sdk snapshot zip files
are the same without unpacking them.
Bug: 232401814
Test: BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh
# Remove api diff files as they contain file stamps of generated files so
# differ every time they are generated.
find out/dist/mainline-sdks -name \*txt | xargs rm
# Save the snapshots away.
mv out/dist/mainline-sdks before-changes
# Repeat the first two steps above and then run the following to verify
# that simply running the script twice results in different sdk contents.
meld before-changes out/dist/mainline-sdks
# Apply this change and then run the above again but this time the sdks
# will be identical.
Change-Id: I28bf78783c827abffa6b715c62ca5948b3ee19b5
Although Permission is not an optional module on GMS capable devices it
is optional for non-GMS capable devices and so needs to support being
treated as optional at build time. Which means that an OEM needs to be
able to choose whether to use the prebuilt Permission module or build
their own module from source.
This is safe even though permission is not an optional mainline
module because devices that support mainline must pass GTS and
testModulesSignedCorrectly and testModulesPreloadedCorrectly in GTS
currently tests this, along with testMainlineApprovedTrain which checks
mandatory/optional, signing keys, and if what's preloaded are part of
approved trains.
Bug: 238175656
Test: packages/modules/common/build/mainline_modules_sdks.sh
# Check that permission sdk snapshot uses a permission specific
# Soong config variable.
Change-Id: I8278622fedbba0292f7cab1114170394cf429849
Apex name has been changed to com.android.btservices
Changing mount point accordingly
Bug: 235892590
Test: Flash / boot bt / look logs & pair a device
Ignore-AOSP-First: Apex name change not propagate to AOSP yet
Change-Id: Ie8d4c73d9601d36e1ae8f74f9bdf791e8c1e42da
Bug: 233965247
Test: packages/modules/common/build/mainline_modules_sdks.sh
# Check the output to ensure that uwb/bluetooth uses the
# module specific Soong config.
# Unpack the bluetooth/uwb snapshots into prebuilts/module_sdk/...
m nothing
Ignore-AOSP-First: Bluetooth and uwb are not present in AOSP
Change-Id: I09c7b2ef95f941e61eba933b4e9b3625c01adfeb
In order to detect the addition of any new APIs in any mainline module,
an API diff file (current module sdk vs the last finalized module sdk)
needs to be generated correpsonding to each module sdk.
This CL generates the API diff files corresponding to each module sdk
and copy that to the out/dist directory.
This CL also contains the tests to verify the generation of api diff
files.
Bug: 230609867
Test: builds successfully. Generates API diff files for each module sdk
"atest mainline_modules_sdks_test" passes.
Change-Id: I1d8276a4054b92490ccca3dae36c48c639925f46
Optional modules, i.e. those modules which may be provided by Google or
vendors depending on the vendor, need to have its own Soong config
variable that controls whether prebuilts are used or not. Without that
the build will always attempt to use the Google prebuilt module instead
of the vendor provided module.
This change:
1. Adds support for specifying which modules are optional and will
generate a module specific soong_config_module_type that uses a
module specific Soong config variable.
2. Generates the soong_config_module_type for optional modules inline
in the snapshot Android.bp file (instead of importing from a
manually curated definitions files). That simplifies the cost of
adding optional modules.
3. Adds some extra tests to ensure that S and Tiramisu behave the
same way.
Bug: 233965247
Test: atest mainline_modules_sdks_test
packages/modules/common/build/mainline_modules_sdks.sh
# Check the output to ensure that wifi uses the wifi specific
# Soong config but ipsec (as a non-optional module) does not.
# Unpack the wifi snapshot into prebuilts/module_sdk/Wifi
Change-Id: I6a85b6f9877fc251010ff2bbee75fe8fa99db9b4
(cherry picked from commit d20edd6c69)
Merged-In: I6a85b6f9877fc251010ff2bbee75fe8fa99db9b4
Optional modules, i.e. those modules which may be provided by Google or
vendors depending on the vendor, need to have its own Soong config
variable that controls whether prebuilts are used or not. Without that
the build will always attempt to use the Google prebuilt module instead
of the vendor provided module.
This change:
1. Adds support for specifying which modules are optional and will
generate a module specific soong_config_module_type that uses a
module specific Soong config variable.
2. Generates the soong_config_module_type for optional modules inline
in the snapshot Android.bp file (instead of importing from a
manually curated definitions files). That simplifies the cost of
adding optional modules.
3. Adds some extra tests to ensure that S and Tiramisu behave the
same way.
Bug: 233965247
Test: atest mainline_modules_sdks_test
packages/modules/common/build/mainline_modules_sdks.sh
# Check the output to ensure that wifi uses the wifi specific
# Soong config but ipsec (as a non-optional module) does not.
# Unpack the wifi snapshot into prebuilts/module_sdk/Wifi
Change-Id: I6a85b6f9877fc251010ff2bbee75fe8fa99db9b4
This reverts commit d29f8e0597.
Although I tested this well using unit tests they don't test
everything and although I tested the unpacking of some snapshots I did
not test what happens when all the ART sdk/module_exports
snapshots are unpacked. I just did and the build broke.
The build broke because while the soong_config_module_type modules are
marked as being Nameless (and so according to the documentation do not
have to have unique names) it turns out that is not true.
There is at least one place in the build where the names of Nameless
modules are checked and as a result this breaks.
I could fix the build breakage reasonably easily but the problem is
that I would have to apply that fix on all partners otherwise they
wouldn't be able to receive the next set of snapshots which is too
high a cost.
So, I am reverting this and will limit the use of inline
soong_config_module_type modules to optional modules.
Reason for revert: Breaks the build when snapshots are unpacked.
Bug: 233965247
Change-Id: I1faae863c48f1fbfd49d2545f242401bdd4f8f8a
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 and does
duplicate some of these definitions in snapshots that use the same
config variable 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.
Bug: 233965247
Test: atest 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: Ie6b6d99e1fcb17ebd8ed291a5bc7d4664fceea92
The build_release needs to be compared instead of build_release.name.
Bug: 230609867
Test: builds successfully.
Change-Id: I1610dbfbeec9bd1a3c6c0b45fe6ec87d2091749f
In order to detect the addition of any new APIs in any mainline module,
an API diff file (current module sdk vs the last finalized module sdk)
needs to be generated correpsonding to each module sdk.
To obtain the list of APIs in the last finalized module sdk, the latest
build targets correpsonding to each scope of each module sdk are
obtained and needs to be built.
This CL is fetching all the module sdk scope targets from the .info
file corresponding to each module sdk file and then building all those
targets.
This CL is also adding changes to the test file
mainline_modules_sdks_test.py to mock the generation of module sdk
snapshot info files and the latest api text files for module sdk
scope targets.
The follow up CLs will generate the API diff files corresponding to
each module sdk and copy that to the out/dist directory. And will
also contain the tests to verify the generation of api diff files.
Bug: 230609867
Test: build packages/modules/common/build/mainline_modules_sdks.py
successfully and builds all the scope targets for each module sdk.
"atest mainline_modules_sdks_test" passes
Change-Id: I9e0c08d3a8bbf60e9b5cb61389c155948c4c171e