Commit graph

2236 commits

Author SHA1 Message Date
satayev
715a32b6de Merge "Check updatable APKs compile against managed SDKs." am: 0b3e45abd0 am: 2e40b33564
Change-Id: Ie906cb44cc73f867e0fdcef34a97966ad63ad45d
2020-04-15 17:27:59 +00:00
Anton Hansson
82dc4c8cff Merge "Create a framework.aidl for non-updatable platform" into rvc-dev am: c6fff020f5
Change-Id: Ia19b9cf99ca3c2a9fcefe4f0d864e57e486fb04f
2020-04-15 16:56:36 +00:00
Anton Hansson
c6fff020f5 Merge "Create a framework.aidl for non-updatable platform" into rvc-dev 2020-04-15 11:13:36 +00:00
Artur Satayev
2db1c3f1c4 Check updatable APKs compile against managed SDKs.
As a follow up, this property will be set to APKs participating in mainline program.

Bug: 153333044
Test: m
Change-Id: I6ea2f3c1d26992259e4e9e6a6d8cecf091d39c43
2020-04-15 12:06:13 +01:00
Jaewoong Jung
f472871e00 Merge "Add libs properties to runtime_resource_overlay." 2020-04-13 13:27:25 +00:00
Jaewoong Jung
fe3c7f6261 Add libs properties to runtime_resource_overlay.
(This is a cherry-pick change.)

Test: app_test.go
Test: Converted an existing RRO module.
Bug: 148788111
Change-Id: I723c7175760da019d38893e54f236c45f4c973ea
Merged-In: I723c7175760da019d38893e54f236c45f4c973ea
2020-04-10 16:29:40 -07:00
Jaewoong Jung
5209b4bd9f Merge "Add libs properties to runtime_resource_overlay." into rvc-dev am: 1883126573
Change-Id: I74d3bacdeefefd2736448164841081668c714072
2020-04-10 18:06:40 +00:00
Jaewoong Jung
1883126573 Merge "Add libs properties to runtime_resource_overlay." into rvc-dev 2020-04-10 17:41:19 +00:00
Jaewoong Jung
ca095d786a Add libs properties to runtime_resource_overlay.
Test: app_test.go
Test: Converted an existing RRO module.
Bug: 148788111
Change-Id: I723c7175760da019d38893e54f236c45f4c973ea
2020-04-10 07:05:07 -07:00
Paul Duffin
d4c0356dad Create prebuilt api modules in load hook not mutator
An attempt to reference one of the prebuilt modules directly from an
Android.bp file highlighted a bug. The prebuilt_apis module used a
mutator to create filegroup and java_import modules for a set of api
versions. That mutator ran after the "prebuilts" mutator which handled
the renaming of prebuilt modules when the matching source module was
not present. That meant that the only way to reference the module was
by explicitly adding the prefix "prebuilt_".

This change fixed that bug by creating the modules in a load hook rather
that a mutator. This ensures that the prebuilt modules are present well
before the "prebuilts" mutator is run. Removing the mutator also removes
an unnecessary traversal of the whole dependency tree.

It also updated the documentation to explain that it creates
java_import modules as well as the filegroup modules.

(cherry picked from 47f6315f01)

Bug: 153649372
Test: m droid
Change-Id: Id44dce8ca9968ae903345df6ef1c4f1be9cb76c5
Merged-In: Id44dce8ca9968ae903345df6ef1c4f1be9cb76c5
2020-04-10 07:44:52 +01:00
Treehugger Robot
a325487e9f Merge "Export API files as part of the java_sdk_library" am: 318f68226b am: 7dc6778d73
Change-Id: I1196b3e1acf851db7e69b2ad86d50a9f2cb14ed9
2020-04-10 04:53:37 +00:00
Treehugger Robot
84adeb3b9d Merge "Export stub sources as part of the java_sdk_library" am: b661961825 am: c61ca98d63
Change-Id: Ic8efc6c417e65bbc28639cafb068ac5674734cf1
2020-04-10 04:53:26 +00:00
Treehugger Robot
318f68226b Merge "Export API files as part of the java_sdk_library" 2020-04-10 03:57:11 +00:00
Treehugger Robot
b661961825 Merge "Export stub sources as part of the java_sdk_library" 2020-04-10 03:57:04 +00:00
TreeHugger Robot
efdad0fc18 Merge "Create prebuilt api modules in load hook not mutator" into rvc-dev am: fc5608ec80
Change-Id: Iae8feeff7d5b52dde71fcca93cdc767813e2e1ab
2020-04-09 23:15:09 +00:00
TreeHugger Robot
fc5608ec80 Merge "Create prebuilt api modules in load hook not mutator" into rvc-dev 2020-04-09 22:53:23 +00:00
Paul Duffin
47f6315f01 Create prebuilt api modules in load hook not mutator
An attempt to reference one of the prebuilt modules directly from an
Android.bp file highlighted a bug. The prebuilt_apis module used a
mutator to create filegroup and java_import modules for a set of api
versions. That mutator ran after the "prebuilts" mutator which handled
the renaming of prebuilt modules when the matching source module was
not present. That meant that the only way to reference the module was
by explicitly adding the prefix "prebuilt_".

This change fixed that bug by creating the modules in a load hook rather
that a mutator. This ensures that the prebuilt modules are present well
before the "prebuilts" mutator is run. Removing the mutator also removes
an unnecessary traversal of the whole dependency tree.

It also updated the documentation to explain that it creates
java_import modules as well as the filegroup modules.

Bug: 153649372
Test: m droid
Change-Id: Id44dce8ca9968ae903345df6ef1c4f1be9cb76c5
2020-04-09 21:35:53 +01:00
Julien Desprez
0eb91f4e91 Merge "Add support for order-only dependencies to RuleBuilder" into rvc-dev 2020-04-09 18:56:01 +00:00
Treehugger Robot
ccf72eeab7 Merge changes If74eea67,I9d8089b2 am: 522bca3b26 am: ec1c252f7b
Change-Id: Ie0ed2da22ca948ab0083a6c5bc52d366d3332423
2020-04-09 17:10:51 +00:00
Paul Duffin
ad649c4e07 Merge "Generate struct with field for each api scope" am: f9cb1204e1 am: d1053dd94a
Change-Id: I516f32f0dec514f8aba2492970e791ec52c5f90f
2020-04-09 17:10:45 +00:00
Treehugger Robot
522bca3b26 Merge changes If74eea67,I9d8089b2
* changes:
  Extract createJavaImportForStubs()
  Support java_sdk_library as member of sdk
2020-04-09 17:01:51 +00:00
Paul Duffin
f9cb1204e1 Merge "Generate struct with field for each api scope" 2020-04-09 17:01:40 +00:00
Anton Hansson
85c151c3f3 Create a framework.aidl for non-updatable platform
framework.aidl includes the parcelables from the non-updatable
part of the framework as well as the modules. This causes a
dependency cycle when building module stubs:
module_stub -> module_sdk -> framework.aidl -> public_sdk -> module_stub

The module_sdk only includes the the stubs for the non-updatable
part of the framework, so it should also only contain the non-updatable
parcelables. This change creates a framework_non_updatable.aidl with
those parcelables, and updates module_current to use that.

Bug: 144149403
Test: m
Test: m && diff out/soong/framework{,_non_updatable}.aidl
      (the diff contains just TestApi + module parcelables)
Change-Id: I224117a0ff695c22d4a4317a51a9b775ed73066b
2020-04-09 17:45:30 +01:00
Jaewoong Jung
9b38447d48 Merge "Collect JNI coverage data only for first target." 2020-04-09 16:42:34 +00:00
Paul Duffin
d8dd2cd8a3 Merge "Allow droidstubs to not generate any stubs" am: e03749b9ad am: 6931de02de
Change-Id: I5bdb5b98e4692d5aa9f66a599b9728b98a877ff3
2020-04-09 16:15:48 +00:00
Paul Duffin
e03749b9ad Merge "Allow droidstubs to not generate any stubs" 2020-04-09 15:42:07 +00:00
Jaewoong Jung
46984eeb58 Collect JNI coverage data only for first target.
Modules with compile_multilib property set to "both" cause builds to
fail due to duplicate Make recipes. Fix it by outputting reports only
for the first target for now.

(This is a cherry-pick change.)

Bug: 153461674
Test: Built cts with the coverage flags set.
Change-Id: Ibb8da6e9c112a857695cd7095a62c910cddfbb94
Merged-In: Ibb8da6e9c112a857695cd7095a62c910cddfbb94
2020-04-09 08:32:40 -07:00
Automerger Merge Worker
82f316b8db Add support for order-only dependencies to RuleBuilder
Test: TestRuleBuilder
Change-Id: I1609a790dd4d0a03c8308b6e552622fe33fa2499
Bug: 153071808
Merged-In: Icfa98d6840b1dc2e273ba29c33011635d1cf93b1
2020-04-09 08:17:32 -07:00
Ulya Trafimovich
b4d816e0c4 Relax boot image check to allow platform Jacoco variant in a coverage build.
Test: m nothing
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true nothing

Bug: 153533941

Change-Id: I5847ec282f6b481cee61ed9ec6b6928c9a41fae7
Merged-In: I5847ec282f6b481cee61ed9ec6b6928c9a41fae7
(cherry picked from commit e0ce4ba491)
2020-04-09 14:50:44 +01:00
Ulya Trafimovich
cc21bba967 Forbid generating boot image files for jars in updatable modules.
This is to guard against the potential situation when someone adds
updatable modules to the list of boot jars by mistake.

Test: aosp_walleye-userdebug builds.

Test: Manually break the checks and observe the errors:
  - move updatable module 'conscrypt' from
    PRODUCT_UPDATABLE_BOOT_JARS to ART_APEX_JARS:
      internal error: module 'conscrypt' from updatable apex 'com.android.conscrypt' is not allowed in the ART boot image

  - add updatable module 'conscrypt' to ART_APEX_JARS
    (but do not remove it from PRODUCT_UPDATABLE_BOOT_JARS):
      error: A jar in PRODUCT_UPDATABLE_BOOT_JARS must not be in PRODUCT_BOOT_JARS, but conscrypt is.

  - move updatable module 'framework-tethering' from
    PRODUCT_UPDATABLE_BOOT_JARS to PRODUCT_BOOT_JARS:
      internal error: module 'framework-tethering' from updatable apex 'com.android.tethering' is not allowed in the framework boot image

  - add non-updatable (in AOSP) module 'android.net.ipsec.ike'
    to PRODUCT_BOOT_JARS:
      internal error: failed to find a dex jar path for module 'com.android.ipsec.ike', note that some jars may be filtered out by module constraints

Bug: 147579140

Exempt-From-Owner-Approval: cherry-pick, approved in AOSP.

Change-Id: I25ca2f52530fcfa1f9823b2cfa3485db9c0d0db1
Merged-In: I25ca2f52530fcfa1f9823b2cfa3485db9c0d0db1
(cherry picked from commit b28cc3758c)
2020-04-09 14:50:21 +01:00
Jaewoong Jung
71309cf6a5 Merge "Collect JNI coverage data only for first target." into rvc-dev am: aeb9e6ffe8
Change-Id: Ie698bc61ff48e5729393934a146855f4d8c45df4
2020-04-09 04:50:44 +00:00
Paul Duffin
1fd005d5b3 Export API files as part of the java_sdk_library
Bug: 153443117
Test: m nothing

Change-Id: I9d6f5b91a7cc25019e2eb9e3c138f0874d2831de
2020-04-09 01:33:46 +01:00
Paul Duffin
3d1248ceb6 Export stub sources as part of the java_sdk_library
Minor refactoring of checkMergeZip(string) -> checkMergeZips(...string)
to allow testing of multiple merge zips.

Bug: 153443117
Test: m nothing
Change-Id: I8db00f611ced15f8476ba16f2834a72e8c913596
2020-04-09 01:32:38 +01:00
Paul Duffin
bbb546b2da Extract createJavaImportForStubs()
Bug: 153443117
Test: m nothing
Change-Id: If74eea675b7ab4aeaa821294f2a137c95f794d4f
2020-04-09 01:32:38 +01:00
Paul Duffin
46a26a8871 Generate struct with field for each api scope
Makes it easier to add new api scopes by generating a struct with a
field for each scope.

Bug: 153443117
Test: m nothing
Change-Id: Iec77a858d2c851d99e56568b89cb30aa3ff2a244
2020-04-09 01:32:38 +01:00
Paul Duffin
dd46f71493 Support java_sdk_library as member of sdk
Bug: 153443117
Test: m nothing
Change-Id: I9d8089b2555038e3f10ad5939a6a7b01839c67ea
2020-04-09 01:32:38 +01:00
Jaewoong Jung
e62e594a24 Collect JNI coverage data only for first target.
Modules with compile_multilib property set to "both" cause builds to
fail due to duplicate Make recipes. Fix it by outputting reports only
for the first target for now.

Bug: 153461674
Test: Built cts with the coverage flags set.
Change-Id: Ibb8da6e9c112a857695cd7095a62c910cddfbb94
2020-04-08 16:33:23 -07:00
Colin Cross
c27185cd72 Merge "Revert^2 "Add sdk mutator for native modules"" am: ff550f3e13 am: 7af7725de1
Change-Id: I9a947c10e593f7b1647440acca4de08952e7928e
2020-04-08 18:42:10 +00:00
Colin Cross
ff550f3e13 Merge "Revert^2 "Add sdk mutator for native modules"" 2020-04-08 18:29:30 +00:00
Paul Duffin
3ae2951296 Allow droidstubs to not generate any stubs
Needed to optimize the handling of the module_lib API surface which
currently has to be generated with two separate droidstubs instances,
one to generate the stubs and another to generate the .txt file. This
allows the module generating the .txt file to avoid also wasting time
generating stubs that are not used.

This change:
* Adds a generate_stubs property that defaults to true to allow the
  behavior to be customized on a per module basis.
* Uses either the stubs srcjar or the api .txt file as the OutputFile
  for the AndroidMkEntries to ensure that they get written out properly.
* Rearranges the code for generating stubs to make it easier to
  turn it off.

Bug: 146727827
Test: m droid
      Check output dir of framework-sdkextensions-api-module_libs_api
	  to make sure it does not contain any sources or srcjars.
Change-Id: Ib8025019f8a7a8cf5fa8765d76b5ad470af20006
2020-04-08 18:50:37 +01:00
Ulyana Trafimovich
bac0c9dc97 Merge "Relax boot image check to allow platform Jacoco variant in a coverage build." am: 82aca76739 am: a0e1d71939
Change-Id: I16e5694fe9b8fdf0443d775447b51297f7500796
2020-04-08 17:25:08 +00:00
Ulyana Trafimovich
82aca76739 Merge "Relax boot image check to allow platform Jacoco variant in a coverage build." 2020-04-08 16:56:10 +00:00
Paul Duffin
3e5c8b4995 Merge "Stop requiring apex_available on java_library members of sdks" am: f76c64018e am: c8c4a962d4
Change-Id: I8655a0889bb8bb089e16107ec29a1c559cb290b0
2020-04-08 14:59:16 +00:00
Paul Duffin
f76c64018e Merge "Stop requiring apex_available on java_library members of sdks" 2020-04-08 14:26:39 +00:00
Ulya Trafimovich
e0ce4ba491 Relax boot image check to allow platform Jacoco variant in a coverage build.
Test: m nothing
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true nothing

Bug: 153533941

Change-Id: I5847ec282f6b481cee61ed9ec6b6928c9a41fae7
2020-04-08 15:11:20 +01:00
Ulyana Trafimovich
7c9b35f2ad Merge "Forbid generating boot image files for jars in updatable modules." am: 0d8f61640e am: 73864e0b04
Change-Id: Iab5db838aa4cd782aeac7d58923f698b7f624d7a
2020-04-08 12:43:10 +00:00
Ulyana Trafimovich
0d8f61640e Merge "Forbid generating boot image files for jars in updatable modules." 2020-04-08 12:15:47 +00:00
Paul Duffin
6534770793 Stop requiring apex_available on java_library members of sdks
Previously, adding java_library to an sdk required that the names of
any APEXes that transitively compiled against it were added to its
apex_available property. This change removes that requirement.

Also corrects the dependency path in the TestApexAvailable_IndirectDep
error which previously passed through "shared from static" static
dependency tags even though those are explicitly NOT followed when
checking apex_available settings.

Bug: 152878661
Test: m droid
Change-Id: I995ed38956c1bc210b09494812de012fed9f9232
2020-04-08 08:40:44 +01:00
Treehugger Robot
3435c98bbf Merge changes I96f0eb03,Ie883eb45 am: 5bf1480218 am: 3893c6743b
Change-Id: Ib77584a2ec9d291e654e074b74feb474bc58be93
2020-04-08 01:17:23 +00:00
Treehugger Robot
5bf1480218 Merge changes I96f0eb03,Ie883eb45
* changes:
  Parameterize scopes with additional droidstubs args
  Replace references to droiddoc with droidstubs
2020-04-08 00:42:22 +00:00