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
The build_snapshot method is creating a list of targets and building
them by calling soong.
The code sets some environment variables and builds the targets. This
code can be made reusable by putting it into a separate method and
passing the list of targets to be built. This will avoid code
redundancy.
Bug: 230609867
Test: The code builds on the intellij and successfully builds all the
targets passed to this newly added method.
Change-Id: I22566ca438b2da0cf832416466f4e3affb1c976e
(cherry picked from commit 33e9399445)
Defaulting the first_release to LATEST is dangerous because it is easy
to forget and any module that does not provide it will not be built for
a release specific build.
Adds Tiramisu for the mainline modules that were missing it and
defaults it to LATEST for BundledMainlineModules as they don't need to
be built for a previous release.
Bug: 228807460
Test: packages/modules/common/build/mainline_modules_sdks.py
Merged-In: I151773f80e37a6dd7de7b6df9cfa3f0a624d38f4
Change-Id: I151773f80e37a6dd7de7b6df9cfa3f0a624d38f4
Defaulting the first_release to LATEST is dangerous because it is easy
to forget and any module that does not provide it will not be built for
a release specific build.
Adds Tiramisu for the mainline modules that were missing it and
defaults it to LATEST for BundledMainlineModules as they don't need to
be built for a previous release.
Ignore-AOSP-First: tm-dev does not merge from AOSP.
Bug: 228807460
Test: packages/modules/common/build/mainline_modules_sdks.py
Change-Id: I151773f80e37a6dd7de7b6df9cfa3f0a624d38f4
This change will stop building the following directories:
* mainline-sdks/current
* stubs
Bug: 204763318
Test: packages/modules/common/build/mainline_modules_sdks.sh
Change-Id: I9ed17ff472bfd36d1b5baa365ba33b9e2e283412
This change adds the build_number.txt file into the sdk snapshot for R
to make it easier to debug issues arising in partner builds caused by
the snapshots.
The file is added to the root of the snapshot and is called:
snapshot-creation-build-number.txt
Bug: 201295663
Test: atest --host mainline_modules_sdks_test
packages/modules/common/build/mainline_modules_sdks.sh --build-release=R
# Check the contents of various snapshots.
Change-Id: I6cabf16754c73fc87ee4e9d00bf6ddb8349809f1
Previously, the snapshots would be built in the order in which the
build releases were defined. This change groups the snapshots with the
same build environment and builds them in sequence in order to minimize
the regeneration of the ninja files.
The test revealed that the produce_bundled_dist_for_build_release
method would call build_snapshots even if there were no bundled
snapshots needed which was a waste so that was also optimized as part
of this change.
Test: atest --host mainline_modules_sdks_test
packages/modules/common/build/mainline_modules_sdks.sh
pyformat -s 4 --force_quote_type double -i build/mainline_modules_sdks*.py
/usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc build/mainline_modules_sdks*.py
Change-Id: I5bb8d864a50318b4b5390a8e5a3601aa33c18fef
Moves the generated Android.bp file from the root of the snapshot zip
file into the sdk_library/ sub-directory to allow the zip to be
unpacked in a directory that already contains an Android.bp file that
defines the apex_set for the corresponding APEX.
Also, removes the stubs_src property from the generated Android.bp
file.
Bug: 218685706
Test: packages/modules/common/build/mainline_modules_sdks.sh --build-release=R
atest --host mainline_modules_sdks_test
# deleted vendor/unbundled_google/modules/IpSecGooglePrebuilt from rvc-dev checkout.
# unpacked out/soong/mainline-sdks/for-R-build/ipsec-module-sdk-current.zip
# ran "m nothing"
Change-Id: I03e2060dc06338a8d0102744f79c75d33d567a17
Mainline.
These are used in the ART thin manifest. They are added here to allow
using the common module build scripts for them as well.
The Python script is extended to work for these modules, and their SDKs
end up in DIST_DIR/bundled-mainline-sdks, so DIST_DIR/mainline-sdks
only carries the SDKs for unbundled modules that are to be distributed
to partners etc.
This change has the effect to (re)enable building these SDKs in CI.
Test: env TARGET_BUILD_APPS="com.android.i18n com.android.runtime com.android.tzdata" \
packages/modules/common/build/mainline_modules_sdks.sh \
--build-platform-sdks-for-mainline --build-release=latest
Replace SDK snapshots under prebuilts/runtime/mainline with
those produced in out/dist/bundled-mainline-sdks
in a master-art tree, with https://r.android.com/2046463 applied,
then `banchan com.android.art && m`
Test: env -u TARGET_BUILD_APPS \
packages/modules/common/build/mainline_modules_sdks.sh \
--build-release=latest
Check that all SDKs are built, and that the bundled SDKs get copied
to out/dist/bundled-mainline-sdks so the contents of
out/dist/mainline-sdks and out/dist/stubs remain unchanged.
Test: env -u TARGET_BUILD_APPS \
packages/modules/common/build/mainline_modules_sdks.sh \
--build-release=S
Check that out/dist/bundled-mainline-sdks isn't producted.
Test: env -u TARGET_BUILD_APPS \
vendor/google/build/mainline_modules_sdks.sh
Check that all SDKs are built, and that the bundled SDKs get copied
to out/dist/bundled-mainline-sdks so the contents of
out/dist/mainline-sdks and out/dist/stubs remain unchanged.
Test: atest --host mainline_modules_sdks_test
Bug: 216762037
Change-Id: Ie6182fa42dc9c2c7f35ed95a040c05be0f0e878a