Commit Graph

1161 Commits

Author SHA1 Message Date
Anton Hansson
211a4e2b51 Update path to module SDKs
The "current" directory is going to be removed.

Test: No
Change-Id: I69669cfba5514ccb590e441537ae0377fb3cdf71
2022-05-12 11:42:06 +00:00
Jooyung Han
7d96e47a39 Merge "Update allowed-deps after setting NN's min_sdk_version" 2022-05-09 03:33:15 +00:00
William Escande
c2debcd803 Add libldac in the apex available
The ldac libs are statically link by the bluetooth module and this was
not needed as long as the library was a cc_library_static.
But if we do that, we need to remove from the gsi/current.txt and they
are not willing to do that in case partner depend on it

Apex-Size-Increase: 0
Test-Info: build - the same library as before only now we link it statically
Aosp-First: yes
Previous-Platform-Support: yes

Bug: 226572369
Test: Build
Change-Id: I4c0bad6ad8efdf236305c747284f3a0954bcbbf9
2022-05-05 14:28:12 -07:00
Anton Hansson
9dd7b86aab Merge "Default-on strict updatability linting for Modules" 2022-05-03 10:21:07 +00:00
Treehugger Robot
2984eb40b0 Merge "Add netd_aidl_interface-V9-ndk and netd_aidl_interface-V9-java" 2022-05-02 00:47:02 +00:00
Anton Hansson
8f3c2f946b Default-on strict updatability linting for Modules
Modules should be enabling this by now.

Test: errorprone build
Change-Id: I04efcf5b8903c50289809fc8e97d002d81e4754e
2022-04-29 11:40:42 +00:00
Anton Hansson
22a794f499 Address review comments on finalize_sdk.py
- Keep the Android.bp -- but rename to Android.bp.auto
- Use 'or' instead of 'if not'

Bug: 222050148
Test: Run finalize_sdk.py
Merged-In: I919c3d37916d3854cd0c8d59fddb8a1420f429b9
Change-Id: I919c3d37916d3854cd0c8d59fddb8a1420f429b9
2022-04-29 11:11:54 +00:00
Jooyung Han
ca3fdcd165 Update allowed-deps after setting NN's min_sdk_version
libneuralnetworks and its deps now set min_sdk_version, which was
hard-coded in build/soong/android/apex.go.

Bug: 158059172
Test: m
Change-Id: I5d7edc259d3ae38676757851d6e59f34a5983bfd
2022-04-29 12:19:39 +09:00
Hungming Chen
b43c14bdd1 Add netd_aidl_interface-V9-ndk and netd_aidl_interface-V9-java
Apex-Size-Increase: 0
Deprecate APIs in netd_aidl_interface-V8.
- clatdStart
- clatdStop
- tetherOffloadRuleAdd
- tetherOffloadRuleRemove
- tetherOffloadGetStats
- tetherOffloadSetInterfaceQuota
- tetherOffloadGetAndClearStats

Previous-Platform-Support: Yes, support previous platform releases

Aosp-First: Yes

Test-Info: all unit tests related to Connectivity/netd

Bug: 212345928
Test: atest FrameworksNetTests
Test: cd system/netd ; atest
Change-Id: Idfe7f56b109ec3976ca069e2fbc4daececda752e
2022-04-26 19:27:57 +08:00
Mårten Kongstad
018e0d0f54 finalize_sdk.py: add --readme option
Every time an SDK is finalized, a new version history entry should be
added to prebuilts/sdk/extensions/README.md. Introduce a new option,
--readme <msg>, to better enforce this.

Test: manual: run finalized_sdk.py, inspect README.md
Change-Id: I2257dc2bcf710bb2cb616afa9b8e3d3cb307de8e
2022-04-26 07:35:51 +00:00
Paul Duffin
b1e623fd6d Merge "Copy the out/soong/build_number.txt file into sdk snapshots for R" 2022-04-07 16:45:57 +00:00
Anton Hansson
f949851fc0 Merge changes I31848ad3,Icaf4937b,Ie7b44da3,I94f7c6f0
* changes:
  Make finalization script also copy compat txt files
  Add support to finalize only a subset of modules
  finalize_sdk.py maintenance
  Convert finalize_sdk.py to use pathlib
2022-04-07 12:12:11 +00:00
Anton Hansson
b853f31f28 Make finalization script also copy compat txt files
We need to duplicate the txt files in an additional location in
order for compatibility tracking to work. Make the script copy them
to that location as well.

Test: run finalize.py for version 2
Change-Id: I31848ad3f5cd0c264c68b4cdd874c93615de600a
2022-04-07 11:01:05 +01:00
Paul Duffin
4899f98a91 Copy the out/soong/build_number.txt file into sdk snapshots for R
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
2022-04-06 15:03:42 +00:00
Anton Hansson
53c913e727 Add support to finalize only a subset of modules
Finalization often doesn't include all modules, so make the script
support both modes of operation.

Test: together with the rest of the CLs in this set
Change-Id: Icaf4937b549118ae92457f25c08427a62de1274b
2022-04-06 15:30:55 +01:00
Anton Hansson
3e8dcd4a92 finalize_sdk.py maintenance
- Update to use new build server output structure
- Customize to work with train builds and continuous builds
- Don't finalize Android.bp files for now, we don't need them

Test: together with the rest of the CLs in this set
Change-Id: Ie7b44da3cf0a784d732702bce86cbe52f75493a4
2022-04-06 15:30:17 +01:00
Anton Hansson
0e8dbf88fb Convert finalize_sdk.py to use pathlib
The legacy os path stuff is a bit cumbersome to work with.

Test: together with the rest of the CLs in this set
Change-Id: I94f7c6f04e9f3e1644b1cc6585c2c8752f6b33ef
2022-04-06 11:58:01 +01:00
Mark Chien
e7b26ac7e4 Merge "Add networkstack-aidl-interface-V15 to allowed_deps" 2022-04-06 09:14:20 +00:00
Lorenzo Colitti
27af85827a Merge "Update deps for ConnectivityNative" 2022-04-01 21:46:39 +00:00
Treehugger Robot
b00d88f785 Merge "Update sdk version for mdns aidl libs" 2022-03-31 11:08:47 +00:00
Paul Duffin
b3805c1d35 mainline_modules_sdks.py: Optimize snapshot build order
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
2022-03-30 09:44:03 +00:00
Paul Duffin
ec1fdcdee4 Add test for snapshot build order
This test is added to show the current order so that the impact of a
follow up change that changes the order can be assessed.

Test: atest --host mainline_modules_sdks_test
      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: I738cc90024ebc2bec59a7193e1b1f42956763ef8
2022-03-30 09:44:03 +00:00
Paul Duffin
fa90e1e5e0 mainline_modules_sdks.py: Fix issues with r snapshot
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
2022-03-30 09:44:02 +00:00
Paul Duffin
2ef33a4d65 mainline_modules_sdks.py: Reformat
Test: atest --host mainline_modules_sdks_test
      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: I7f7b5f6e41c6a8cec02ec547a9b61c7922700880
2022-03-30 09:44:02 +00:00
Martin Stjernholm
8fa5ddae14 Merge changes I8bc68d10,Ie6182fa4
* changes:
  Add module_java_test_import module type required by new Conscrypt test-export snapshot.
  Add support for building SDKs for bundled modules and platform SDKs for Mainline.
2022-03-29 09:54:06 +00:00
Pedro Loureiro
07960fae8b Add Paul and Gurpreet to owners of packages/modules/common
Change-Id: Ib484ff400329c8bbbcf83ac59f2a5728b07a9ba8
2022-03-29 08:15:23 +00:00
Martin Stjernholm
71fb724f6f Add module_java_test_import module type required by new Conscrypt
test-export snapshot.

A new Conscrypt test-exports has a conscrypt-tests module that gets
transformed to module_java_test_import. The old snapshot in
prebuilts/runtime/mainline/conscrypt/test-exports was not produced by
packages/modules/common/build/mainline_modules_sdks.py so didn't have
any transformations.

Since Conscrypt is an unbundled module its test and host exports do get
transformed just like the SDK, even though they only go into
prebuilts/runtime/mainline for use on master-art.

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, then `banchan com.android.art && m`
Bug: 216762037
Change-Id: I8bc68d1063f3ce799123870d03de3fe691be2d69
2022-03-28 12:30:46 +01:00
Martin Stjernholm
576e65c512 Add support for building SDKs for bundled modules and platform SDKs for
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
2022-03-28 12:30:46 +01:00
Paul Duffin
aad984bea1 Fix failures caused by lack of ANDROID_BUILD_TOP on build servers
Bug: 226686554
Bug: 218685706
Test: unset ANDROID_BUILD_TOP
      packages/modules/common/build/mainline_modules_sdks.sh
Change-Id: I1da4309e0537b251b3f7a6c2160bef77e6f218ff
2022-03-25 11:10:44 +00:00
Paul Duffin
ffa89fd0a0 Generate sdk snapshots for the R build
This change replicates the behavior of the generate_ml_bundle.sh that
creates an Android.bp file along with the necessary file structure for
an R build.

It adds the information needed to a ForRBuild object which is set on
those MainlineModules that need to provide SDKs for R. That includes
a list of SdkLibrary objects each of which has a name and a flag that
indicates whether it is a shared library.

The R BuildRelease creator function builds the sdk snapshots as normal
and then extracts information from those snapshot files to construct
snapshots suitable for an R build. It then passes the directory
containing those new snapshot files to populate_dist() which will then
copy them into the correct location in the dist directory.

For each MainlineModule that provides an SDK for R the following is
created in the out/soong/mainline-sdks/for-R-build directory:
* A sub-directory using the apex name containing:
 * An Android.bp file with definitions for each SdkLibrary.
 * A file structure containing API txt file, removed API txt file,
   a srcjar containing the stub sources and a stubs jar.
* A zip file containing the contents of the previous directory whose
  name is <sdk-name>-current.zip, to match the files that are
  generated by Soong when building sdk snapshots.

As R does not support the Soong config boilerplate code that
transformation is disabled for R.

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: I70001782496a3e9805bf56181c0e08419e31e191
2022-03-23 15:45:15 +00:00
Paul Duffin
726f9ab1bf Merge "Decouple population of the dist dir from the SnapshotBuilder" 2022-03-23 09:35:09 +00:00
Paul Duffin
2a5e1b5e4e Merge "Move populate_stubs into LEGACY BuildRelease" 2022-03-23 09:33:15 +00:00
Allen Hair
d0cac61878 Merge "Update asm-7.0 to asm-9.2." 2022-03-22 17:03:20 +00:00
Paul Duffin
48e7f7d7d0 Decouple population of the dist dir from the SnapshotBuilder
Previously, the code for populating the dist directory, e.g.
populate_dist and create_legacy_dist_structures assumed that the sdk
snapshot files they needed could be found in the directory referenced
by SnapshotBuilder.mainline_sdks_dir. This change removes that
assumption and instead passes the snapshot_dirs directory into the
populate_dist method and uses it in the create_legacy_dist_structures
function.

This refactoring is needed to allow a follow up change to construct a
set of sdk snapshot files in a different directory while still using
the populate_dist method to copy them into the correct location in the
dist directory.

Bug: 218685706
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: I9fb659df28d7688b3f081bf84f5fae8ee85dc534
2022-03-21 12:53:16 +00:00
Paul Duffin
04b51993d5 Move populate_stubs into LEGACY BuildRelease
Previously, the populate_stubs was handled specially in produce_dist.
However, it is LEGACY behavior and so it makes sense to move the
code into the LEGACY BuildRelease's creator function.

While testing, the script failed because the LEGACY BuildRelease does
not build the snapshots, it assumes that the LEGACY is always run after
LATEST. This change makes the LEGACY build the snapshots. In normal use
it will not cause any increase in build time as it will always run
after LATEST and build the snapshots with the same environment turning
the build command into a no-op.

Bug: 218685706
Test: rm -fr out/soong/mainline-sdks
      packages/modules/common/build/mainline_modules_sdks.sh --build-release=LEGACY
      # Before this change it fails due to missing files, after it works.
      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: Iaa2f9f71dd5085965d3ad32110b324453df87ee6
2022-03-21 12:53:16 +00:00
Paul Duffin
dc0c4c5d3f Extract unzip_current_stubs from SdkDistProducer
A minor refactoring that generalizes the method, making it usable for
other cases and decouples it from SdkDistProducer and SnapshotBuilder.

Bug: 218685706
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: I885b7d0e792691f7028cdfb91e72896be48333a1
2022-03-21 12:53:16 +00:00
Paul Duffin
14c6bd8c38 Add --build-release option to mainline_modules_sdks.sh
This change makes it easier to test the behavior of specific build
releases.

Bug: 218685706
Test: atest --host mainline_modules_sdks_test
      packages/modules/common/build/mainline_modules_sdks.sh
      packages/modules/common/build/mainline_modules_sdks.sh --build-release=S --build-release=latest
      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: Ib9ef2f35d27d10cd960c4b6225417d930cb10afc
2022-03-21 12:53:14 +00:00
Paul Duffin
de60aeb525 Improve testing of mainline_modules_sdks.py
Adds a test for a com.google name module and makes the structure of the
test snapshot created by FakeSnapshotBuilder.create_snapshot_file()
match the names used in an actual sdk snapshot.

Bug: 218685706
Test: atest --host mainline_modules_sdks_test
      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: Ia11cbb2da717218ba0b2da9a2238856dc8cebf8f
2022-03-18 15:59:33 +00:00
Paul Duffin
4f192a156b Cleanup pylint errors in mainline_modules_sdks*.py
Bug: 218685706
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: I5ba3da7dcde6d44b1855b41bac8eb80e0f3a593c
2022-03-18 15:58:57 +00:00
Anton Hansson
4404571a65 Merge "Remove StubLibraries.bp" 2022-03-10 17:15:48 +00:00
Alexander Dorokhine
e5e755bcb5 Merge "Update allowed_deps for AppSearch apex." 2022-03-09 20:13:03 +00:00
Allen Hair
2aea1fc33b Update asm-7.0 to asm-9.2.
Bug: 194725917
Bug: 221938918
Test: Forrest build.
No-Allowed-Deps-Check: Only affects coverage builds.
Change-Id: Idbf7e89088e234a58156694d0b1b0f1642a132e9
2022-03-08 18:48:36 +00:00
Xin Li
2440b5a4e0 Merge "Merge Android 12L" 2022-03-08 06:55:44 +00:00
Colin Cross
15832de35e Merge "Use single module for clang runtime libraries" 2022-03-08 06:51:43 +00:00
Xin Li
fed2257e28 Merge Android 12L
Bug: 222710654
Merged-In: I58ff762b428a3027ff9208aa5c8114a6216edf7f
Change-Id: I0e2d9d35a852e083182142a123fdcbefb06c2606
2022-03-08 00:19:54 +00:00
Paul Hu
cc60f4bb48 Merge "Remove framework-module-defaults visibility to ConnectivityT" am: ce95bdcc0b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2007076

Change-Id: I58ff762b428a3027ff9208aa5c8114a6216edf7f
2022-03-07 01:23:39 +00:00
Paul Hu
ce95bdcc0b Merge "Remove framework-module-defaults visibility to ConnectivityT" 2022-03-07 00:59:15 +00:00
Colin Cross
27f67aca93 Merge "Add libmedia_helper to allowed deps" am: 8ad28b971b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/1986667

Change-Id: I924714b1766f14ff944f16fd692b9d3d474fe2c0
2022-03-04 23:19:34 +00:00
Colin Cross
8ad28b971b Merge "Add libmedia_helper to allowed deps" 2022-03-04 22:48:58 +00:00
Alexander Dorokhine
9b0b24aa08 Update allowed_deps for AppSearch apex.
icing-java-proto-lite contains protobuf messages for working with icing
lib.

icing lib is the library underlying AppSearch and we don't expect any
other module to be interested in this lib or these protos.

The protos and the operation of icing lib are verified through
AppSearch's CTS and MTS tests.

Aosp-First: internal
Test-Info: Tested as part of CtsAppSearchTestCases
Previous-Platform-Support: Yes. The dependency is statically compiled into AppSearch and will support all platforms that AppSearch supports.
Apex-Size-Increase: 448KiB
Bug: 146218515
Test: Builds; passes CTS tests
Change-Id: I74caed11a00e99a48be83628768a1a5cae3ac2aa
2022-03-04 02:16:10 -08:00