Commit Graph

486 Commits

Author SHA1 Message Date
Ulyana Trafimovich
3ddf47abd5 Merge "Add "updatable" property to ApexModule interface." am: dc9510537a am: 0f4722751b am: b59f9f2d52 am: 7695c848d6 am: 56ddc32213
Change-Id: I8e5b24c05c0f6cc36d3dbd3eb1b58e306c49563d
2020-04-24 10:06:58 +00:00
Ulyana Trafimovich
b59f9f2d52 Merge "Add "updatable" property to ApexModule interface." am: dc9510537a am: 0f4722751b
Change-Id: I475093d9bf96a94a54f4c64ad409f63a28b2ee95
2020-04-24 09:05:01 +00:00
Ulyana Trafimovich
dc9510537a Merge "Add "updatable" property to ApexModule interface." 2020-04-24 08:25:34 +00:00
Treehugger Robot
6cc573c68c Merge "Remove libopus from apex_available whitelist" am: f4dc25b476 am: a1c10cf43c am: fd6b26abc1 am: e5b0682a07 am: 094b44979a
Change-Id: I138c48e0167ec886dcdd7823da8360fbce9beb51
2020-04-24 02:04:12 +00:00
Treehugger Robot
fd6b26abc1 Merge "Remove libopus from apex_available whitelist" am: f4dc25b476 am: a1c10cf43c
Change-Id: I15695035a45c934faec13384fef7bb8ad08d17ca
2020-04-24 01:07:26 +00:00
Ulya Trafimovich
7c140d828a 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
Change-Id: I2d4c54fb397e29dc9b3203be7fb17be4536529f7
2020-04-23 11:58:53 +01:00
Jooyung Han
47db5adb06 Remove libopus from apex_available whitelist
libopus sets its own apex_available property.

Bug: 150999716
Test: m
Change-Id: I4cff3ebb7e017a1fb629b18b72238acf3df0d26e
2020-04-23 15:54:23 +09:00
Jiyong Park
601d31c234 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.

Bug: 150999716
Test: m
Change-Id: I11a4e877ee27f7c55e2f00371c6fa58daedb1a9f
2020-04-19 14:03:20 +09:00
Jooyung Han
15edabb85d Merge "apex: respect filename property for apk-in-apex" am: 79a24f2ca8 am: 4c70b2800f am: 0b2255f411 am: 5db958a9bf am: 17b29bfb92
Change-Id: Ia8c0796b76ec773a8af3fc41845f5ecbabfab21d
2020-04-18 04:32:27 +00:00
Jooyung Han
0b2255f411 Merge "apex: respect filename property for apk-in-apex" am: 79a24f2ca8 am: 4c70b2800f
Change-Id: I8077fdf16054e2c1f958af4a2ce4452767b5fa8f
2020-04-18 03:22:38 +00:00
Jooyung Han
79a24f2ca8 Merge "apex: respect filename property for apk-in-apex" 2020-04-18 02:23:07 +00:00
Jooyung Han
f549fde105 apex: Don't run apex mutators if disabled am: 49f6701e9a am: c080abef85 am: cab7283b6b am: 1ee866d46f am: 8d3a654f70
Change-Id: Iaae2f1fc6a2a5ab37c8b68ee40e020ce88dd7c8d
2020-04-17 14:40:29 +00:00
Jooyung Han
cab7283b6b apex: Don't run apex mutators if disabled am: 49f6701e9a am: c080abef85
Change-Id: I897cba2391532ba33b2be9552f1f5eea1198bc3a
2020-04-17 13:47:47 +00:00
Jooyung Han
49f6701e9a apex: Don't run apex mutators if disabled
apex_deps/apex/apex_flattened mutators don't have to run if module is
disabled.

For some branches which have no valid targets, apex modules are disabled
by the os mutator. e.g. aosp-build-tools

Some enforcement checks which run during those mutators may fail because
build-environment doesn't provide full context information.

For example, "Platform_version_all_codenames" config variable is not
set while apex.min_sdk_version uses one of those codenames.

Bug: 152655956
Test: m
Change-Id: I47e27d2d025ba4c36534708b113ce77c4cb2397b
2020-04-17 15:49:32 +09:00
Treehugger Robot
2b7c2e877b Merge "Clean com.android.neuralnetworks APEX whitelist" am: 0d4b9e32d0 am: 8e49cf8502
Change-Id: If3f8b2c319aafb2a5b759b13360ec7f1d6c1a9e8
2020-04-09 12:53:19 +00:00
Treehugger Robot
0d4b9e32d0 Merge "Clean com.android.neuralnetworks APEX whitelist" 2020-04-09 12:16:37 +00:00
Treehugger Robot
280eacef57 Merge "Remove conscrypt.module.intra.core.api.stubs from apex white list" am: b54015fa54 am: b9fd69e8af am: 8c8763567d am: ea36310e02 am: 55ae47f156
Change-Id: If4f3ea704461e345d574f5498504905669775d75
2020-04-09 03:23:26 +00:00
Treehugger Robot
8c8763567d Merge "Remove conscrypt.module.intra.core.api.stubs from apex white list" am: b54015fa54 am: b9fd69e8af
Change-Id: I5338969f71eb6a39606d4f9627ea2c8fbc14e7d8
2020-04-09 02:31:29 +00:00
Przemyslaw Szczepaniak
e5a306480a Merge "Clean com.android.neuralnetworks APEX whitelist" 2020-04-08 18:57:20 +00:00
Paul Duffin
e2cfe9ce92 Remove conscrypt.module.intra.core.api.stubs from apex white list
It is no longer needed because non-static java_library dependencies are
not considered to be part of the depending APEX.

Bug: 153443117
Test: m nothing
Change-Id: I7d58d1047b2d400395a253e492b35008284778ff
2020-04-08 19:12:58 +01:00
Jooyung Han
004c21eefd Apex: add NeverAllowRule for updatable am: e17caa63a6 am: f8300fdce1 am: ff0dc6bdc3 am: f091084ee5
Change-Id: Ib56a1089677444ae9bab06bbda57c8c622b4c846
2020-04-08 16:19:30 +00:00
Jooyung Han
f8300fdce1 Apex: add NeverAllowRule for updatable am: e17caa63a6
Change-Id: Ie893bf23a57083b594cd0fc5c09adb7a38322969
2020-04-08 15:56:17 +00:00
Paul Duffin
ceb2baec19 Merge "Ignore PrebuiltDepTag when processing APEX contents" am: 846e60dbc7 am: 246bbcc5e2 am: 2842d14c50 am: b90b87723a am: a74e349a97
Change-Id: I40b55ceb10a2e899fddcb120f547c6184dbbfecc
2020-04-08 15:34:42 +00:00
Paul Duffin
cd146c5680 Merge "Stop requiring apex_available on java_library members of sdks" am: f76c64018e am: c8c4a962d4 am: 3e5c8b4995 am: 464f82aa61 am: e0f4077d32
Change-Id: I51be139642902325e8cac75c50f9ea9fee686d34
2020-04-08 15:34:33 +00:00
Paul Duffin
2842d14c50 Merge "Ignore PrebuiltDepTag when processing APEX contents" am: 846e60dbc7 am: 246bbcc5e2
Change-Id: Ia5482682e8673cd0721c6029d03e222a9e0aefe1
2020-04-08 14:59:24 +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
f98b31db88 Add dependency tags to apex available errors am: c519244cd5 am: e554326df5 am: a726a11db1 am: f588bf2d03 am: 40ddd8a816
Change-Id: If9bd928dd27c8aa1cbffb31157c000e332cd46bb
2020-04-08 12:19:05 +00:00
Paul Duffin
a726a11db1 Add dependency tags to apex available errors am: c519244cd5 am: e554326df5
Change-Id: I981156a84819badf8f24e79beffa2f51a41e06be
2020-04-08 11:40:00 +00:00
Paul Duffin
a93a063d30 Merge "Extract DepIsInSameApex and RequiredSdks interfaces" am: 2010598a51 am: 2a9b7c8791 am: 7b49cfc537 am: 7fbb070af0 am: 06188e0749
Change-Id: I4810fa65c45d6f7eea939a93e7b59d188a7383e0
2020-04-08 07:57:44 +00:00
Paul Duffin
dddd5469ad Ignore PrebuiltDepTag when processing APEX contents
When a source and a prebuilt module are present in the same build a
dependency is added from the source module to the prebuilt module.
Previously, the code for generating the APEX did not recognize that
tag and in some cases (e.g. for cc_(prebuilt_)library_shared) will
fail the build.

This change:
1) Adds a test to reproduce the problem.
2) Improves the debug message by pretty printing the tag.
3) Adds a new ExcludeFromApexContents interface that can be implemented
   by a tag to declare that it should be excluded from the APEX
   contents.
4) Ignores tags that implement that interface when generating APEX
   contents.
5) Implements that interface on prebuiltDependencyTag to fix the
   test.

Bug: 153326844
Test: m nothing
Change-Id: I9dd4312c4f995c816c0a31d8d733eb5d7f56e1ea
2020-04-08 08:40:44 +01: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
Paul Duffin
c519244cd5 Add dependency tags to apex available errors
Having dependency tags in the dependency path that shows why a specific
module is considered part of an apex makes it easier to understand why
that is the case and detect possible issues.

Bug: 152762638
Test: m nothing
Change-Id: Iba2a8a5a6abe03dadee456e760aa4373cd00c07b
2020-04-08 08:40:44 +01:00
Paul Duffin
7b49cfc537 Merge "Extract DepIsInSameApex and RequiredSdks interfaces" am: 2010598a51 am: 2a9b7c8791
Change-Id: I825f791ccecd83be6060654a36403756ace30d23
2020-04-08 07:26:23 +00:00
Jooyung Han
e17caa63a6 Apex: add NeverAllowRule for updatable
to enforce that apexes that set updatable: true also set min_sdk_version

Bug: 152655956
Test: m
Change-Id: I0d2e9f9b3234873de073ab82d91211faedd16498
2020-04-08 05:20:11 +00:00
Paul Duffin
923e8a5e9e Extract DepIsInSameApex and RequiredSdks interfaces
The DepIsInSameApex() and RequiredSdks() methods were defined in a few
places to avoid having to depend on the whole ApexModule/SdkAware
interfaces directly. However, that has a couple of issues:
1) It duplicates functionality making it difficult to change, changes
   to the definitions outside the main interfaces do not cause compile
   time failures, instead they result in a runtime change in behavior
   which can be difficult to debug.
2) IDE navigation (specifically in Intellij) does not detect that the
   duplicate definitions can resolve to the definitions in the main
   interface.

This change extracts the methods into their own interfaces and reuses
those interfaces instead of duplicating the methods to fix both of
these issues.

Bug: 152878661
Test: m nothing
Change-Id: I0cfdf342a14eb0bfb82b1bd17e0633d81c7facfb
2020-04-07 15:26:06 +01:00
Przemysław Szczepaniak
5642308998 Clean com.android.neuralnetworks APEX whitelist
Test: coral-userdebug build
Bug: 148593574
Change-Id: I1babea6c221dec1cd5364250d09f5ea541494942
Merged-In: I1babea6c221dec1cd5364250d09f5ea541494942
2020-04-06 14:02:31 +00:00
Jooyung Han
39ee119de2 apex: respect filename property for apk-in-apex
android_app_import supports filename: property, which overrides .apk
filename.

Now, apex packaging rule respects it too.
(Previously, apex packaging ignored it)

Bug: 152163837
Test: m  (soong tests amended)
Change-Id: I72e2f1c923f4d01c42a87bf2232a025adca4c918
2020-04-06 21:25:06 +09:00
Przemysław Szczepaniak
e3842c49ef Clean com.android.neuralnetworks APEX whitelist
Test: coral-userdebug build
Bug: 148593574
Change-Id: I1babea6c221dec1cd5364250d09f5ea541494942
2020-04-06 12:59:33 +01:00
Treehugger Robot
4104db4d0d Merge changes from topic "no_whitelisting_apex_available" am: b9e4a3fdf4 am: bf4bc941a2 am: 678c8de79c am: 77fc7a3f3b am: a9b2c6855e
Change-Id: I8747bed86789a0cc7d16e9aa27683877b69364c3
2020-04-05 10:54:11 +00:00
Treehugger Robot
678c8de79c Merge changes from topic "no_whitelisting_apex_available" am: b9e4a3fdf4 am: bf4bc941a2
Change-Id: Ife369d5943e70b4d5a6836ca19d514dd1c38d658
2020-04-05 09:51:31 +00:00
Treehugger Robot
b9e4a3fdf4 Merge changes from topic "no_whitelisting_apex_available"
* changes:
  Remove some apex_available whitelist for the adbd APEX
  Make ndk_prebuilt_* be available to any apex
2020-04-05 09:10:47 +00:00
Jooyung Han
645874a39f Merge "Apex: support codenames for min_sdk_version" into rvc-dev am: 95148f607e am: 0091763e97 am: 3eb6dba2a4 am: 0826a4b03c
Change-Id: I8e4df132bca6f0eef58056461936a8cf45eb88b0
2020-04-05 01:41:26 +00:00
Jooyung Han
3eb6dba2a4 Merge "Apex: support codenames for min_sdk_version" into rvc-dev am: 95148f607e am: 0091763e97
Change-Id: I9e8f8a87c77105bd74b0f40be9d9861899006c9a
2020-04-05 01:02:18 +00:00
Jooyung Han
7e62fbe8e1 Merge "Apex: support codenames for min_sdk_version" into rvc-dev am: 95148f607e
Change-Id: Ib64f83d89dd7adeafa2b42bc81c7dd012fe13ff8
2020-04-05 00:32:30 +00:00
Jooyung Han
29e91d2121 Apex: support codenames for min_sdk_version
Apex can use codenames like "Q", "R" for its min_sdk_version property.
Also, cc_library can use codenames for its stubs.versions.

Bug: 152655956
Test: vendor/google/build/build_mainline_modules.sh
Change-Id: I077ad7b2ac5d90b4c8708921e43846206f05ba70
2020-04-02 23:26:41 +09:00
Paul Duffin
a87b1b2272 Merge "Allow walkPayloadDeps visitor to control walk flow" am: 4ac530d4c7 am: 94d5ca9d38 am: becaaba147 am: 942bfc5709 am: 67086a042c
Change-Id: Icf85610f5b581743b3289a0e0037414cbe656c64
2020-04-01 19:20:49 +00:00
Paul Duffin
becaaba147 Merge "Allow walkPayloadDeps visitor to control walk flow" am: 4ac530d4c7 am: 94d5ca9d38
Change-Id: I85dbe29fdc5b71fa923a2583621ef713d1b151a0
2020-04-01 18:29:06 +00:00
Paul Duffin
4ac530d4c7 Merge "Allow walkPayloadDeps visitor to control walk flow" 2020-04-01 17:54:04 +00:00
Jiyong Park
1a050ee6ae Merge "Remove some apex_available whitelist" am: 1cda30e211 am: 41110b1cfb am: f689b0ec7c am: d61952ee3e am: fadf53ab9e
Change-Id: If622b5e02c5bf931f350f73ef9dab151b4e727d9
2020-04-01 13:58:05 +00:00
Jiyong Park
f689b0ec7c Merge "Remove some apex_available whitelist" am: 1cda30e211 am: 41110b1cfb
Change-Id: Ieb597a084b56fbd3a18636f528e9fb1b6a963541
2020-04-01 13:36:05 +00:00