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
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
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
Ignore-AOSP-First: need to prevent it from being merged into tm-mainline-prod
Bug: 259958590
Test: Build
Change-Id: Ifb5284a9a0057611aaee32a28273f9583c3cad42
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
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
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