Commit Graph

22721 Commits

Author SHA1 Message Date
TreeHugger Robot
e3a5ad660d Merge "Collect permitted packages from java_sdk_library instances" into rvc-dev am: 5cfbb4332f
Change-Id: I3d5a7d6de21cfc988f146caef84ae1b8b1fd2a33
2020-05-29 13:32:49 +00:00
TreeHugger Robot
5cfbb4332f Merge "Collect permitted packages from java_sdk_library instances" into rvc-dev 2020-05-29 13:18:05 +00:00
TreeHugger Robot
7bda45c615 Merge "Ensure package check is run for java_library in APEX" into rvc-dev am: 484129dfb9
Change-Id: I7a4efa288fb419a8a04c01c6b3c64b5a172dd255
2020-05-29 11:54:58 +00:00
TreeHugger Robot
484129dfb9 Merge "Ensure package check is run for java_library in APEX" into rvc-dev 2020-05-29 11:40:19 +00:00
Paul Duffin
a105cf99d0 Collect permitted packages from java_sdk_library instances
Switching an updatable boot jar from java_library to java_sdk_library
changed the contents of the updatable-bcp-packages.txt due to the code
requiring the module to be *Library. This change updates that to allow
it to be any module that implements the
PermittedPackagesForUpdatableBootJars interface which is *Library and
anything that embeds that like *SdkLibrary.

Bug: 155164730
Test: m droid and check the contents of system/etc/updatable-bcp-packages.txt
Change-Id: I464af74628da311734f102f77ec8158daec5b32d
2020-05-29 12:35:18 +01:00
Orion Hodson
6c27abd294 Merge "Add some app modules to the allowed whitelist." into rvc-dev-plus-aosp 2020-05-29 11:16:40 +00:00
Dan Albert
555760552b Add some app modules to the allowed whitelist.
Test: treehugger
Bug: 152482542
Change-Id: Ia7adf690cd6dca1408ae0a340860eaeae6c1d4b4
Merged-In: Ia7adf690cd6dca1408ae0a340860eaeae6c1d4b4
(cherry picked from commit 6b6d387a75)
Exempt-From-Owner-Approval: already +2'ed by owner
2020-05-29 11:08:38 +00:00
Jooyung Han
0441ceb569 Merge changes from topic "apk-jni-enforce" into rvc-dev am: de58c39bd6
Change-Id: Ib163e2407527c33c773179f1109b705c4f5202e5
2020-05-29 10:48:21 +00:00
Jooyung Han
5bac03f31c [automerger skipped] Reland "enforce sdk_version for JNI libs for updatable APKs" am: af7f91fc9d -s ours
am skip reason: Change-Id I08543ccee7dfda0559a1fca108ceb5c28f84943f with SHA-1 bbc3fb780b is in history

Change-Id: I38070a6373b75de80f7079d6d095469d795bc5b5
2020-05-29 10:48:18 +00:00
Jooyung Han
de58c39bd6 Merge changes from topic "apk-jni-enforce" into rvc-dev
* changes:
  Use sdkSpec to compare sdk_versions of APK/JNI
  Reland "enforce sdk_version for JNI libs for updatable APKs"
2020-05-29 10:33:59 +00:00
Paul Duffin
fa5b73bcb6 java_sdk_library: Propagate shared_library to snapshot am: a84756c827
Change-Id: Ibb843f87f8c3a93743fac6c6658f8fca7be44a56
2020-05-29 10:16:46 +00:00
Jiyong Park
d023ce9a28 [automerger skipped] Add default_to_stubs option to java_sdk_library am: 27fc414b84 -s ours
am skip reason: Change-Id Id2acc3cafb71d1e90d4fdc9c0c70a73983355e0f with SHA-1 932cdfeb06 is in history

Change-Id: Ic5e4bb98acde0b972f0700d80e54400f4e6f8c00
2020-05-29 09:51:12 +00:00
Paul Duffin
c552427032 Ensure package check is run for java_library in APEX
Package checks were not being run for java libraries that were in an
APEX and not on the platform. This change fixes that and updates the
script to report all failing classes to make it easier to update the
list of packages.

Test: m java
Bug: 157633658
Change-Id: I28044e08d3a40e9f3464bb2158ef6a28d57264d1
(cherry picked from commit 63d8febd35)
2020-05-29 09:18:13 +01:00
Paul Duffin
a84756c827 java_sdk_library: Propagate shared_library to snapshot
Passes the shared_library property through to the snapshot. It does not
optimize away the default value in order to make it easier to invert
the default value in future. The current default value was only chosen
for convenience because most existing usages were already treated as
shared libraries. It would be safer if modules had to opt in to be used
as shared libraries.

Bug: 155164730
Test: m nothing
Merged-In: I33c7323f2389b44ed49cebe517ae2cce349117f1
Change-Id: I33c7323f2389b44ed49cebe517ae2cce349117f1
(cherry picked from commit d7eb1c2a76)
2020-05-29 09:16:11 +01:00
Jiyong Park
27fc414b84 Add default_to_stubs option to java_sdk_library
Previously, when a lib that doesn't have sdk_version property set
depends on a java_sdk_library, the impl library was used for linking.
This might be too permissive because the client lib might be using empty
sdk_version because it needed some private APIs from the platform, but
not from the java_sdk_library. This actually happend for some of the CTS
tests. They don't set sdk_version, but were directly depending on
android.test.[base|runner|mock].stubs libraries. If we switch the
references to the stub libraries into the corresponding java_sdk_library
modules (e.g. aandroid.test.[base|runner|mock]), then we would be
allowing private APIs to the CTS tests, which is not good.

To solve this problem, default_to_stub property is introduced. It when set
to true prevents the impl lib from being used for linking. When a module
that doesn't have sdk_version depends on it, the widest API surface that
the java_sdk_library provides is linked instead.

Bug: 157007292
Test: m
Merged-In: Id2acc3cafb71d1e90d4fdc9c0c70a73983355e0f
Change-Id: Id2acc3cafb71d1e90d4fdc9c0c70a73983355e0f
(cherry picked from commit 932cdfeb06)
2020-05-29 09:15:09 +01:00
Jiyong Park
cf464be35d [automerger skipped] apex respects stem of java_library modules am: ed50ca8dd8 -s ours
am skip reason: Change-Id Iaf5023020b5440f1ffd4f5414b5a7864655fc22a with SHA-1 a62aa23990 is in history

Change-Id: I8e8a57f564f7fde2e229680af5c27de7a5041d3b
2020-05-29 07:24:48 +00: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
3013ea064f Merge "apex respects stem of java_library modules" am: 00f5701ade
Change-Id: I6b6ebf0dbfe5c0ff6a63339bc1c8180b1aa89fcd
2020-05-29 00:56:45 +00:00
Treehugger Robot
00f5701ade Merge "apex respects stem of java_library modules" 2020-05-29 00:45:03 +00:00
Jooyung Han
9d2c0f7af2 Use sdkSpec to compare sdk_versions of APK/JNI
"current" is converted to int differently if we use
sdkSpec.effectiveVersion for APK and android.ApiStrToNum for JNI.
For example, in REL branch, "current" is equiv to PlatformSdkVersion
for APK, but 10000(FutureApiVersion) for JNI.

Use sdkSpec.effectiveVersion to compare APK.min_sdk_version and
JNI.sdk_version.

Bug: 145796956
Test: m
Change-Id: I2c4dbb79ae8712004dc3a9e647aa53cd5de7b508
2020-05-28 23:08:04 +00:00
Jooyung Han
af7f91fc9d Reland "enforce sdk_version for JNI libs for updatable APKs"
JNI libs for "updatable" APKs or APKs in "updatable" APEXes should set
sdk_version which is equal to or less than APK's min_sdk_version.

In fact, we'd better check if min_sdk_version of JNI libs matches(or is
earlier than) min_sdk_version of the APK. But for now the build system
can't handle sdk_version/min_sdk_version correctly for JNI libs. That's
why sdk_version of JNI libs is enforced to match with min_sdk_version
of APK in this change.

(original commit: 98c4750f39)

Bug: 145796956
Test: m
Merged-In: I08543ccee7dfda0559a1fca108ceb5c28f84943f
Change-Id: I08543ccee7dfda0559a1fca108ceb5c28f84943f
(cherry picked from commit bbc3fb780b)
2020-05-28 23:06:52 +00:00
Martin Stjernholm
b9243e921f Merge "Fall back to the source module for variants that the corresponding prebuilt doesn't define." am: 1b2bae1ba5 am: 45f0028d13
Change-Id: Iccd954c014135ecd1a6e38f44cc5d943b39992fb
2020-05-28 20:43:49 +00:00
Martin Stjernholm
45f0028d13 Merge "Fall back to the source module for variants that the corresponding prebuilt doesn't define." am: 1b2bae1ba5
Change-Id: Ia11705c1d6f28bb85e014f56765aea1d6c7ce326
2020-05-28 20:25:05 +00:00
Martin Stjernholm
1b2bae1ba5 Merge "Fall back to the source module for variants that the corresponding prebuilt doesn't define." 2020-05-28 20:09:44 +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
f52d6420ea Merge "Add support for remote-execution / caching of signapk actions" am: 8f37ec82d9
Change-Id: I35bc6a092e26924e8ef8b5e5c04da313bbca9146
2020-05-28 18:51:39 +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
aa5f42c3c4 Merge "Only include test data in flattened apex 1 time" am: 25aeb7d19b
Change-Id: I499773bc30f71891e73851aa9331abde6e05fb45
2020-05-28 17:18:24 +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
Martin Stjernholm
009a9dc4ac Fall back to the source module for variants that the corresponding
prebuilt doesn't define.

Test: m
Test: "m" on a platform tree with prebuilts/runtime in the manifest
Bug: 151303681
Change-Id: I8e10579c5daa79e82009a0c3060cde76cdf520e9
2020-05-28 13:17:21 +01:00
Treehugger Robot
f3f7a2bd89 Merge "Add default_to_stubs option to java_sdk_library" am: f455d1fb0a am: 03d606be88
Change-Id: I9202dcaa0bd9116eef73726473a1cf854a93fe57
2020-05-28 11:41:44 +00:00
Treehugger Robot
03d606be88 Merge "Add default_to_stubs option to java_sdk_library" am: f455d1fb0a
Change-Id: Ie143f088fef37d3a29e230fde1de56f2e847b0f0
2020-05-28 11:29:14 +00:00
Treehugger Robot
f455d1fb0a Merge "Add default_to_stubs option to java_sdk_library" 2020-05-28 11:09:31 +00:00
Anton Hansson
757025d5de Merge "java_sdk_library: Add annotations_enabled property" into rvc-dev am: 9e0264c379
Change-Id: I065a596d19cc46345281960549adb4f435a33d9c
2020-05-28 10:31:30 +00:00
Anton Hansson
9e0264c379 Merge "java_sdk_library: Add annotations_enabled property" into rvc-dev 2020-05-28 10:15:23 +00:00
Jooyung Han
5d56626be2 Merge "pom2bp: add apex_available/min_sdk_version" am: 9a37d4a602 am: 92e904f5e7
Change-Id: Ic1b44e24f17ae4db92af13b0d1f21918ce4b61f4
2020-05-28 09:42:33 +00:00
Jooyung Han
92e904f5e7 Merge "pom2bp: add apex_available/min_sdk_version" am: 9a37d4a602
Change-Id: I7813865c7bfa067dbdcaecaa7bb3ba4e6ca4dbc2
2020-05-28 09:23:26 +00:00
Jooyung Han
9a37d4a602 Merge "pom2bp: add apex_available/min_sdk_version" 2020-05-28 09:09:59 +00:00
Jiyong Park
932cdfeb06 Add default_to_stubs option to java_sdk_library
Previously, when a lib that doesn't have sdk_version property set
depends on a java_sdk_library, the impl library was used for linking.
This might be too permissive because the client lib might be using empty
sdk_version because it needed some private APIs from the platform, but
not from the java_sdk_library. This actually happend for some of the CTS
tests. They don't set sdk_version, but were directly depending on
android.test.[base|runner|mock].stubs libraries. If we switch the
references to the stub libraries into the corresponding java_sdk_library
modules (e.g. aandroid.test.[base|runner|mock]), then we would be
allowing private APIs to the CTS tests, which is not good.

To solve this problem, default_to_stub property is introduced. It when set
to true prevents the impl lib from being used for linking. When a module
that doesn't have sdk_version depends on it, the widest API surface that
the java_sdk_library provides is linked instead.

Bug: 157007292
Test: m
Change-Id: Id2acc3cafb71d1e90d4fdc9c0c70a73983355e0f
2020-05-28 18:07:06 +09:00
Anton Hansson
7be6199af1 Merge "Correct link type for module stubs" into rvc-dev am: 1733d6acf8
Change-Id: Ia5df51ecc76e9490aa94937ff8ba8eb92470dc5e
2020-05-28 09:01:27 +00:00
Anton Hansson
1733d6acf8 Merge "Correct link type for module stubs" into rvc-dev 2020-05-28 08:49:30 +00:00
Jiyong Park
9f5458994e [automerger skipped] Remove apex_available whitelist for the ART APEX am: b51e7ea3b8 am: afac912800 -s ours
am skip reason: Change-Id I2b792657b444f0c963e1e92b7c91f6a0cfe1688c with SHA-1 be6e2b6a18 is in history

Change-Id: I951f874f1a8cc3219d8002cccdcf6bb6928df13d
2020-05-28 06:45:04 +00:00
TreeHugger Robot
3825ca69da [automerger skipped] Merge "Add test_mainline_modules to the auto-gen test config(AndroidJUnitTest only)." into rvc-dev am: b676ead4e1 -s ours
am skip reason: Change-Id I41ba8749ce46da62db402a8b8a555d4874e1cfc0 with SHA-1 5bcff5d1fd is in history

Change-Id: I23aac77d1b3c05e88f1a326d2e73767ff3c817f0
2020-05-28 06:27:19 +00:00
Jiyong Park
afac912800 Remove apex_available whitelist for the ART APEX am: b51e7ea3b8
Change-Id: I705d3d8e036f008ab0d74c776299b96f7a90ba9e
2020-05-28 06:26:55 +00:00
TreeHugger Robot
b676ead4e1 Merge "Add test_mainline_modules to the auto-gen test config(AndroidJUnitTest only)." into rvc-dev 2020-05-28 06:12:35 +00: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