Commit Graph

1076 Commits

Author SHA1 Message Date
Jiyong Park 8d6286befe apex_sets is added to apexkeys.txt
apex_sets is a new module type that can be used to deliver pre-signed
APEXes, which previously could be done only via prebuilt_apex.

Soon gnow understands apex_sets module types and emits the signing info
of the modules to apexkeys.txt

Exempt-From-Owner-Approval: cherry-pic from AOSP

Bug: 158729168
Test: m
Merged-In: I9507375342ec053309660d94c931a79bf4f21218
(cherry picked from commit 8d6c51ebcc)
Change-Id: I9507375342ec053309660d94c931a79bf4f21218
2020-06-17 13:17:11 +09:00
Yo Chiang f298a3f325 Merge "Don't emit superfluous LOCAL_OVERRIDES_MODULES" 2020-06-17 04:03:03 +00:00
Colin Cross a2e64e7b84 Merge "Use inclusive language in Android.bp files" 2020-06-17 01:04:26 +00:00
Colin Cross cbd62d07d4 Use inclusive language in Android.bp files
Test: m checkbuild
Change-Id: Id9efbd99be54b191193eae1c5672230ca54cf1d2
Merged-In: Id9efbd99be54b191193eae1c5672230ca54cf1d2
2020-06-16 23:36:51 +00:00
Anton Hansson c3754ba042 Merge "Let APEX build against preferred java_sdk_library_import" into rvc-dev 2020-06-16 17:47:16 +00:00
Paul Duffin 98c5d09541 Merge "Let APEX build against preferred java_sdk_library_import" am: e40383355b am: 86be0eafca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1331928

Change-Id: Ia4bb1dc336da459172dd74bedef7396085796dfc
2020-06-16 09:57:40 +00:00
Paul Duffin f642a31ab5 Let APEX build against preferred java_sdk_library_import
If a java_sdk_library_import has a corresponding java_sdk_library then
make the java_sdk_library_import export both the xml and impl modules
created by the java_sdk_library.

Makes java_sdk_library_import consistent with java_sdk_library by
providing libraries within the same APEX access to the implementation
library instead of the stubs.

Bug: 158304459
Test: m nothing
      Test what happens when building com.android.tethering with and without
      a preferred "framework-tethering" java_sdk_library_import. Make sure that
      it does not change the generated APEX.
Merged-In: I2f4edea937ac377431a5696c92cbd467bded62ef
Change-Id: I2f4edea937ac377431a5696c92cbd467bded62ef
(cherry picked from commit eedc5d55ce)
2020-06-16 10:43:19 +01:00
Paul Duffin e40383355b Merge "Let APEX build against preferred java_sdk_library_import" 2020-06-16 09:37:53 +00:00
Yo Chiang 12d9f7a103 Don't emit superfluous LOCAL_OVERRIDES_MODULES
Don't emit an empty LOCAL_OVERRIDES_MODULES line if APEX is not
overriding any module.

Test: TH noop
Change-Id: I7abbaccd54bf2ffa25a6c798260c81284ea5ecb2
2020-06-16 17:33:57 +08:00
Colin Cross e8f7f90496 Merge changes from topics "soong-inclusive-language", "soong_inclusive_language2" into rvc-dev am: f4a5492ec9
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11859399

Change-Id: I1b009faacad99fcbfbf6cd06193f033ea37f6040
2020-06-16 03:43:15 +00:00
Colin Cross f4a5492ec9 Merge changes from topics "soong-inclusive-language", "soong_inclusive_language2" into rvc-dev
* changes:
  Use inclusive language in Android.bp files
  Use inclusive language in build/soong
2020-06-16 03:28:15 +00:00
Treehugger Robot c41c1a9d13 Merge "Remove libnativehelper modules from whitelist" 2020-06-15 17:00:35 +00:00
Colin Cross a44a6b27f9 Use inclusive language in Android.bp files
Bug: 158889297
Test: m checkbuild
Change-Id: Id9efbd99be54b191193eae1c5672230ca54cf1d2
2020-06-15 09:46:32 -07:00
Colin Cross 95f7b34e8e Use inclusive language in build/soong
Bug: 158889297
Test: m checkbuild
Change-Id: Id07890b7cbc2397291a658ca00e86b43c743aafc
Merged-In: Id07890b7cbc2397291a658ca00e86b43c743aafc
(cherry picked from commit 440e0d0542)
2020-06-15 09:46:31 -07:00
Paul Duffin eedc5d55ce Let APEX build against preferred java_sdk_library_import
If a java_sdk_library_import has a corresponding java_sdk_library then
make the java_sdk_library_import export both the xml and impl modules
created by the java_sdk_library.

Makes java_sdk_library_import consistent with java_sdk_library by
providing libraries within the same APEX access to the implementation
library instead of the stubs.

Bug: 158304459
Test: m nothing
      Test what happens when building com.android.tethering with and without
      a preferred "framework-tethering" java_sdk_library_import. Make sure that
      it does not change the generated APEX.
Change-Id: I2f4edea937ac377431a5696c92cbd467bded62ef
2020-06-15 16:57:09 +01:00
TreeHugger Robot 4666f7ef3a Merge "Remove libnativehelper modules from whitelist" into rvc-dev-plus-aosp 2020-06-15 15:27:56 +00:00
Jooyung Han e30c7b98bc Merge "VNDK APEX should not provide native libs" am: 552d4730c3 am: 6b67734812
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1335522

Change-Id: Ieaa981ee386de3a31f45a87e60819b25baf98883
2020-06-15 14:27:50 +00:00
Orion Hodson 01615f36f2 Remove libnativehelper modules from whitelist
Bug: 147364041
Test: m nothing
Change-Id: I6a43511fee3feeb164e07d5620eea0564fbee302
Merged-In: I6a43511fee3feeb164e07d5620eea0564fbee302
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit 7e2354434907257f37255052d9bd08c554e263eb)
2020-06-15 13:32:14 +00:00
Orion Hodson 494c63b20e Remove libnativehelper modules from whitelist
Bug: 147364041
Test: m nothing
Change-Id: I6a43511fee3feeb164e07d5620eea0564fbee302
Merged-In: I6a43511fee3feeb164e07d5620eea0564fbee302
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit ab67d8f9b4)
2020-06-15 13:25:59 +00:00
Jooyung Han 45a96778c1 VNDK APEX should not provide native libs
While libz has stubs for other mainline modules, it doesn't provide
stubs when it is used as a VNDK lib.

In general, VNDK libs are only for vendor modules. So, we skip them even
if they have stubs.

Bug: 155456180
Test: m com.android.vndk.current
      provideNativeLibs of the APEX should be empty
Change-Id: I22401a2b1732a8560802c5be850181682e183a8e
2020-06-15 15:14:12 +09:00
Treehugger Robot 0c0583bd6b Merge "apex_sets is added to apexkeys.txt" am: 7a8e0cd23a am: f2ca2846db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1331104

Change-Id: Ieec1c09704a14bd670b947590eaba0e8d5ac9805
2020-06-13 02:51:39 +00:00
Colin Cross 973d6813cd manual merge of 2ef16cfcd4 to rvc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: I768c3fe568fee764cb0b533e73a3fef719adf30c
2020-06-12 17:49:09 -07:00
Treehugger Robot 7a8e0cd23a Merge "apex_sets is added to apexkeys.txt" 2020-06-12 18:03:31 +00:00
Jiyong Park 8d6c51ebcc apex_sets is added to apexkeys.txt
apex_sets is a new module type that can be used to deliver pre-signed
APEXes, which previously could be done only via prebuilt_apex.

Soon gnow understands apex_sets module types and emits the signing info
of the modules to apexkeys.txt

Bug: 158729168
Test: m
Change-Id: I9507375342ec053309660d94c931a79bf4f21218
2020-06-13 01:24:51 +09:00
Colin Cross 440e0d0542 Use inclusive language in build/soong
Test: m checkbuild
Change-Id: Id07890b7cbc2397291a658ca00e86b43c743aafc
2020-06-11 15:33:16 -07:00
Treehugger Robot 639e87e123 Merge "Fix type assertion error regarding dex_import" am: 36aef533cc am: 86e4acfaad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1328734

Change-Id: Ie52128b2cb0fd78bf6e36d57d4d68231208f94c8
2020-06-11 01:14:55 +00:00
Jiyong Park e26a63e2fd Fix type assertion error regarding dex_import
Ida6f7bb784efe74cc1fa0e8d370eaee803f08b0f made it possible to add
dex_import modules into apex, but that change had a bug. When creating
Android.mk for the dex_import module, the code executed an unchecked
type assertion to convert java.DexImport to java.Dependency, which
cannot be successful. This change fixes the bug by doing a checked type
assertion instead.

Exempt-From-Owner-Approval: cp from AOSP

Bug: 157886942
Test: m (test added)
Merged-In: Id22c20d42effce539fab10b0d349bf340d467f02
(cherry picked from commit 9e83f0b531)
Change-Id: Id22c20d42effce539fab10b0d349bf340d467f02
2020-06-11 09:47:16 +09:00
Treehugger Robot 36aef533cc Merge "Fix type assertion error regarding dex_import" 2020-06-11 00:45:46 +00:00
Jaewoong Jung 9c646b161e Use Targets[Android] instead of DeviceArch funcs. am: 829b7135f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11820097

Change-Id: I216e04656108c7d7c7b35d39fa70f82ef656d38a
2020-06-10 21:50:16 +00:00
Jaewoong Jung 829b7135f3 Use Targets[Android] instead of DeviceArch funcs.
NDK prebuit script doesn't set device arch product variables, and so
causes SupportedAbis to panic.

Fixes: 158673325
Test: app_test.go, apex_test.go
Test: build-ndk-prebuilts.sh
Change-Id: I8331ef5bca12301318510ec9712770fd8d3a26a9
2020-06-10 12:30:51 -07:00
Elliott Hughes f48d50bfb7 Merge "Remove TARGET_PREFER_32_BIT support." am: a82ad479a4 am: 274a80c492
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1289612

Change-Id: I8862a464aa374922dadedd68e47d1705b8ce5836
2020-06-10 18:36:54 +00:00
Jiyong Park 9e83f0b531 Fix type assertion error regarding dex_import
Ida6f7bb784efe74cc1fa0e8d370eaee803f08b0f made it possible to add
dex_import modules into apex, but that change had a bug. When creating
Android.mk for the dex_import module, the code executed an unchecked
type assertion to convert java.DexImport to java.Dependency, which
cannot be successful. This change fixes the bug by doing a checked type
assertion instead.

Bug: 157886942
Test: m (test added)
Change-Id: Id22c20d42effce539fab10b0d349bf340d467f02
2020-06-11 00:35:03 +09:00
Elliott Hughes 79ae341d4b Remove TARGET_PREFER_32_BIT support.
Bug: https://issuetracker.google.com/138812821
Test: builds
Change-Id: If96cccbd82ba1311165d61c947c928c6e7cd5593
2020-06-08 16:37:13 -07:00
Sasha Smundak c4f0ff1d6c Cherrypick aosp/1318079 and aosp/1324841
Allow apex module to have android_app_set as its constituent.
Fix android_app_set documentation

Fixes: 157166068
Test: treehugger & manual
Change-Id: I9f91f1b761286f489d175eb0772f78f702e8a2d6
Merged-In: I9f91f1b761286f489d175eb0772f78f702e8a2d6
Merged-In: Id9b296d9301902deb463b299413491bc66d58944
2020-06-05 15:39:38 -07:00
Anton Hansson d7fdfd6e77 Merge "dex_import can be added to apex" into rvc-dev 2020-06-05 10:05:50 +00:00
Anton Hansson 4ecb0d6bb0 Merge "Use Stem where output file name is expected in APEX" into rvc-dev 2020-06-05 10:05:50 +00:00
Treehugger Robot dba1360d03 Merge "Allow apex module to have android_app_set as its constituent." am: a5c94e1409 am: 342b4810a7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1318079

Change-Id: If27ef9b94e59620abcf2ef1179f51c2e5ca9b10f
2020-06-05 06:22:41 +00:00
Treehugger Robot a5c94e1409 Merge "Allow apex module to have android_app_set as its constituent." 2020-06-05 05:52:51 +00:00
Sasha Smundak 18d98bc3e0 Allow apex module to have android_app_set as its constituent.
Fixes: 157166068
Test: treehugger & manual
Change-Id: I9f91f1b761286f489d175eb0772f78f702e8a2d6
2020-06-04 20:25:53 -07:00
Ulyana Trafimovich abbe8875b3 Revert^2 "Rename DexJar interface method to DexJarBuildPath." am: 5539e7b568 am: 0852ac9a6d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1324492

Change-Id: I75dc93bb6aac621a0d90e5c5051cdeab98f5d1ef
2020-06-05 01:29:34 +00:00
Ulyana Trafimovich 5539e7b568 Revert^2 "Rename DexJar interface method to DexJarBuildPath."
This reverts commit b0dc851ff4.

Reason for revert: relanding original change. Build failures were
  caused by a race with another CL: https://r.android.com/1320920

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ic9016582dae7773b4d4f84a63425f1ef7a5d061f
2020-06-04 17:20:38 +01:00
Ulyana Trafimovich 7e59e8e2df Merge "Revert "Rename DexJar interface method to DexJarBuildPath."" am: c55b679e7b am: 651a63ca9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1324371

Change-Id: Ic3be6718aff2b04048bac17635b2858581fe7f8a
2020-06-04 11:13:23 +00:00
Ulyana Trafimovich c55b679e7b Merge "Revert "Rename DexJar interface method to DexJarBuildPath."" 2020-06-04 10:47:47 +00:00
Ulyana Trafimovich b0dc851ff4 Revert "Rename DexJar interface method to DexJarBuildPath."
This reverts commit 562c240185.

Reason for revert: breaks `lunch full-eng && m checkbuild`.

Change-Id: Id7c7d6240d98afaf8edd49b6c96cd05534b784cc
2020-06-04 10:37:36 +00:00
Ulyana Trafimovich 0cc337d35a Merge "Rename DexJar interface method to DexJarBuildPath." am: 2a08566634 am: 22cd1b5383
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1322701

Change-Id: I87a6570cc6184bb38dda1f83dac787c30d8aaa54
2020-06-04 10:36:28 +00:00
Ulyana Trafimovich 2a08566634 Merge "Rename DexJar interface method to DexJarBuildPath." 2020-06-04 10:05:33 +00:00
Jiyong Park 2cd081cf06 dex_import can be added to apex
Bug:157886942
Test: m
Change-Id: Ida6f7bb784efe74cc1fa0e8d370eaee803f08b0f
Merged-In: Ida6f7bb784efe74cc1fa0e8d370eaee803f08b0f
2020-06-04 10:28:44 +01:00
Treehugger Robot a7f51bb3c0 Merge "dex_import can be added to apex" am: a8bf98852a am: 55110941ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1320920

Change-Id: I09342ecaf016ca85ab5ac5812c46af6932179258
2020-06-04 05:38:13 +00:00
Treehugger Robot a8bf98852a Merge "dex_import can be added to apex" 2020-06-04 05:06:22 +00:00
Ulya Trafimovich 562c240185 Rename DexJar interface method to DexJarBuildPath.
This is a prerequisite change before adding DexJarInstallPath.

Test: lunch aosp_cf_phone-userdebug && m
Change-Id: I033e08b8bb06c0a844a6bbbfcdc48ce33e9c95cf
2020-06-03 11:40:45 +01:00
Jaewoong Jung fccad6b098 Soong package structure refactoring
Give prebuilt_etc and sh_binary their own packages and split the
gigantic main Android.bp up to small, per-package ones.

(This is a cherry-pick change.)

Test: m nothing, TreeHugger
Bug: 156980228
Change-Id: I7b00cd344b9f16861f1ff39edf0029f016b853d0
Merged-In: I7b00cd344b9f16861f1ff39edf0029f016b853d0
2020-06-02 14:35:04 -07:00
Jaewoong Jung 8066ebc38f Merge "Soong package structure refactoring" am: 264700345d am: ca9ed9158d
Original change: undetermined

Change-Id: I5cd95c02ab8af420dc2b7166ba24bdf0c7dc6496
2020-06-02 16:57:16 +00:00
Jiyong Park 77acec63fe dex_import can be added to apex
Bug:157886942
Test: m
Change-Id: Ida6f7bb784efe74cc1fa0e8d370eaee803f08b0f
2020-06-02 11:54:01 +09:00
Jaewoong Jung 4b79e98a6e Soong package structure refactoring
Give prebuilt_etc and sh_binary their own packages and split the
gigantic main Android.bp up to small, per-package ones.

Test: m nothing, TreeHugger
Bug: 156980228
Change-Id: I7b00cd344b9f16861f1ff39edf0029f016b853d0
2020-06-01 13:44:48 -07:00
Jiyong Park 7a12fd11ee Merge "Use Stem where output file name is expected in APEX" am: 0e666433cd am: 611703096e
Change-Id: I94d8f5541deea86310ad3b249b670c61623f3b96
2020-06-01 01:02:03 +00:00
Jiyong Park 0e666433cd Merge "Use Stem where output file name is expected in APEX" 2020-06-01 00:35:48 +00:00
Kousik Kumar 6619d28c15 Merge "Add support for remote-execution / caching of signapk actions" into rvc-dev 2020-05-31 01:10:18 +00:00
Jiyong Park 327b057e84 Merge "Notice file embededd in APEX is deterministic" into rvc-dev 2020-05-30 22:35:47 +00:00
Kousik Kumar 15e9d0dbf8 Add support for remote-execution / caching of signapk actions
Test: "RBE_SIGNAPK=true RBE_SIGNAPK_EXEC_STRATEGY=remote ... use_rbe m" on crosshatch-userdebug and
signapk targets worked
Bug: b/156765091

Change-Id: I4b8c21320c2f38914ef39d3d8f036d885fab4e72
Merged-In: I4b8c21320c2f38914ef39d3d8f036d885fab4e72
2020-05-30 19:58:58 +00:00
Jiyong Park cbe50c7073 Use Stem where output file name is expected in APEX
Bug: 157638999
Test: m
Merged-In: I4a4892bc2941cf1301d210fc3107c02f0e7b13b7
(cherry picked from commit f1493cc0f2)
Change-Id: I4a4892bc2941cf1301d210fc3107c02f0e7b13b7
2020-05-30 21:15:24 +09:00
Jiyong Park 402ace6c25 Notice file embededd in APEX is deterministic
Exempt-From-Owner-Approval: cherry-pick from AOSP

Bug: 157724521
Test: m
Merged-In: I25f6cd9dd0679af6acfc2594314d11fa53ae2151
(cherry picked from commit 33c7736936)
Change-Id: I25f6cd9dd0679af6acfc2594314d11fa53ae2151
2020-05-30 12:11:16 +00:00
Treehugger Robot 94d161a3c7 Merge "Notice file embededd in APEX is deterministic" am: 9980c6e111 am: bd7f948507
Change-Id: I2cf22542513eff83fefef1503954015ffd3be6a9
2020-05-30 08:30:11 +00:00
Jiyong Park f1493cc0f2 Use Stem where output file name is expected in APEX
Bug: 157638999
Test: m
Change-Id: I4a4892bc2941cf1301d210fc3107c02f0e7b13b7
2020-05-30 13:26:55 +09:00
Jiyong Park 33c7736936 Notice file embededd in APEX is deterministic
Bug: 157724521
Test: m
Change-Id: I25f6cd9dd0679af6acfc2594314d11fa53ae2151
2020-05-29 22:00:16 +09:00
Jiyong Park ed50ca8dd8 apex respects stem of java_library modules
apex now respects stem of java_library modules.

As a follow-up we need to suppor the same for other types of modules.

Exempt-From-Owner-Approval: cherry-pick from AOSP

Bug: 157638999
Test: m
Merged-In: Iaf5023020b5440f1ffd4f5414b5a7864655fc22a
(cherry picked from commit a62aa23990)
Change-Id: Iaf5023020b5440f1ffd4f5414b5a7864655fc22a
2020-05-29 14:15:36 +09:00
Treehugger Robot db1bd15ef0 Merge "apex respects stem of java_library modules" am: 00f5701ade am: 3013ea064f
Change-Id: I40a1a6803d8af53a7889b8986f59fbafd4d13ee1
2020-05-29 01:17:33 +00:00
Treehugger Robot 00f5701ade Merge "apex respects stem of java_library modules" 2020-05-29 00:45:03 +00:00
Kousik Kumar 0f5e5c724e Merge "Add support for remote-execution / caching of signapk actions" am: 8f37ec82d9 am: f52d6420ea
Change-Id: I3c51e0ff23903ba101d2029a632f99fc8342c2d9
2020-05-28 19:06:40 +00:00
Kousik Kumar 8f37ec82d9 Merge "Add support for remote-execution / caching of signapk actions" 2020-05-28 18:31:31 +00:00
Liz Kammer 1de62786c3 Merge "Only include test data in flattened apex 1 time" am: 25aeb7d19b am: aa5f42c3c4
Change-Id: Ia0ebe0e45a2f0fa7f3620313f94cd0835d2c8468
2020-05-28 17:33:00 +00:00
Liz Kammer 25aeb7d19b Merge "Only include test data in flattened apex 1 time" 2020-05-28 16:57:39 +00:00
Jiyong Park a62aa23990 apex respects stem of java_library modules
apex now respects stem of java_library modules.

As a follow-up we need to suppor the same for other types of modules.

Bug: 157638999
Test: m
Change-Id: Iaf5023020b5440f1ffd4f5414b5a7864655fc22a
2020-05-28 23:48:16 +09:00
Kousik Kumar 309b1c0da3 Add support for remote-execution / caching of signapk actions
Test: "RBE_SIGNAPK=true RBE_SIGNAPK_EXEC_STRATEGY=remote ... use_rbe m" on crosshatch-userdebug and
signapk targets worked
Bug: b/156765091

Change-Id: I4b8c21320c2f38914ef39d3d8f036d885fab4e72
2020-05-28 06:14:56 -07:00
Jiyong Park b51e7ea3b8 Remove apex_available whitelist for the ART APEX
The marked library(ies) were available to the APEX via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 150999716
Test: m
Merged-In: I2b792657b444f0c963e1e92b7c91f6a0cfe1688c
(cherry picked from commit be6e2b6a18)
Change-Id: I2b792657b444f0c963e1e92b7c91f6a0cfe1688c
2020-05-28 04:06:41 +00:00
Jiyong Park 69efc4625a Merge changes from topic "apex_available_art" into rvc-dev am: b7431abffe
Change-Id: Idb9f30b74687f2c5da9494db60ae6614a67c0c4b
2020-05-28 01:11:19 +00:00
Jiyong Park 885910e198 DO NOT MERGE: Revert "DO NOT MERGE: Remove AppSearch from Android R." am: 8b39919030
Change-Id: If72ac03ec041b30dc2636ba5412c375ac1566ca4
2020-05-28 01:11:17 +00:00
Jiyong Park b7431abffe Merge changes from topic "apex_available_art" into rvc-dev
* changes:
  Remove apex_available whitelist for the ART APEX
  DO NOT MERGE: Revert "DO NOT MERGE: Remove AppSearch from Android R."
2020-05-28 00:49:45 +00:00
Liz Kammer 5bd365f1e5 Only include test data in flattened apex 1 time
Previously, if a data source was included in multiple APEX, it would
appear multiple times; however, this caused errors for overriding
commands for targets

Test: apex_test.go
Test: m nothing with change I54d92eca88fc04c949209d490e838d0a92ce8f87
Bug: 155820504
Change-Id: I98f04e0fd9fa3238f2bb0e5da3a86fc0797c38ba
2020-05-27 15:32:30 -07:00
Artur Satayev 07d215215b Merge changes I4ab7e1a3,Ib525b2f5,I2d4c54fb into rvc-dev
* changes:
  Generate combined deps-info for all updatable modules.
  Remove ApexBundleDepsInfo.MinSdkVersion()
  Add "updatable" property to ApexModule interface.
2020-05-27 20:58:27 +00:00
Liz Kammer 6d88fe6caf Merge "Add test to ensure test data written for flat apex" am: 5903b669ad am: 63f3b9a501
Change-Id: Ic083ddbe0e3198eef112d6debb8bacbc2ab30ac2
2020-05-27 17:01:42 +00:00
Artur Satayev 2b4b7bbe82 Generate combined deps-info for all updatable modules.
Introduce a singleton apex rule to merge contents of individual
deps-info results into a single output file.

Bug: 149622332
Test: m
Change-Id: I4ab7e1a3527fead97a81a5a2cb0e1e93a429117c
Merged-In: I4ab7e1a3527fead97a81a5a2cb0e1e93a429117c
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit 849f844252)
2020-05-27 17:51:18 +01:00
Ulya Trafimovich c0eb0b1ae5 Add "updatable" property to ApexModule interface.
For a given variant of a module that implements ApexModule interface,
the "updatable" property tests if this variant comes from an updatable
apex. For platform variants it is always false.

Test: lunch aosp_walleye-userdebug && m nothing
Bug: 138994281
Merged-In: I2d4c54fb397e29dc9b3203be7fb17be4536529f7
Change-Id: I2d4c54fb397e29dc9b3203be7fb17be4536529f7
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit 7c140d828a)
2020-05-27 17:50:51 +01:00
Liz Kammer 5903b669ad Merge "Add test to ensure test data written for flat apex" 2020-05-27 16:24:08 +00:00
Paul Duffin bf19a97965 java_sdk_library: Expose implementation within APEX
Access to the implementation JARs is restricted to avoid code from
depending on implementation details that could change from one release
to the next which could cause compatibility issues. That is not a
problem when referenced from within the APEX that contains the
java_sdk_library.

As references from within the same APEX often need to access
implementation specific details of the java_sdk_library and doing that
from within the same APEX is safe this change all references to a
java_sdk_library made within the same APEX to use the implementation
jars instead of stub jars.

Bug: 155164730
Test: m droid
Change-Id: If239059690de61683c2ad2d8a0ce2e47286a3637
(cherry picked from commit 9b879594ed)
2020-05-27 07:41:18 +01:00
Paul Duffin 8ecb28156b java_sdk_library: Expose implementation within APEX am: 9b879594ed am: af853b758f
Change-Id: I428d88113401ab9e6befef2574a01d8579e91c55
2020-05-26 22:08:35 +00:00
Paul Duffin 9b879594ed java_sdk_library: Expose implementation within APEX
Access to the implementation JARs is restricted to avoid code from
depending on implementation details that could change from one release
to the next which could cause compatibility issues. That is not a
problem when referenced from within the APEX that contains the
java_sdk_library.

As references from within the same APEX often need to access
implementation specific details of the java_sdk_library and doing that
from within the same APEX is safe this change all references to a
java_sdk_library made within the same APEX to use the implementation
jars instead of stub jars.

Bug: 155164730
Test: m droid
Change-Id: If239059690de61683c2ad2d8a0ce2e47286a3637
2020-05-26 18:32:44 +01:00
Nikita Ioffe 62bd3c7b47 Merge "Always set targetSdkLevel to DefaultAppTargetSdk" 2020-05-26 16:47:42 +00:00
satayev 84ff6be8e9 Merge "Generate combined deps-info for all updatable modules." am: ede18549e5 am: 3a0a6427bd
Change-Id: I2ae338e9f883695260d922e6607c73770a4c8c04
2020-05-26 14:03:00 +00:00
satayev ede18549e5 Merge "Generate combined deps-info for all updatable modules." 2020-05-26 13:28:28 +00:00
Jiyong Park 8b39919030 DO NOT MERGE: Revert "DO NOT MERGE: Remove AppSearch from Android R."
This reverts commit c9c7116721.

This revert is to avoid merge conflict when ag/11299431 is auto-merged
to master.

This change will again be reverted when ag/11299431 lands.

Bug: 150999716
Test: m

Change-Id: Ia0f7a0e0eb8cf6f6f4d0693de01777a8a750c769
2020-05-25 17:05:35 +09:00
Jiyong Park be6e2b6a18 Remove apex_available whitelist for the ART APEX
The marked library(ies) were available to the APEX via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.

Bug: 150999716
Test: m
Change-Id: I2b792657b444f0c963e1e92b7c91f6a0cfe1688c
2020-05-25 17:05:35 +09:00
Jooyung Han 5ab5856db3 Merge "apex: Make android_library support APEX variants" 2020-05-21 12:02:39 +00:00
Jooyung Han acc7bbebe4 apex: Make android_library support APEX variants
The android_library module type can be used within an android_app that
can itself be added to an apex but android_library does not call
android.InitApexModule(module) and so it does not support apex variants
and so is treated as if it cannot be part of an APEX even though it
actually is.

Now, android_library supports AEPX variants.

Due to this change, the whilelist for apex_available got bigger.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 156978407
Test: m
Merged-In: I3a21d653fe9c4159e3a89791fe1a8597865eeae6
Change-Id: I3a21d653fe9c4159e3a89791fe1a8597865eeae6
(cherry picked from commit bd133b1bdc)
2020-05-21 12:01:54 +00:00
Jooyung Han e0937418a9 Merge "apex: Make android_library support APEX variants" into rvc-dev 2020-05-21 11:48:56 +00:00
Jooyung Han a8625c5393 Merge "apex: Make android_library support APEX variants" into rvc-dev-plus-aosp 2020-05-21 06:17:29 +00:00
Jooyung Han 040ff3d5c1 apex: Make android_library support APEX variants
The android_library module type can be used within an android_app that
can itself be added to an apex but android_library does not call
android.InitApexModule(module) and so it does not support apex variants
and so is treated as if it cannot be part of an APEX even though it
actually is.

Now, android_library supports AEPX variants.

Due to this change, the whilelist for apex_available got bigger.

Exempt-From-Owner-Approval: approved in rvc-dev

Bug: 156978407
Test: m
Merged-In: I3a21d653fe9c4159e3a89791fe1a8597865eeae6
Change-Id: I3a21d653fe9c4159e3a89791fe1a8597865eeae6
2020-05-21 06:16:59 +00:00
Jooyung Han ff4e78e876 Merge "apex: install hwasan lib if depended on libc" am: 166349beeb am: f7879cbfbd
Change-Id: I8c0ae40db7543d96f1511ded42cbd6b23b141796
2020-05-21 01:22:50 +00:00
Jooyung Han 166349beeb Merge "apex: install hwasan lib if depended on libc" 2020-05-21 00:48:26 +00:00
Jooyung Han 11c2093ea3 apex: Make android_library support APEX variants
The android_library module type can be used within an android_app that
can itself be added to an apex but android_library does not call
android.InitApexModule(module) and so it does not support apex variants
and so is treated as if it cannot be part of an APEX even though it
actually is.

Now, android_library supports AEPX variants.

Due to this change, the whilelist for apex_available got bigger.

Bug: 156978407
Test: m
Merged-In: I3a21d653fe9c4159e3a89791fe1a8597865eeae6
Change-Id: I3a21d653fe9c4159e3a89791fe1a8597865eeae6
2020-05-20 21:49:30 +00:00
Liz Kammer 81faaaf65b Add test to ensure test data written for flat apex
Bug: 155820504
Test: apex_test
Change-Id: Id0db24ad139962523532e16934bd95bed06073a8
2020-05-20 09:57:08 -07:00
Nikita Ioffe 644009a221 Always set targetSdkLevel to DefaultAppTargetSdk
Test: m
Bug: 156914912
Merged-In: Ibe63352c2fc474dd816d87ac79b31a56d32b35d2
Change-Id: Ibe63352c2fc474dd816d87ac79b31a56d32b35d2
(cherry picked from commit 5f6771e160)
2020-05-20 13:57:05 +01:00
Nikita Ioffe 5d1c06c922 Merge "Always set targetSdkLevel to DefaultAppTargetSdk" into rvc-dev am: b029f03191
Change-Id: Id51826d589e55295b235dbb315e64e15ab52a4ca
2020-05-20 10:56:32 +00:00
Nikita Ioffe 5f6771e160 Always set targetSdkLevel to DefaultAppTargetSdk
Test: m
Bug: 156914912
Change-Id: Ibe63352c2fc474dd816d87ac79b31a56d32b35d2
2020-05-20 00:20:00 +01:00
Treehugger Robot 80c7d15e9c Merge "Correct apex data in androidmk for flattened apex" am: 28f34bf920 am: 8fae075645
Change-Id: I0614f6fe2c1e05c95f3aef5b8cdffb47cddb6bf3
2020-05-19 19:46:25 +00:00
Treehugger Robot 28f34bf920 Merge "Correct apex data in androidmk for flattened apex" 2020-05-19 19:18:53 +00:00
Liz Kammer 345e25783a Correct apex data in androidmk for flattened apex
Incorrectly used fmt.Println, printing to stdout instead of the desired
file.

Test: m com.android.art.testing
Bug: 155820504
Change-Id: I1aaf15de4f18f71710bc344bc8f71723e9756ad4
2020-05-19 07:38:59 -07:00
Ulyana Trafimovich b05a3e9940 Merge "Refactor test to use Go subtests idiom." am: 56b92cf177 am: 3102921784
Change-Id: I3c75e56449096035a58e16286e43ca14c3204b65
2020-05-19 14:01:09 +00:00
Ulyana Trafimovich 56b92cf177 Merge "Refactor test to use Go subtests idiom." 2020-05-19 13:28:59 +00:00
Ulya Trafimovich 7caef20553 Refactor test to use Go subtests idiom.
This way a failure in some subtests doesn't prevent other subtests
from running.

Test: m nothing
Change-Id: I6ec658505e26a00253d2c204f1614fcb15b8c2a2
2020-05-19 12:00:52 +01:00
TreeHugger Robot 53754e3592 Merge "Remove apex_available whitelist for the extservices APEX" into rvc-dev 2020-05-17 15:17:58 +00:00
Jiyong Park db4ce6e80a Remove apex_available whitelist for the extservices APEX
The marked library(ies) were available to the APEX via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.

Bug: 150999716
Test: m
Merged-In: I827d604c7e5a469a8b8a6d5a4b7917f2eaca48ca
Change-Id: I827d604c7e5a469a8b8a6d5a4b7917f2eaca48ca
2020-05-17 21:23:08 +09:00
Jiyong Park 7d95a510cc Reland "Prevent statically linking to a lib providing stable C APIs"
This reverts commit 5b75774004.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 151051671
Test: m
Merged-In: I05f0465976098941d47ecc06c978cfa116364d78
(cherry picked from commit af7ed39b06)
Change-Id: I05f0465976098941d47ecc06c978cfa116364d78
2020-05-17 20:47:27 +09:00
Paul Duffin c91aafb699 Merge "Replace javaLibrary with java.Dependency,android.Module" into rvc-dev 2020-05-16 07:24:18 +00:00
Jiyong Park af7ed39b06 Reland "Prevent statically linking to a lib providing stable C APIs"
This reverts commit 5b75774004.

Bug: 151051671
Test: m
Change-Id: I05f0465976098941d47ecc06c978cfa116364d78
2020-05-16 09:41:19 +09:00
Jaewoong Jung 8cf307e754 Add apex_set module.
apex_set takes an .apks file that contains a set of prebuilt apexes with
different configurations. It uses extract_apks to select and install the
best matching one for the current target.

Bug: 153456259
Test: apex_test.go
Test: com.android.media.apks
Change-Id: I1da8bbcf1611b7c580a0cb225856cbd7029cc0a7
Merged-In: I1da8bbcf1611b7c580a0cb225856cbd7029cc0a7
2020-05-16 00:37:36 +00:00
Jaewoong Jung 75b78df026 Merge "Add apex_set module." am: 805f2492e8 am: 23b4707ddc
Change-Id: I47e7a67ea8b2af27860531e67dd66c854b6bca70
2020-05-15 23:43:41 +00:00
Jaewoong Jung 805f2492e8 Merge "Add apex_set module." 2020-05-15 23:13:38 +00:00
Artur Satayev 849f844252 Generate combined deps-info for all updatable modules.
Introduce a singleton apex rule to merge contents of individual
deps-info results into a single output file.

Bug: 149622332
Test: m
Change-Id: I4ab7e1a3527fead97a81a5a2cb0e1e93a429117c
2020-05-15 19:10:19 +01:00
Jaewoong Jung fa00c06187 Add apex_set module.
apex_set takes an .apks file that contains a set of prebuilt apexes with
different configurations. It uses extract_apks to select and install the
best matching one for the current target.

Bug: 153456259
Test: apex_test.go
Test: com.android.media.apks
Change-Id: I1da8bbcf1611b7c580a0cb225856cbd7029cc0a7
2020-05-15 11:02:01 -07:00
Paul Duffin f299cbefcd Replace javaLibrary with java.Dependency,android.Module
Passes an additional android.Module parameter through to avoid having
to use javaLibrary interface.

Bug: 146586360
Test: m nothing
Merged-In: Ie533c16c753dc9c43171d0223953adea7b2b5ee6
Change-Id: Ie533c16c753dc9c43171d0223953adea7b2b5ee6
(cherry picked from commit 581bbbe8cb)
2020-05-15 17:07:02 +01:00
Treehugger Robot ced4ae1496 Merge "Remove apex_available whitelist for the extservices APEX" am: 8cf3e5471d am: 8b4193d5bb
Change-Id: I0fda78f456e5634bfb67342bbe9706e09a167d0f
2020-05-15 15:21:07 +00:00
Treehugger Robot 8cf3e5471d Merge "Remove apex_available whitelist for the extservices APEX" 2020-05-15 14:46:43 +00:00
Treehugger Robot c94b1728f1 Merge "Replace javaLibrary with java.Dependency,android.Module" am: 198c946c8a am: cf2a8b54a6
Change-Id: I505e846b647e2a29daeca376c1055e089c7c3001
2020-05-15 13:46:46 +00:00
Treehugger Robot 198c946c8a Merge "Replace javaLibrary with java.Dependency,android.Module" 2020-05-15 13:17:32 +00:00
Jooyung Han 8ce8db9ed6 apex: install hwasan lib if depended on libc
There're two ways to enable hwasan:
- global setting: TARGET_SANITIZE=hwaddress
- individual setting: sanitize: { hwaddress: true }

This change covers both cases by looking up if com.android.runtime is
hwaddress santized or not.

Bug: 156678661
Test: m (soong test added)
Change-Id: I67c382c3e76a06f4b27f221eebd153c698647227
2020-05-15 19:12:38 +09:00
Paul Duffin 581bbbe8cb Replace javaLibrary with java.Dependency,android.Module
Passes an additional android.Module parameter through to avoid having
to use javaLibrary interface.

Bug: 146586360
Test: m nothing
Change-Id: Ie533c16c753dc9c43171d0223953adea7b2b5ee6
2020-05-14 21:26:28 +01:00
Liz Kammer 8d501ef107 Merge "Add test data dependencies to APEX." am: 6109adaee0 am: 5b5cecd94e
Change-Id: I2589597f744dd62d0799f20d7de79dab4e8b07ae
2020-05-14 15:30:55 +00:00
Liz Kammer 6109adaee0 Merge "Add test data dependencies to APEX." 2020-05-14 15:06:49 +00:00
Jiyong Park a8c03921f2 Remove apex_available whitelist for the extservices APEX
The marked library(ies) were available to the APEX via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.

Bug: 150999716
Test: m
Change-Id: I827d604c7e5a469a8b8a6d5a4b7917f2eaca48ca
2020-05-14 21:39:55 +09:00
Treehugger Robot 5a5194a485 Merge "Remove reference to libz_current." am: 6a53c65ebd am: 02d3e4e600
Change-Id: I616b77a4f1fae6370b30cbdffdd6ac6bc8d94ee6
2020-05-14 04:47:28 +00:00
Elliott Hughes 9912ee2f02 Remove reference to libz_current.
This no longer exists.

Bug: https://issuetracker.google.com/155351357
Test: treehugger
Change-Id: Ie38c971759acb0141cba6341f95c67effadd93a6
2020-05-13 14:20:12 -07:00
Liz Kammer 1c14a21994 Add test data dependencies to APEX.
Test: soong go tests

Bug: 155820504
Change-Id: If96d82c27f19953e34efb31f2111f1643c0c4008
2020-05-13 10:17:30 -07:00
Yo Chiang adc834ae1b Merge "Register ALL_MODULES subvars with my_register_name" am: bcaea49d24 am: a182196375
Change-Id: I6aee735b3dbcd7dd2ba221e65baf6cd9a37bc1f9
2020-05-12 03:29:57 +00:00
Jiyong Park cabc299091 Merge "Revert "Prevent statically linking to a lib providing stable C APIs"" am: 18bbde1615 am: a3c8a7d511
Change-Id: I7942cf827040f1683ffda90e1483e383ab33057a
2020-05-08 08:43:53 +00:00
Yo Chiang ef2d489043 Register ALL_MODULES subvars with my_register_name
Replace ALL_MODULES.$(LOCAL_MODULE) with
ALL_MODULES.$(my_register_name).

Test: TH presubmit build pass
Change-Id: Ic1fb859ae458d1c67cc1d3699199ef36476088db
2020-05-08 16:17:09 +08:00
Jiyong Park 18bbde1615 Merge "Revert "Prevent statically linking to a lib providing stable C APIs"" 2020-05-08 08:11:24 +00:00
Jiyong Park 5b75774004 Revert "Prevent statically linking to a lib providing stable C APIs"
This reverts commit 45b90e79c9.

Reason for revert: breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=run_bluetooth_host_native_tests&lkgb=6474123&lkbb=6474183&fkbb=6474137

Bug: 156046846
Change-Id: I0df395eaa4cd856ab466925031b21aa4adc3af08
Test: m on full-eng
2020-05-08 07:55:47 +00:00
Jiyong Park e074cc3f52 Merge changes from topic "no_staticlinking_to_stubs" am: 06938a0a16 am: 36a0125014
Change-Id: I5c20e745bec1f57ba6bc2c1f08a7c942d98bcf75
2020-05-08 02:48:34 +00:00
Jiyong Park 18d4b2b708 Add GetPathString am: 1c7e962957 am: abf09b50e4
Change-Id: I079dd1d4394b494c225c054d46c5a5eb7fc4f113
2020-05-08 02:48:28 +00:00
Jiyong Park abf09b50e4 Add GetPathString am: 1c7e962957
Change-Id: Iada405f160d8178ec90a1634f22a50cb18215938
2020-05-08 02:35:11 +00:00
Jiyong Park 06938a0a16 Merge changes from topic "no_staticlinking_to_stubs"
* changes:
  Prevent statically linking to a lib providing stable C APIs
  Add GetPathString
2020-05-08 02:12:58 +00:00
Ivan Lozano 7c3358dd60 Merge "Add gcov coverage support to Rust modules." am: 6c4e5c05c3 am: acdf2ac701
Change-Id: Id236afb83e583a93020803302a61dbf46904c295
2020-05-07 18:41:29 +00:00
Ivan Lozano 6c4e5c05c3 Merge "Add gcov coverage support to Rust modules." 2020-05-07 17:56:43 +00:00
Jeongik Cha 9d902cef58 Merge "Remove networkstack-aidl-interfaces-unstable-java from the whitelist" 2020-05-07 10:59:05 +00:00
Paul Duffin eedf3f1f4a Move prebuilts mutators after defaults have been applied
A follow up change will add a mechanism for a module to register a hook
that is called after any defaults have been applied. That is intended
for use by modules like java_sdk_library that create child modules that
are dependent upon properties that could be supplied by defaults.

Creating those child modules after prebuilts mutators are run will
cause problems if those child modules clash with prebuilts modules.
Moving the prebuilts mutators after the defaults mutators will fix
that.

Tests are currently being run with the mutators in different orders so
this change also cleans that up so they are consistent with the actual
code that is being run.

Bug: 155295806
Test: m checkbuild
Merged-In: I825c6df09058fb3a45db196661959eb332aca2f3
Change-Id: I825c6df09058fb3a45db196661959eb332aca2f3
(cherry picked from commit c988c8e202)
2020-05-07 11:36:44 +01:00
Paul Duffin 509bb9b7ff Merge changes I13df3115,I825c6df0 am: 955ade6475 am: 4bfed659d9
Change-Id: I62fc47243b57a0423815f74cd94340f66b897e1d
2020-05-07 09:51:20 +00:00
Paul Duffin 955ade6475 Merge changes I13df3115,I825c6df0
* changes:
  Add hook to be called after defaults have been applied
  Move prebuilts mutators after defaults have been applied
2020-05-07 09:18:26 +00:00
Jiyong Park 45b90e79c9 Prevent statically linking to a lib providing stable C APIs
A lib providing stable C APIs should be available only to the APEX
containing the library. It shouldn't be available to other APEXes,
especially via static linking.

This change also fixes a bug that llndkImplDep (the dependency from
llndk stub to its implementation library) was recognized as being in the
same APEX.

Bug: 151051671
Test: m
Change-Id: Ifda7f4a367f68afcde93c86cda45a28cacd91f99
2020-05-07 16:20:00 +09:00
Jiyong Park 1c7e962957 Add GetPathString
The method is a thin wrapper around GetWalkPath and GetTagPath to make
it easy to construct a string representation of the current path.

It was originally inlined in the apex package. This change makes it a
function and moves it to the android package so make it more useful.

Bug: N/A
Test: m
Change-Id: I7e2bc2074baed759d67d9097151c9ac10e34ed31
2020-05-07 16:12:13 +09:00
Yo Chiang c746c894b3 Merge "APEX should require base module of stub libraries" am: 6345dfde49 am: f8ae216e9c
Change-Id: Id5c8cb5aa416a3e0cf927067fd2bc2fbf6639128
2020-05-07 06:46:05 +00:00
TreeHugger Robot 67eb8ba040 Merge "Remove networkstack-aidl-interfaces-unstable-java from the whitelist" into rvc-dev am: c40859ae12
Change-Id: Ib0b0b010c4532fc9c5dbcd8c627e54a4ecccbaf4
2020-05-07 06:00:22 +00:00
TreeHugger Robot c40859ae12 Merge "Remove networkstack-aidl-interfaces-unstable-java from the whitelist" into rvc-dev 2020-05-07 05:43:24 +00:00
Artur Satayev 388d39ba9a Introduce min_sdk_version to deps info.
Bug: 149622332
Test: m
Change-Id: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
Merged-In: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit 480e25b74f)
2020-05-06 15:01:14 +00:00
Yo Chiang 29555d5f33 APEX should require base module of stub libraries
Bug: 155841765
Bug: 7456955
Test: m nothing and check the content of out/soong/Android-*.mk
Change-Id: I1f109c27a5e9bcfeb3a887b2e8d6a2cf983aa730
2020-05-06 09:18:01 +00:00
Paul Duffin c988c8e202 Move prebuilts mutators after defaults have been applied
A follow up change will add a mechanism for a module to register a hook
that is called after any defaults have been applied. That is intended
for use by modules like java_sdk_library that create child modules that
are dependent upon properties that could be supplied by defaults.

Creating those child modules after prebuilts mutators are run will
cause problems if those child modules clash with prebuilts modules.
Moving the prebuilts mutators after the defaults mutators will fix
that.

Tests are currently being run with the mutators in different orders so
this change also cleans that up so they are consistent with the actual
code that is being run.

Bug: 155295806
Test: m checkbuild
Change-Id: I825c6df09058fb3a45db196661959eb332aca2f3
2020-05-06 08:55:16 +01:00
Jeongik Cha 255a570e6d Remove networkstack-aidl-interfaces-unstable-java from the whitelist
networkstack-aidl-interfaces-*java has explicit apex_available now.
Accordingly, remove it from the whitelist

Bug: 133526962
Test: m nothing
Change-Id: If5427afb2470a7dffbd418e1c405af508577ad93
2020-05-06 05:20:13 +00:00
Artur Satayev 5e7c32d6cb Introduce flat deps info list.
Compared to full list, flat list drops dependency edges and simply
lists all transitive dependencies for a top-level apex bundle.

Bug: 149622332
Test: m, manually build flatlist
Change-Id: Ibd521c96b7aeab90b95965c1b524e0a0152aaf5a
Merged-In: Ibd521c96b7aeab90b95965c1b524e0a0152aaf5a
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit a8bd113a69)
2020-05-05 17:28:41 +00:00
Artur Satayev 334b51730a Export depsInfo into android package.
Move depsInfo into android for easier sharing with APK code.

Bug: 149622332
Test: m, diff'ing outputs for conscrypt module.
Change-Id: If0ee967d37425540e69b4ce9304229d9f2cd86bd
Merged-In: If0ee967d37425540e69b4ce9304229d9f2cd86bd
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit 872a144dca)
2020-05-05 16:19:07 +00:00
Ivan Lozano a0cd8f9acb Add gcov coverage support to Rust modules.
This adds gcov coverage support for Rust device library and binary
modules (including test modules). Support is provided to pass Rust
static library gcno files to CC modules and visa versa.

Additional changes:
 * Begin mutator added for Rust modules.
 * SuffixInList added to android package.
 * CoverageEnabled added to Coverage interface.
 * CoverageFiles added to LinkableLibrary interface.
 * Fix in coverage mutator for non-CC modules which marked the wrong
   variant as the coverage variant.
 * Added coverage libraries to the cc.GatherRequiredDepsForTest.

Bug: 146448203
Test: NATIVE_COVERAGE=true COVERAGE_PATHS='*' m -j <rust_module>
Change-Id: If20728bdde42a1dd544a35a40f0d981b80a5835f
2020-05-05 10:30:15 -04:00
satayev 49ad72d4ef Merge changes Ie6568cb8,Ibd521c96 am: 292e7c0721 am: a07f9df5d7
Change-Id: I4dcd1f47b080a71a97db0b10c1ebfc45b8d59bdb
2020-05-05 13:14:14 +00:00
satayev d82f528fa3 Merge "Export depsInfo into android package." am: 57769e469b am: ed11483aa6
Change-Id: I103c2e1f0eada4b1cd516cc1a24625d680627824
2020-05-05 10:30:28 +00:00
Artur Satayev 480e25b74f Introduce min_sdk_version to deps info.
Bug: 149622332
Test: m
Change-Id: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
2020-05-04 19:44:28 +01:00
Artur Satayev a8bd113a69 Introduce flat deps info list.
Compared to full list, flat list drops dependency edges and simply
lists all transitive dependencies for a top-level apex bundle.

Bug: 149622332
Test: m, manually build flatlist

Change-Id: Ibd521c96b7aeab90b95965c1b524e0a0152aaf5a
2020-05-04 18:01:11 +01:00
Artur Satayev 872a144dca Export depsInfo into android package.
Move depsInfo into android for easier sharing with APK code.

Bug: 149622332
Test: m, diff'ing outputs for conscrypt module.
Change-Id: If0ee967d37425540e69b4ce9304229d9f2cd86bd
2020-05-04 18:01:09 +01:00
Artur Satayev 2eedf623ff Ensure APEX's Java deps use stable SDKs.
Test: m
Bug: 153333044
Change-Id: Ib1acf3073e96fe23c92d292ec0b1a91e2cd408db
Merged-In: Ib1acf3073e96fe23c92d292ec0b1a91e2cd408db
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit 8cf899afcc)
2020-05-04 16:51:59 +00:00
satayev 7c54f0358c Merge "Ensure APEX's Java deps use stable SDKs." am: 9d6ea77c52 am: 858239ce20
Change-Id: Icf58cab4392926b11836447d24161ef224e3ac09
2020-05-04 16:31:30 +00:00
satayev 9d6ea77c52 Merge "Ensure APEX's Java deps use stable SDKs." 2020-05-04 16:03:44 +00:00
Ulyana Trafimovich f1e207c738 Merge "Use two-column format for PRODUCT_BOOT_JARS components." am: 2aa8e0be11 am: 728f0c5dae
Change-Id: I0ac57804b7c9f3bc5a4f3433e7e2e6d7011cc935
2020-05-04 09:08:11 +00:00
Jiyong Park 63a3883802 Dependencies of tests are also included in APEX am: af9539fd14 am: 7e191d264a
Change-Id: Id6647ba0c1531e0605e5cedf921d3b01908d1ff5
2020-05-04 09:02:03 +00:00
Ulyana Trafimovich 2aa8e0be11 Merge "Use two-column format for PRODUCT_BOOT_JARS components." 2020-05-04 08:57:47 +00:00
Jeongik Cha 5bc011b479 Remove networkstack-aidl-interfaces-unstable-java from the whitelist
networkstack-aidl-interfaces-*java has explicit apex_available now.
Accordingly, remove it from the whitelist

Bug: 133526962
Test: m nothing
Change-Id: If5427afb2470a7dffbd418e1c405af508577ad93
Merged-In: If5427afb2470a7dffbd418e1c405af508577ad93
2020-05-04 08:32:41 +00:00
Jiyong Park af9539fd14 Dependencies of tests are also included in APEX
Shared lib dependencies of a test is included in the APEX regardless of
whether the test has test_per_srcs or not.

Bug: N/A
Test: m (apex_test.go amended)
Change-Id: I6b16843cc7467c42e250aba88d79d5580ba47324
2020-05-04 10:31:32 +09:00
Colin Cross 2a5fb91370 Merge changes from topic "sdk_version_variant" into rvc-dev
* changes:
  Add sdk mutator for native modules
  Require apps built against the SDK to use JNI built against the NDK
2020-05-02 01:41:18 +00:00
Nicolas Geoffray b8bb5d05ce Merge "Fix dex2oat symlink now that we generate dex2oat32/dex2oat64." 2020-05-01 13:49:51 +00:00
Nicolas Geoffray 0ed5ce26a5 Fix dex2oat symlink now that we generate dex2oat32/dex2oat64. am: 101a7622fe
Change-Id: I7e6e14bef3a46edfddf521a63af0c7280d31073a
2020-05-01 10:15:29 +00:00
Nicolas Geoffray d2a61c8752 Fix dex2oat symlink now that we generate dex2oat32/dex2oat64.
Test: m
Bug: 155257660
Change-Id: I466feabc64c0fb77fcf652be81bc0c4944b84ac0
Merged-In: I466feabc64c0fb77fcf652be81bc0c4944b84ac0
(cherry picked from commit 101a7622fe)
2020-05-01 11:04:59 +01:00
Ulya Trafimovich 50c4a4b19f Use two-column format for PRODUCT_BOOT_JARS components.
The first component is the apex name, or a special name "platform"
if the boot jar is a platform jar rather than a part of some apex.
This is a prerequisite change for moving core-icu4j to a separate
com.android.i18n apex.

Old one-column format is still supported, but all unqualified
components of PRODUCT_BOOT_JARS get "platform:" prepended to them
after reading the product makefiles.

Test: aosp_walleye-userdebug boots
Bug: 138994281
Change-Id: Ic229159fdcdaf6182210a53b63850a389dd786fc
2020-04-30 14:42:32 +01:00
Nicolas Geoffray 101a7622fe Fix dex2oat symlink now that we generate dex2oat32/dex2oat64.
Test: m
Bug: 155257660
Change-Id: I466feabc64c0fb77fcf652be81bc0c4944b84ac0
2020-04-29 12:00:41 +01:00
Treehugger Robot a65a304368 Merge "runtime_resource_overlay can be included in APEXes" am: c869812b04 am: 765dbb0b83
Change-Id: Ia5f4e186891206912ae5cac5a7b29896a57ce1c6
2020-04-28 17:51:21 +00:00
Treehugger Robot c869812b04 Merge "runtime_resource_overlay can be included in APEXes" 2020-04-28 17:13:26 +00:00
Jiyong Park 23ba7cc000 Merge "Add test_for property" into rvc-dev 2020-04-28 14:27:07 +00:00
Jiyong Park 69aeba9982 runtime_resource_overlay can be included in APEXes
runtime_resource_overlay is put to an APEX via 'apps' property. It is
placed under ./overlay directory in it.

Bug: 154822536
Test: m
Change-Id: I8edf4a26c26368c52fb7b327b2ecc829f21ea148
2020-04-28 22:55:54 +09:00
Jiyong Park f0d01b7c98 Add test_for property
This change adds 'test_for' property to cc_test_* types. The property is
used to mark a module as a test for one or more APEXes, in which case
the module has accecss to the private part of the listed APEXes. For
example, the module is linked with the actrual shared library in the
APEX instead of the stub of the shared library.

Exempt-From-Owner-Approval: cherry-pick from AOSP

Bug: 129539670
Bug: 153046163
Test: m
Merged-In: I45ed0d7a15540b0d69b2a3b8d9c4cb202adff6f2
(cherry picked from commit 62304bbeec)
Change-Id: I45ed0d7a15540b0d69b2a3b8d9c4cb202adff6f2
2020-04-28 21:35:40 +09:00
Jiyong Park 5088a2cbd5 Set apex_available property
The marked library(ies) were available to the APEXes via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.

Exempt-From-Owner-Approval: cherry-pick from AOSP

Bug: 150999716
Test: m
Merged-In: I11a4e877ee27f7c55e2f00371c6fa58daedb1a9f
(cherry picked from commit 601d31c234)
Change-Id: I11a4e877ee27f7c55e2f00371c6fa58daedb1a9f
2020-04-28 21:08:58 +09:00
Dario Freni ccd4f112b1 Merge "Allow building unsigned APEXs payload for testing." into rvc-dev am: 73b6c98e10
Change-Id: Ie46b70b3125b430f4586fb67ec0868acc7066dfc
2020-04-28 07:33:35 +00:00
Dario Freni 73b6c98e10 Merge "Allow building unsigned APEXs payload for testing." into rvc-dev 2020-04-28 07:13:07 +00:00
Jooyung Han 7e00c13d0e Merge "apex: file_contexts for override_apex flattened" into rvc-dev am: d5c7ad63ec
Change-Id: I75cd5ce07f79f1ea4cee8791ed8cf3c9ddd22c0d
2020-04-28 03:19:19 +00:00
Jooyung Han d5c7ad63ec Merge "apex: file_contexts for override_apex flattened" into rvc-dev 2020-04-28 03:03:26 +00:00
Jiyong Park 28cb10ea68 Merge "mark platform un-availability" into rvc-dev 2020-04-28 02:29:55 +00:00
Jiyong Park 6a9ddc37a9 mark platform un-availability
A module is marked unavailable for platform when 1) it does not have
"//apex_available:platform" in its apex_available property, or 2)
it depends on another module that is unavailable for platform.

In that case, LOCAL_NOT_AVAILABLE_FOR_PLATFORM is set to true for the
module in the Make world. Later, that flag is used to ensure that there
is no module with the flag is installed to the device.

The reason why this isn't entirely done in Soong is because Soong
doesn't know if a module will be installed to the device or not. To
explain this, let's have an example.

cc_test { name: "mytest", static_libs: ["libfoo"]}
cc_library_static { name: "libfoo", static_libs: ["libbar"]}
cc_library { name: "libbar", apex_available: ["com.android.xxx"]}

Here, libbar is not available for platform, but is used by libfoo which
is available for platform (apex_available defaults to
"//apex_available:platform"). libfoo is again depended on by mytest
which again is available for platform. The use of libbar should be
allowed in the context of test; we don't want to make libbar available
to platform just for the dependency from test because it will allow
non-test uses of the library as well.

Soong by itself can't tell whether libfoo and libbar are used only in the
context of a test. There could be another module depending them, e.g.,

cc_library_shared { name: "mylib", static_libs: ["libfoo"] }

can exist and it might be installed to the device, in which case
we really should trigger an error.

Since Make has the knowledge of what's installed and what's not,
the check should be done there.

Exempt-From-Owner-Approval: cherry-pick from AOSP

Bug: 153073816
Test: m
Test: remove "//apex_available:platform" from libmdnssd (it is currently
installed to /system/lib), and check that `m system_image` fails

Merged-In: Ia304cc5f41f173229e8a154e90cea4dce46dcebe
(cherry picked from commit 89e850ab84)
Change-Id: Ia304cc5f41f173229e8a154e90cea4dce46dcebe
2020-04-28 09:27:24 +09:00
TreeHugger Robot ba505df1c4 Merge "Remove libopus from apex_available whitelist" into rvc-dev 2020-04-27 23:54:39 +00:00
Colin Cross 01fd7ccbc7 Add sdk mutator for native modules
Compiling native modules against the NDK disables platform features
like ASAN.  For anything shipped on the system image there is no
reason to compile against the NDK.  Add a new mutator to Soong that
creates a platform and an SDK variant for modules that set
sdk_version, and ignore sdk_version for the platform variant.  The
SDK variant will be used for embedding in APKs that may be installed
on older platforms.  Apexes use their own variants that enforce
backwards compatibility.

Test: sdk_test.go
Test: TestJNIPackaging
Bug: 149591340
Change-Id: I7d72934aaee2e1326cc0ba5f29f51f14feec4521
Merged-In: I7d72934aaee2e1326cc0ba5f29f51f14feec4521
(cherry picked from commit 82e192c3ae)
2020-04-27 14:45:05 -07:00
Colin Cross 1c93c299fb Require apps built against the SDK to use JNI built against the NDK
Apps that expect to run on older platforms should use JNI libraries
that will also run on older platforms.  Require that apps that set
sdk_version have jni_libs modules that also set sdk_version, or
set jni_uses_platform_apis: true to bypass the check.

Fixes: 149591057
Test: app_test.go
Change-Id: I76b9b45fb5773bc4dfc10520108f4f3578723909
Merged-In: I76b9b45fb5773bc4dfc10520108f4f3578723909
2020-04-27 14:45:05 -07:00
Dario Freni ca9133907f Allow building unsigned APEXs payload for testing.
Bug: 148447155
Test: built a testing apex with unsigned payload.
Merged-In: I95aa3f11ff1adc1421fcd7ed5a356ee531a0a818
Change-Id: I95aa3f11ff1adc1421fcd7ed5a356ee531a0a818
(cherry picked from commit 98410fd9d6)
2020-04-27 21:02:18 +01:00
Dario Freni 98410fd9d6 Allow building unsigned APEXs payload for testing.
Bug: 148447155
Test: built a testing apex with unsigned payload.
Change-Id: I95aa3f11ff1adc1421fcd7ed5a356ee531a0a818
2020-04-27 20:52:09 +01:00
Artur Satayev 8cf899afcc Ensure APEX's Java deps use stable SDKs.
Test: m
Bug: 153333044
Change-Id: Ib1acf3073e96fe23c92d292ec0b1a91e2cd408db
2020-04-27 19:16:40 +01:00
Jooyung Han 6bfc04369b apex: file_contexts for override_apex flattened
Make-var APEX_FILE_CONTEXTS_INFOS should contain entries for
override_apex modules. Otherwise flattened override_apex modules can't
be correctly labeled.

Bug: 154031888
Test: lunch gsi_gms_arm64-userdebug
      m file_contexts.bin
      check ../file_contexts.bin_intermediates/file_contexts.concat.tmp
      if it contains entries for override_apex
Change-Id: I60fc3da1def0f5fe14cfeef32a4c2a07a65b056e
2020-04-27 22:18:19 +09:00
Treehugger Robot 8ffac4e19d Merge "mark platform un-availability" am: 01db260858 am: 547c6087df
Change-Id: Ida786db81d3bd1db40cfc28b6f3a013425781345
2020-04-27 13:03:05 +00:00
Treehugger Robot 01db260858 Merge "mark platform un-availability" 2020-04-27 12:37:45 +00:00
Jooyung Han ced674e0e2 enforce updatable apexes to set min_sdk_version
updatable APEXes should set min_sdk_version as well.

Bug: 152655956
Test: m
Merged-In: I8192086eb89fa958dd8ff1b731e43e24bf217ce2
Change-Id: I8192086eb89fa958dd8ff1b731e43e24bf217ce2
(cherry picked from commit 548640b55f)
2020-04-27 19:44:06 +09:00