Commit Graph

2576 Commits

Author SHA1 Message Date
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
chaviw
c471d8e869 Added dependant libaries to apex for ExtServices
ExtServices needs to add dependencies on three libraries so they need to
be added to apex to build.

Test: Build
Bug: 155825630
Change-Id: Ic7bd33fe24133fbe1b2cbab36fd047e7e41ef75d
2020-12-01 12:22:54 -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
Ytai Ben-tsvi
b194024fd1 Merge "Add libraries to media apex" 2020-11-30 17:43:28 +00:00
Jiyong Park
5ae5d402a6 Merge "rust modules can be included in apex" am: fdea25781f am: 88365d1894 am: a9faa25e54
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508096

Change-Id: I777278628c5a2f3b73af5e962ecee85ead75ecc2
2020-11-30 17:40:31 +00: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
8cc4e69fa9 Merge "Remove redundant setting of DistFiles by apexBundle" am: 11402caa47 am: ba5ddbd78c am: 53a3c6f30f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511915

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

Change-Id: Iaeabd527ddd1c287be3a72209df15ad24f352894
2020-11-30 13:54:36 +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
b92e1c5b64 Merge "Documenting apex/builer.go" am: 9c4c534d25 am: 024e2442bc am: 403cc39d4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1509688

Change-Id: Ic5bcb551c012b0cf3664567470c2564f34f4cd4a
2020-11-27 02:03:18 +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
Neil Fuller
0ec39cfd6e Merge "Add dependencies needed for .jar in the geotz apex" 2020-11-24 10:45:57 +00:00
Treehugger Robot
8623f235a2 Merge "Documenting apex/apex.go" am: 333d235475 am: bca26b52d2 am: 656b1247bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505673

Change-Id: Ide7307ea4e76d8af88accc10ef30087adf5a1491
2020-11-24 09:51:36 +00: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
c37ff19e40 Merge "Documenting android/apex.go" am: b26070efef am: 7ea5837252 am: edb17b5f22
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502070

Change-Id: I32fd2ffd7726c07c0ccd71cfaf9e1ca2e6412098
2020-11-23 01:52:33 +00: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
Neil Fuller
8ccc8aa7f8 Add dependencies needed for .jar in the geotz apex
Add dependencies needed for a .jar in the geotz apex.

Test: build / boot
Bug: 172546738
Change-Id: I76785a4843ce5d3113b891ae6947d827efddb2df
2020-11-20 19:41:03 +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
Jiyong Park
8638972d35 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
Change-Id: I919fca468fa376273d498029e6ac2fa37998a4a6
2020-11-19 18:24:07 +09:00
Ytai Ben-Tsvi
dbc3c0ac01 Add libraries to media apex
These are transitive dependencies of libaudioclient, which got
refactored.

Test: Compiles
Change-Id: I5a7a5c98703ac7efc79a2f37b5f65a3b923fc9c5
2020-11-18 15:53:31 -08:00
Colin Cross
b1ed155759 Merge "Replace android.WriteFile rule with android.WriteFileRule" am: 1af783fae7 am: e37a8e2d51 am: 104085c573 am: ba9cb68851
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498169

Change-Id: I46cf9e2375924e1ac47f2163587f87aa70e2c940
2020-11-17 01:49:26 +00: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
6e7dac2caf Remove "apex_uses" mutator am: 74f576de58 am: 1ff456f5de am: 7126f7958d am: 920ce56b99
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498491

Change-Id: I8985e5f5ea23e3309de772a664357b31d4913264
2020-11-16 14:01:49 +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
5789a1b32f Merge "Pass Config to NewTestContext instead of ctx.Register" am: ceed6be00d am: 748ecd135f am: b8316056fe am: 5f3bbae64b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1480601

Change-Id: Ib69b3a789c2de2c83be8a299eafa0740af306081
2020-11-14 07:18:40 +00: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