Commit Graph

22710 Commits

Author SHA1 Message Date
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
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 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 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
Paul Duffin 5ab6b778e6 [automerger skipped] Merge "java_sdk_library: Create separate impl library" into rvc-dev am: f675264e3c -s ours
am skip reason: Change-Id Ifc4799feb4ada9dec8021efc13fe6a953bf2edd3 with SHA-1 5df793011d is in history

Change-Id: Ib4ceb4c23c86fc54f042420641f5a3d5165f0329
2020-05-28 01:53:54 +00:00
Paul Duffin f675264e3c Merge "java_sdk_library: Create separate impl library" into rvc-dev 2020-05-28 01:38:09 +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
Treehugger Robot 7507db0832 Merge "Explain checkLinker errors a bit more." am: bd371b6533 am: 21f6c3b54e
Change-Id: I109d5d40019d68448a3bc9e95b0c2610f79df411
2020-05-27 23:55:04 +00:00
Ramy Medhat 53af664bc5 Merge "Add support for Metalava implicit dependencies for remote execution." am: f1665501e8 am: 230dbb7e09
Change-Id: Ida1b0097baf7ee35348ab17e96c6f1751fa95745
2020-05-27 23:54:42 +00:00
Treehugger Robot 21f6c3b54e Merge "Explain checkLinker errors a bit more." am: bd371b6533
Change-Id: I4a91ca0234afc510c84f5da1b871731c1208af92
2020-05-27 23:39:03 +00:00
Ramy Medhat 230dbb7e09 Merge "Add support for Metalava implicit dependencies for remote execution." am: f1665501e8
Change-Id: Icc535e09ca901111deded6680bf715153bd4a827
2020-05-27 23:38:46 +00:00
Treehugger Robot bd371b6533 Merge "Explain checkLinker errors a bit more." 2020-05-27 23:30:56 +00:00
Jaewoong Jung b728e22e68 [automerger skipped] Make android_app_import multi targets arch module. am: 0feed89b7c -s ours
am skip reason: Change-Id I1575d9ef3f8596f1eb8db0867db09de08945d711 with SHA-1 6abfbf7f9c is in history

Change-Id: I71c9c0e02d1b274f49a23d41454a53afb69e3c1c
2020-05-27 23:26:13 +00:00