Commit Graph

1442 Commits

Author SHA1 Message Date
Sophie Zheng
94443b9511 Merge "Automated NDK API coverage used by Mainline modules build integration." am: 8baa8b50a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496322

Change-Id: I960f808499c2f63cfb04c98fe4e35cdc65b94e4a
2020-12-03 23:56:09 +00:00
Treehugger Robot
19c0e36c53 Merge "Rename __ANDROID_SDK_VERSION__." am: fe9e0c775c am: 440ad728a4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502112

Change-Id: Ia0f8b1790c6eaf4ae79a6867c1a9ea423091479c
2020-12-03 23:30:38 +00:00
Sophie Zheng
8baa8b50a8 Merge "Automated NDK API coverage used by Mainline modules build integration." 2020-12-03 23:30:21 +00:00
Treehugger Robot
440ad728a4 Merge "Rename __ANDROID_SDK_VERSION__." am: fe9e0c775c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502112

Change-Id: I72397bc3c7da996d44a088a252ca58124118da47
2020-12-03 22:29:10 +00:00
Treehugger Robot
fe9e0c775c Merge "Rename __ANDROID_SDK_VERSION__." 2020-12-03 22:09:56 +00:00
Colin Cross
e4e955818a Merge "Pass pctx and ctx to NewRuleBuilder" am: 897a5ad507 am: c5666f9231
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500984

Change-Id: I10687ab8328c4b294f7eea81fc043cb3b1ffe556
2020-12-03 20:38:59 +00:00
Colin Cross
c5666f9231 Merge "Pass pctx and ctx to NewRuleBuilder" am: 897a5ad507
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500984

Change-Id: Idd3ca2ed1b5ea6c0d666c35d1669bc90ee6edfdc
2020-12-03 20:16:11 +00:00
sophiez
c80a2b392e Automated NDK API coverage used by Mainline modules build integration.
Add gen_ndk_usedby_apex.sh script to generate NDK API list used by Mainlain modules when modules get build.

Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only

Forrest run: android-build.googleplex.com/builds/forrest/run/L97800000742565481

Change-Id: I39e5aa7c74eff46aba06808642b2bd67ae45ba1e
2020-12-03 05:45:20 +00:00
Saeid Farivar Asanjan
8cb9f3f5ef Add car-ui-lib-overlayable to apex allowed_deps
Bug: 168062639
Test: manual
Change-Id: If31714ad0ab00af65e6f880fb8f7224e2c46d0a3
Merged-In: If31714ad0ab00af65e6f880fb8f7224e2c46d0a3
(cherry picked from commit 0b94aab5ef)
2020-12-02 08:58:34 -08:00
Kiyoung Kim
4098c7eddf Add linkerconfig to Runtime APEX
Add linkerconfig to Runtime APEX module.

Bug: 165769179
Test: Cuttlefish boot succeeded
Change-Id: I31c4bfa2ce88b64d7100f227ec289416db253b13
2020-12-02 11:33:54 +09:00
Colin Cross
f1a035e6be Pass pctx and ctx to NewRuleBuilder
Enable the RuleBuilder and RuleBuilderCommand methods to access
the BuilderContext by passing it to NewRuleBuilder instead of
RuleBuilder.Build.

Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
2020-12-01 16:22:16 -08:00
Dan Albert
b19953d04a Rename __ANDROID_SDK_VERSION__.
__ANDROID_SDK_VERSION__ is ambiguous. Rename it
__ANDROID_APEX_MIN_SDK_VERSION__ so it's clear which SDK version it
refers to.

Note that this is still different from the minSdkVersion of the module
being compiled. This is the max of *all* the minSdkVersions of modules
that this module shares an APEX with.

Test: treehugger
Bug: None
Change-Id: Id9cbd80a6bc99db8227daef4e1db9c893e63ad1e
2020-11-30 14:39:01 -08:00
Jiyong Park
a9faa25e54 Merge "rust modules can be included in apex" am: fdea25781f am: 88365d1894
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508096

Change-Id: Ida72f5291f3c1a1c7f9fd0301e4a0055bbaddead
2020-11-30 17:01:21 +00:00
Jiyong Park
fdea25781f Merge "rust modules can be included in apex" 2020-11-30 15:41:28 +00:00
Jiyong Park
99644e92c8 rust modules can be included in apex
We will have some APEXes having rust binaries and libraries. So, adding
the support for the types of modules.

rust.Module now inherits from android.ApexModuleBase and implements
the android.ApexModule interface.

Bug: 172414324
Test: m

Exempt-From-Owner-Approval: rebased after +2 from the owner
Change-Id: I356ef4c45f782a6460f001e83af96d1710642d80
2020-11-30 15:40:48 +00:00
Paul Duffin
53a3c6f30f Merge "Remove redundant setting of DistFiles by apexBundle" am: 11402caa47 am: ba5ddbd78c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511915

Change-Id: I3b10f405bdf9a2c207500f7b492b184c8c483c29
2020-11-30 13:41:38 +00:00
Paul Duffin
dd2b98baf4 Merge "Differentiate between no dist tag and an empty dist tag" am: 4326e0e094 am: 982093faaf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511911

Change-Id: Ifc4b718d162f8e95009502d4d62684fb9d9d4cff
2020-11-30 13:41:15 +00:00
Paul Duffin
281bc00bbf Remove redundant setting of DistFiles by apexBundle
A previous change handles dist properties automatically for all module
types and as a result has made the apexBundle setting of DistFiles
redundant so this change removes that.

Test: m nothing
      m dist sdk - before and after this change, compare result to
      make sure that there are no significant differences.
      Test the effect on the apex by following instructions in
      http://b/172951145
Bug: 174226317
Change-Id: If6f741b5b73b3335f4c478a6528f5f311cd633e4
2020-11-27 15:17:44 +00:00
Paul Duffin
74f05598eb Differentiate between no dist tag and an empty dist tag
Change https://r.android.com/1335521 added tag property to the Dist
struct so that it could be used to select one of a number of different
output files to copy to the dist instead of the single file that the
module type made available for dist. The output files were selected
by passing the tag to OutputFiles(tag).

Module types that wanted to support this new approach had to explicitly
set AndroidMkEntries.DistFiles = GenerateTaggedDistFiles(module).
Unfortunately, doing that had a side effect of changing the behavior of
dist entries without a tag.

That was because the change treated a tag that was not specified, as
being the same as "". So, prior to the change no tag meant use the
default dist file but after it meant use the paths returned by
OutputFiles(""). That changed the behavior of the java.Library type
which affected the behavior of the android_app module type.

Prior to the change the java_library would make the
Library.outputFile available for dist when no tag was specified. After
that change it would make Library.outputFile plus
Library.extraOutputFiles. The latter is usually empty except for
android_app which adds some extra files into there which will now be
copied to the dist. That change may have been intentional but there
was no mention of it in the change or the bug. Even if it wasn't
intentional it may still be beneficial.

Any module type that wants to add support for tags in dist runs the
risk of introducing similar changes in behavior. This change
differentiates between the tag not being set and the tag being set to
"" to avoid that possibility and to make the default behavior
explicit for those module types that have switched.

It does so as follows:
* Adds a DefaultDistTag constant that is used when the tag is not set.
  It is a string that is unlikely to be used as an actual tag as it
  does not start with a . and uses some special characters.
* The DefaultDistTag is used in MakeDefaultDistFiles(paths) to indicate
  that the supplied paths are the default ones and and also in
  GenerateTaggedDistFiles() for Dist structures that have no tag
  property set.
* The DefaultDistTag is passed to OutputFiles(tag) just in case the
  module type has explicitly defined the paths to associate with that
  tag in there. If it has then it overrides the legacy behavior. If it
  has not then it is just ignored and falls back to using the previous
  behavior.
* The java.Library.OutputFiles(tag) method explicitly handles the
  DefaultDistTag and returns Library.outputFile for it which restores
  the behavior from before the change that added dist.tag support.
* Similar change was made to apexBundle.OutputFiles(tag) in order to
  preserve its previous behaviour.
* The customModule used by TestGetDistContributions has been modified
  to also preserve its previous behavior after this change.

Test: m nothing
      m dist sdk - before and after this change, compare result to
      make sure that there are no significant differences.
      Test the effect on the apex by following instructions in
      http://b/172951145
Bug: 174226317
Change-Id: Ib8f0d9307751cc2ed34e3d9a5538d3c144666f6d
2020-11-27 15:17:44 +00:00
Treehugger Robot
403cc39d4c Merge "Documenting apex/builer.go" am: 9c4c534d25 am: 024e2442bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1509688

Change-Id: I3667e0a2411953ad58e2309749cff2228ee4e371
2020-11-27 01:28:45 +00:00
Jiyong Park
b81b99032d Documenting apex/builer.go
Mostly documentation changes, but includes a few refactorings like
changing the variable names, reordering functions, reordering statements
in logical order, etc.

Bug: 173472337
Test: m
Change-Id: Iefdc8e463bcda60187b98e8c90661e220e8cdf40
2020-11-25 09:53:46 +09:00
Treehugger Robot
656b1247bc Merge "Documenting apex/apex.go" am: 333d235475 am: bca26b52d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505673

Change-Id: I867ff8b7074fc0633a974da908d59cd1b6ad26a0
2020-11-24 06:36:00 +00:00
Jiyong Park
c0ec6f99d7 Documenting apex/apex.go
Mostly documentation changes, but includes a few refactorings like
changing the variable names, reording functions, reordering statements
in logical order, etc.

Bug: 173472337
Test: m

Change-Id: Ie1799c0972d63da823ad375f008018de782529d1
2020-11-24 09:28:50 +09:00
Treehugger Robot
edb17b5f22 Merge "Documenting android/apex.go" am: b26070efef am: 7ea5837252
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502070

Change-Id: I261a08fe569600a33306cda9032ae96471e48f06
2020-11-23 01:36:53 +00:00
Jiyong Park
7e8eed256c Merge "Reorganize apex/apex.go" am: 09e9cb547a am: 5bd5a3a9f8 am: 295f8525be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1504833

Change-Id: I488f5bd18a42b465cf3b4be18de81a91100a6d14
2020-11-20 02:32:03 +00:00
Jiyong Park
295f8525be Merge "Reorganize apex/apex.go" am: 09e9cb547a am: 5bd5a3a9f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1504833

Change-Id: I66fb800655fbbc82c320313c27e749ce3e1bf39e
2020-11-20 02:07:53 +00:00
Jiyong Park
e4758ed844 Documenting android/apex.go
Mostly documentation changes, but includes a few refactorings like
changing the variable names, reording functions, reordering statements
in logical order, etc.

Bug: 173472337
Test: m
Change-Id: I000c76e818722ed06bac03d9de87588b23552b08
2020-11-20 10:07:19 +09:00
Jiyong Park
8e6d52f362 Reorganize apex/apex.go
The source code is reorganized following the order of the execution for
better readability. The order is as follows:

1) init
2) properties
3) module struct
4) deps mutator
5) post-deps mutator
6) generate build actions
7) module initialization for different sub types
8) misc (e.g. apex_available check, etc.)

Behavior is not touched.

Bug: 173472337
Test: m
Merged-In: I919fca468fa376273d498029e6ac2fa37998a4a6
Change-Id: I919fca468fa376273d498029e6ac2fa37998a4a6
2020-11-20 08:44:55 +09:00
Colin Cross
ba9cb68851 Merge "Replace android.WriteFile rule with android.WriteFileRule" am: 1af783fae7 am: e37a8e2d51 am: 104085c573
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498169

Change-Id: Iddd550168d954a2c53d8f043b9a3f0db7348d5f8
2020-11-17 00:25:35 +00:00
Colin Cross
104085c573 Merge "Replace android.WriteFile rule with android.WriteFileRule" am: 1af783fae7 am: e37a8e2d51
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498169

Change-Id: I016d612e91f099b0291771d040a42f24ec34154c
2020-11-17 00:11:09 +00:00
Colin Cross
1af783fae7 Merge "Replace android.WriteFile rule with android.WriteFileRule" 2020-11-16 23:11:41 +00:00
Jooyung Han
920ce56b99 Remove "apex_uses" mutator am: 74f576de58 am: 1ff456f5de am: 7126f7958d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498491

Change-Id: Ie3ee836923bb65fb7172a7ca5a0102a0e16965e1
2020-11-16 13:32:57 +00:00
Jooyung Han
7126f7958d Remove "apex_uses" mutator am: 74f576de58 am: 1ff456f5de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498491

Change-Id: I287abdc10e5de20750adfc64a6d909f1e31fe26e
2020-11-16 13:15:52 +00:00
Jooyung Han
74f576de58 Remove "apex_uses" mutator
which was added to support built-time common apex. But the common apex
was abandoned and it is used nowhere.

This is a manual revert of 5c998b9ff8.

Bug: 173329465
Test: m
Change-Id: I684e6b8bfe2ef5b53943329f4aaa5a5ccba27738
2020-11-16 09:08:30 +00:00
Colin Cross
cf371cc1f7 Replace android.WriteFile rule with android.WriteFileRule
The android.WriteFile rule takes careful escaping to produce the
right contents.  Wrap it in an android.WriteFileRule that handles
the escaping.

Test: compare all android.WriteFile outputs
Change-Id: If71a5843af47a37ca61714e1a1ebb32d08536c31
2020-11-14 16:26:00 -08:00
Treehugger Robot
5f3bbae64b Merge "Pass Config to NewTestContext instead of ctx.Register" am: ceed6be00d am: 748ecd135f am: b8316056fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1480601

Change-Id: I7440d64296961910d6c1047cde11e8b29f37b7cb
2020-11-14 07:04:45 +00:00
Treehugger Robot
b8316056fe Merge "Pass Config to NewTestContext instead of ctx.Register" am: ceed6be00d am: 748ecd135f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1480601

Change-Id: I2be87bd643ea2352f3de3579b43f0afe7abd55a4
2020-11-14 06:43:49 +00:00
Colin Cross
ae8600b507 Pass Config to NewTestContext instead of ctx.Register
Prepare for using Config when adding singletons by passing
Config to NewTestContext and NewContext instead of to ctx.Register.
This will enable a followup change to store SingletonMakeVarsProviders
registered on the Context in the Config, which is necessary to run
multiple tests in parallel without data races.

Test: all soong tests
Change-Id: Id229629a4e42ff4487d317241673837726c075fc
2020-11-12 10:07:49 -08:00
Anton Hansson
ccde16f88c Merge "Make apex modules support tagged dists" am: fabdd28fdb am: afe209bdad am: 2a54e56ef9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496336

Change-Id: I45c0bdfc3eb0b0fc7626b23ace632a70e3b3f57b
2020-11-12 09:48:21 +00:00
Anton Hansson
2a54e56ef9 Merge "Make apex modules support tagged dists" am: fabdd28fdb am: afe209bdad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496336

Change-Id: If5928370895562efbb392a751978a716dcbb6418
2020-11-12 09:35:55 +00:00
Anton Hansson
82d502a7b2 Make apex modules support tagged dists
Bug: 172951145
Test: m dist my_dist_target (with patch in bug)
Change-Id: I0da4568a49ea48efbf864614a7e7c647f251a7ce
2020-11-11 12:34:20 +00:00
Nikita Ioffe
ed2d774c41 DO NOT MERGE: update apex/allowed_deps.txt
Test: presubmit
Bug: 172824175
Change-Id: Iff22f74889c88b73a913425445e3b3e827a20377
2020-11-09 19:21:48 +00:00
Nikita Ioffe
aed3c6b7b7 Update apex/allowed_deps.txt
Test: presubmit
Bug: 172791253
Merged-In: I5f3d834687121ba967d1e3aeb301c87679b2078d
Change-Id: I46549088749604c42390bb27e59f61edd25149d6
2020-11-09 15:23:27 +00:00
Treehugger Robot
320e6bbd7b Merge "Define product_available property" am: 25b0780f37 am: 779adff9e6 am: a993a3cd22
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1479576

Change-Id: Ieead4fbac401a530368c072ccb48874bee6a2ab6
2020-11-09 06:21:48 +00:00
Nikita Ioffe
af3ca9be6b Merge "Update apex/allowed_deps.txt" am: 3862cd509b am: 0f6410aeae am: 24b2833f50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1489477

Change-Id: If16d91b2c8269a8b24bead949c4291ecb25d7e2d
2020-11-09 06:21:19 +00:00
Treehugger Robot
25b0780f37 Merge "Define product_available property" 2020-11-09 00:40:50 +00:00
Justin Yun
63e9ec70bb Define product_available property
To make a module available to product variants, it must define
`product_available: true`. `vendor_available: true` will not create
product variants any more.
However, in this CL, we don't change the behavior of
`vendor_available` property. It still creates both variants. After we
update all Android.bp files that need to provide product variants
with `product_available: true`, we may upload the remaining patches.

Bug: 150902910
Test: lunch aosp_arm64-userdebug && m
Change-Id: I0fd5be7bbae2c45d5cab3c3c2ca49f53a9b6f975
2020-11-08 23:53:22 +00:00
Nikita Ioffe
3862cd509b Merge "Update apex/allowed_deps.txt" 2020-11-06 12:46:39 +00:00
Nikita Ioffe
77e1d4b4e5 Update apex/allowed_deps.txt
Bug: 171330443
Bug: 171668006
Test: build/soong/scripts/update-apex-allowed-deps.sh
Change-Id: I5f3d834687121ba967d1e3aeb301c87679b2078d
Merged-In: I5f3d834687121ba967d1e3aeb301c87679b2078d
2020-11-05 21:46:26 +00:00
Nikita Ioffe
ae29cb45f2 Update apex/allowed_deps.txt
Test: build/soong/scripts/update-apex-allowed-deps.sh
Bug: 172564863
Merged-In: I5faa49deae62b1a612f88938555f55a586b8175f
Change-Id: I73b5510254dee638955609695a96d465267507f2
2020-11-05 15:56:56 +00:00