Commit Graph

22686 Commits

Author SHA1 Message Date
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
Ramy Medhat
f1665501e8 Merge "Add support for Metalava implicit dependencies for remote execution." 2020-05-27 23:23:25 +00:00
Liz Kammer
13f3d4572e [automerger skipped] Add signing lineage for runtime_resource_overlay am: 966b2f02fb am: c6e90cc10a -s ours
am skip reason: Change-Id I68286bc0caa9daad6ef74db39f7750924f1d93dd with SHA-1 7fe241f623 is in history

Change-Id: Ia34450d2a58647cbd8e1a63f3ea035e10d6e4ec5
2020-05-27 22:46:46 +00:00
Liz Kammer
c6e90cc10a Add signing lineage for runtime_resource_overlay am: 966b2f02fb
Change-Id: I0fd0be9b3181e7fa7c826a33a1d730ec30bd1b21
2020-05-27 22:30:41 +00:00
Jaewoong Jung
0feed89b7c Make android_app_import multi targets arch module.
I made a mistake and only fixed android_test_import in my previous
change, I5bbb2d2b733bbd6b868898285683ba5ff45be10b.

(This is a cherry-pick change.)

Bug: 154281342
Test: TreeHugger
Test: chromium-webview
Change-Id: I1575d9ef3f8596f1eb8db0867db09de08945d711
Merged-In: I1575d9ef3f8596f1eb8db0867db09de08945d711
2020-05-27 14:45:37 -07:00
Artur Satayev
3f5f67ca8e [automerger skipped] Merge changes I4ab7e1a3,Ib525b2f5,I2d4c54fb into rvc-dev am: 07d215215b -s ours
am skip reason: Change-Id I4ab7e1a3527fead97a81a5a2cb0e1e93a429117c with SHA-1 849f844252 is in history

Change-Id: Ibcfdcd71cdabc3a3f8f588ead3318f78f08101c2
2020-05-27 21:09:13 +00: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
Martin Stjernholm
321bbe92b1 Explain checkLinker errors a bit more.
For an end user hitting these errors, the most likely reason is that
they have mixed up linker and crtbegin_dynamic.o from different builds
in their out tree.

Test: Build a linux_bionic executable in a tree exhibiting b/157549171.
Test: m nothing
Bug: 157549171
Change-Id: I64bee0848ed61226da6654caf3bafb51cf46d923
2020-05-27 21:31:42 +01:00
Liz Kammer
966b2f02fb Add signing lineage for runtime_resource_overlay
Add ability to specify a signing lineage file for
runtime_resource_overlay.

Test: app_test.go
Bug: 153366049
Merged-In: I68286bc0caa9daad6ef74db39f7750924f1d93dd
Change-Id: I68286bc0caa9daad6ef74db39f7750924f1d93dd
2020-05-27 12:18:27 -07:00
Treehugger Robot
d1ec20eeaf Merge "Better handling of low memory situations" am: 43527e1f31 am: a880b4bc2d
Change-Id: I309149391ebabb4953c1a2b64abbde6c595c4fa9
2020-05-27 18:23:22 +00:00
Treehugger Robot
a880b4bc2d Merge "Better handling of low memory situations" am: 43527e1f31
Change-Id: Ide59cdf8c696e7803b59cc45cd4415bb9401d09d
2020-05-27 18:11:13 +00:00
Treehugger Robot
43527e1f31 Merge "Better handling of low memory situations" 2020-05-27 17:59:06 +00:00
Paul Duffin
537d1bf81c Merge "java_sdk_library: Create separate impl library" am: b1e61be41d am: dd9bbf981f
Change-Id: I8894657dfcaa6d5cccf2f704cbb9c9d80ebc8ae4
2020-05-27 17:55:19 +00:00
TreeHugger Robot
1c21a6c327 [automerger skipped] Merge "Add preprocessed property for android_test_import" into rvc-dev am: 753c739e2f -s ours
am skip reason: Change-Id If0c27c1e340c1bdb270064f636dc6bf33a0fc949 with SHA-1 3b70b3fea5 is in history

Change-Id: I98cec1da62b29865b3ca4a3b95452366719a1f4b
2020-05-27 17:46:33 +00:00
Paul Duffin
dd9bbf981f Merge "java_sdk_library: Create separate impl library" am: b1e61be41d
Change-Id: Ifa278ecb68419eba41a0a5f4a8e7593c2b6d44a7
2020-05-27 17:24:03 +00:00
TreeHugger Robot
753c739e2f Merge "Add preprocessed property for android_test_import" into rvc-dev 2020-05-27 17:21:19 +00:00
Paul Duffin
9d582cc985 java_sdk_library: Create separate impl library
Most dependencies on java_sdk_library instances (JSL) simply reference
them by name and rely on the build to pick the correct part, impl,
stubs for a specific scope, headers or implementation jars or dex jars.
Generally, the build gets that decision right. If it does not the for
most of the components of the JSL there is a way to reference them
directly. However, that is not true for the implementation library as
that is created the JSL itself.

Access to the implementation library should be avoided as it opens up
the possibility that use will be made of an API that is not tracked and
maintained which could lead to compatibility issues. However, there is
a case where use of the implementation library is required and safe.
That is when it is being used from other libraries within the same APEX
as the JSL. In that case the JSL and its dependencies will be updated
together so compatibility is not an issue.

This change adds a new <module>.impl java_library that compiles the
implementation library in the same way as the JSL itself does. This will
allow the modules that are blocked from converting to JSL because of
this limitation to progress. Initially the library is only for use
for compiling but follow up changes will switch the rest of the build
from using the implementation library created by JSL to the separate
module.

It also adds the ability to give the separate .impl library a more
restrictive visibility than the JSL further limiting misuse.

Bug: 156618935
Test: m droid, flash, atest CtsProviderTestCases - sniff test
      tested that it fixes compilation issues with mainline module
Merged-In: Ifc4799feb4ada9dec8021efc13fe6a953bf2edd3
Change-Id: Ifc4799feb4ada9dec8021efc13fe6a953bf2edd3
(cherry picked from commit 5df793011d)
2020-05-27 18:15:57 +01:00
Paul Duffin
b1e61be41d Merge "java_sdk_library: Create separate impl library" 2020-05-27 17:14:15 +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
Liz Kammer
c860d02aaa Merge "Support preprocessed prebuilt tests in androidmk" am: fd0d56af24 am: 21a4ee6b6a
Change-Id: I7eea428e53c1acca9f8568dc6eb076266af925f5
2020-05-27 17:01:36 +00:00
Liz Kammer
258b6cc92f Merge "Add signing lineage for runtime_resource_overlay" into rvc-dev am: 3d8779dd6f
Change-Id: I4557f03e3690c5672f446e7d9f8c9faf7d50b51b
2020-05-27 16:54:13 +00:00
Paul Duffin
2ce1e81b3e java_sdk_library: Add annotations_enabled property
Passes it through to droidstubs.

Bug: 155164730
Test: m droid
Change-Id: I8b23a959ce33716dfc4572488a1fd3f6bab73a17
2020-05-27 17:52:53 +01: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
Jooyung Han
93a06c10e9 Remove ApexBundleDepsInfo.MinSdkVersion()
For java.AndroidApp app, app.MinSdkVersion() was selected from
ApexBundleDepsInfo, not from java.Module.
This caused app.MinSdkVersion() to return "" always.

Besides, having two embeded fields and relying on depth to choose one of
them makes it hard to read.

Bug: 156537348
Test: m
Merged-In: Ib525b2f5132c596db8e33492d0a565ea23e91d1c
Change-Id: Ib525b2f5132c596db8e33492d0a565ea23e91d1c
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit 98d63e1cc7)
2020-05-27 17:51:14 +01:00