Commit Graph

2313 Commits

Author SHA1 Message Date
Paul Duffin afdd4061ee Rename OptionalPath.RelativeToPath -> RelativeToTop
Bug: 183650682
Test: m nothing
Change-Id: I95239c2273e715e8c4c15a4a02967e01f6913234
2021-03-30 20:06:22 +01:00
Paul Duffin a71a67a4f5 Remove extraneous calls to TestingBuildParams.RelativeToTop()
Deprecated the method to try and prevent any other uses being added.

Bug: 183650682
Test: m nothing
Change-Id: Ia6f43851e5a00c9d96af780e3bd21e03175e1a2f
2021-03-30 20:03:22 +01:00
Paul Duffin e8366da1f6 Automatically call TestingBuildParams.RelativeToTop()
Fixes the few tests that break due to this and which cannot easily be
separated into their own changes.

Bug: 183650682
Test: m nothing
Change-Id: Ia2f31213a1f114a78e66a81d89279ecde9f4c465
2021-03-30 19:35:35 +01:00
Paul Duffin b19122a9f6 Merge "Add the transitive dependencies of boot_image to apex" am: 58367574a5 am: 023bd16632 am: 9b7d7f45f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652623

Change-Id: Id3cc4bc9ecaaa4ae789e7d79ebce575f9760bdda
2021-03-30 18:32:11 +00:00
Paul Duffin 3c26d90d66 Merge "Stop JavaSdkLibrary_... tests requiring absolute path" am: da0470d8c7 am: 9542ba405f am: c9e51d0f74
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1654683

Change-Id: I5c5fc95ac48eb887223c5ebee85330b72a261348
2021-03-30 18:32:05 +00:00
Paul Duffin 03802c1edc Merge "Remove buildDir from apex package" am: a33da07343 am: 4ecf1ee4c5 am: d26d5bc45b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1654682

Change-Id: Ia7c2f88892ac2fad12b83fb641655fbee571e404
2021-03-30 18:32:00 +00:00
Paul Duffin a230ea4687 Merge "Add contents property to boot_image (and prebuilt_boot_image)" am: 8d3c44a986 am: b8f0b4e1bf am: af5736ea92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652622

Change-Id: Idb92c709d8bf17e3e00905ea54b9ee2bc901bbac
2021-03-30 18:31:51 +00:00
Paul Duffin 58367574a5 Merge "Add the transitive dependencies of boot_image to apex" 2021-03-30 16:42:07 +00:00
Paul Duffin da0470d8c7 Merge "Stop JavaSdkLibrary_... tests requiring absolute path" 2021-03-30 16:35:23 +00:00
Paul Duffin a33da07343 Merge "Remove buildDir from apex package" 2021-03-30 16:30:10 +00:00
Paul Duffin 8d3c44a986 Merge "Add contents property to boot_image (and prebuilt_boot_image)" 2021-03-30 16:26:20 +00:00
Martin Stjernholm 2f1e93ef36 Merge changes Iaa6411b5,I2118b8a2,Ibbdd3cbd,I2d1bbda2 am: 38e9f0b82f am: 99f29d244a am: c5c5d80d30
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652620

Change-Id: I09a93351bcae2c27531fd258ddacdd8bc5ddd474
2021-03-30 12:42:38 +00:00
Martin Stjernholm 4d058c8809 Allow dependencies from platform variants to APEX modules.
When `test_for` dependencies are added from libraries to APEX modules,
they can be created from the platform variants of the libraries, since
those are used for building tests. Hence we need an alias from the
platform variant of the APEX module to have a target for those
dependencies.

This is only necessary for libraries that are split by the APEX
mutator, i.e. is a member of some APEX. Normally that's not the case
for test libraries, but there may be exceptions (read
com.android.art.testing).

Test: m nothing
Bug: 183882457
Change-Id: I68affdf69d7ec05c0ee8730e8ec04d7cb9e0e44a
2021-03-30 12:43:45 +01:00
Martin Stjernholm 38e9f0b82f Merge changes Iaa6411b5,I2118b8a2,Ibbdd3cbd,I2d1bbda2
* changes:
  Make test_for arch variant.
  Don't use APEX stubs between internal libs in the same APEX when building test_for modules.
  Add FilterListPred.
  Don't panic on "go test" invocations from the command line.
2021-03-30 09:26:36 +00:00
Paul Duffin c434921028 Merge "Add dependencies for art boot_image" am: 16e6aeeb51 am: d019752f73 am: 78dd45f054
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652451

Change-Id: If37ae085694aa93924dce1548fad89b05fdfd8b0
2021-03-29 22:07:06 +00:00
Paul Duffin cf8d7db02b Stop JavaSdkLibrary_... tests requiring absolute path
Bug: 183650682
Test: m nothing
Change-Id: Ia6e5034bbf3920a9e1f8fc319dc722658f6cb1ce
2021-03-29 17:29:30 +01:00
Paul Duffin 37ba344e40 Remove buildDir from apex package
Bug: 182885307
Test: m nothing
Change-Id: I71cbfd79e2fb4b1cbd2914ffab76570548d57c61
2021-03-29 17:29:30 +01:00
Paul Duffin 4d101b60f0 Add the transitive dependencies of boot_image to apex
This avoids having to specify boot libraries in both the boot_image
and separately as java_libs on the apex. Simply add them to the
boot_image (happens automatically ATM when using image_name: "art")
and add the boot_image to the apex.

Bug: 177892522
Test: m nothing
Change-Id: I7e0c41665604b73780cdf0dc555067497b1e6ef0
2021-03-29 17:15:29 +01:00
Paul Duffin 82886d6cbf Add contents property to boot_image (and prebuilt_boot_image)
Allows boot_image modules to be created for any module that contributes
to the boot class path, e.g. core-i18n from the com.android.i18n.

A boot_image module with a contents property cannot specify an
image_name, and vice versa. Only those boot_image modules with an
image_name create .art, .oat and .vdex files, either in their
associated APEX or as part of the framework "boot" image.

Bug: 177892522
Test: m nothing
Change-Id: Idfc2bcf00dd6d3ed36ac4df46fcf18e8aa7e2c92
2021-03-29 17:15:27 +01:00
Paul Duffin c7ef9892dd Add dependencies for art boot_image
Adds dependencies for the art boot image. The art boot image only
includes modules from the com.android.art APEX and so this change adds
some verification to make sure that the APEX component of the
configuration is compatible with the boot_image's apex_availabilty
settings and then just adds dependencies on the modules. It relies on
the normal APEX processing to cause the com.android.art variant of the
boot_image to depend on the equivalent variant of its contents.

This purposely does not check that the configuration specifies an APEX
of com.android.art and instead relies on the apex_available property
being set.

Bug: 177892522
Test: m nothing
Change-Id: I75a8238546b01e1f166a1d1444215f4afb441780
2021-03-29 17:13:29 +01:00
Paul Duffin e06a34d148 Merge "Add bootclasspath_fragment as an alias for boot_image" am: 755b10fe53 am: 0c541b7c1d am: 3e56890e1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655217

Change-Id: I8e7eea3b7e1b1b0a47e24c800ffce33f9943e107
2021-03-29 15:42:23 +00:00
Paul Duffin 9139488505 Merge "Make apex/boot_image_test.go more realistic" am: 1b3d4923c1 am: 86ce9334bf am: a4749563a0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652448

Change-Id: I8e8c608d4e0215e41ce151271af00a0a58fcb7f5
2021-03-29 14:19:47 +00:00
Paul Duffin 815e678497 Merge "Prune test preparers in apex/boot_image_test.go" am: 0839101430 am: 9d0d498922 am: 74d71d7848
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652447

Change-Id: Ie996b7282450f3b564f9a1eb2e1d501cb094e736
2021-03-29 10:52:47 +00:00
Paul Duffin 8692ee5aec Merge "Prevent apex from using preferred prebuilt_boot_image" am: fed8df3424 am: d1255ed19a am: 53a2dcc01c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647168

Change-Id: I18db745fe57692c288ae83fed482852f6522803e
2021-03-29 10:52:40 +00:00
Paul Duffin 4b64ba05b6 Add bootclasspath_fragment as an alias for boot_image
This is part of the work to rename boot_image to bootclasspath_fragment
which is being done for two reasons:
1. To avoid clashing with the bootimg module type.
2. To better reflect what this represents.

While a bootclasspath_fragment can create what ART calls a boot image
(which is different to what the bootimg module type represents) it does
not have to do so.

Bug: 177892522
Test: m nothing
Change-Id: Ib45604be7adc790ded9e27a2ac812dd7522ca8db
2021-03-29 11:05:55 +01:00
Paul Duffin 9ea71c0f4f Make apex/boot_image_test.go more realistic
Previously it was unrealistic because the "boot" image cannot be added
to an apex (because it references modules from multiple different
apexes). Only the "art" image can be added to an apex. So, this change
switches to use the "art" image which requires the apex name is changed
to "com.android.art".

This change also adds an equivalent test for prebuilt_boot_image as
well as a check of the module dependencies for the mybootimage module.

Bug: 177892522
Test: m nothing
Change-Id: I20089b02c80bedc072dbb950dce09bc4e8397f3a
2021-03-29 11:05:55 +01:00
Paul Duffin 52bfaa43f9 Prune test preparers in apex/boot_image_test.go
Cut down the preparers to only those needed by these tests.

Bug: 177892522
Test: m nothing
Change-Id: I811977b0331dd38c25623aa96e09e85ba5cf7c57
2021-03-28 23:02:18 +01:00
Paul Duffin 396229f7cf Prevent apex from using preferred prebuilt_boot_image
Bug: 177892522
Test: m nothing
Change-Id: I8530ffa4c5123f6055a6ca25421c17bb6fc037f0
2021-03-28 23:02:18 +01:00
Martin Stjernholm 4e6c269de5 Don't use APEX stubs between internal libs in the same APEX when
building test_for modules.

This extends the current approach where test modules always depend on
the platform variants of the APEX libs, and only skips the stubs on
them. It still has the limitation that the internal libs must have the
exact same apex_available lists.

Also some improvement of the test accuracy in TestTestFor.

Test: m libartagent-target
  with http://r.android.com/q/topic:libdexfile-noext applied
Bug: 183217299
Change-Id: I2118b8a22c887077867a3ddbbe73437b4a29a6ad
2021-03-28 22:06:34 +01:00
Paul Duffin c5296cd586 Merge "Disallow non-existent paths in sdk package" am: 863ecfb7ba am: a48aed59ee am: 146b43cc63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647171

Change-Id: Ic3aa5af880a293457d5303b362c38421591f55e2
2021-03-25 19:47:49 +00:00
Paul Duffin db462dd987 Disallow non-existent paths in sdk package
Test behavior was changed a while ago so that tests by default ignore
non-existent source paths (unless they explicitly check for/rely on
them). Prior to that CheckSnapshot() could detect when files were
missing from the snapshot but it no longer can.

This change disallows non-existent source files in all the sdk tests
which means that they are disallowed when processing the snapshots as
they use the same preparers as were used to process the sources.

This caused a test failure which has been temporarily ignored and has
a TODO and bug associated with it.

Bug: 183184375
Test: m nothing
Change-Id: I969d8515d20ef5ae515f2b5f93d8ed4e4f8ede75
2021-03-25 12:53:22 +00:00
Paul Duffin c80f01ee04 Merge "Convert test that disallows non existent paths to use fixtures" am: e742ee14f8 am: 4a08263f48 am: cd3cc29952
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647169

Change-Id: I2e08b61169a01a256e87da0d5ff338c83751814f
2021-03-25 10:52:55 +00:00
Paul Duffin 49ed211c7a Merge "Cleanup usages of Dex2oatDepTag" am: 958408d921 am: 15204cf1ea am: 6a8ac75e6a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652452

Change-Id: If6f759f545421848c466659e1cd8ccc80ef50e4b
2021-03-24 23:51:28 +00:00
Paul Duffin 76e5c8a37f Convert test that disallows non existent paths to use fixtures
This change needed to add some additional files to the registered
files for PrepareForTestWithJavaDefaultModules because otherwise they
would fail when "TestAllowNonExistentPaths = false". Those files were
being added by the TestJavaLintRequiresCustomLintFileToExist (albeit in
some cases in different locations to that required by the default
modules but as the files are needed by the modules defined in
PrepareForTestWithJavaDefaultModules they should be defined in it.

A couple of other places also provided some files so moving them into
PrepareForTestWithJavaDefaultModules caused some conflicts which needed
to be resolved.

Bug: 183184375
Test: m nothing
Change-Id: I76ce9f1673c1c1c4000635b76b8377d582224bf1
2021-03-24 22:08:05 +00:00
Paul Duffin b506c9dc11 Cleanup usages of Dex2oatDepTag
Creates a new deptag type for it so that it can implement the marker
interfaces that will exclude it from being added to the APEX and from
visibility enforcement. The latter is probably not an issue ATM because
the dependencies are added after visibility checks are enforced but
this code is undergoing lots of refactoring so that may change.

Bug: 177892522
Test: m nothing
Change-Id: Ibd167d557adec761a2e3eed78f4d334c40a04fb9
2021-03-24 14:34:40 +00:00
Paul Duffin 9a7e792892 Remove emptyFixtureFactory from apex and java am: 70d3bee3e0 am: 752a5a2122 am: 231efa2172
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647204

Change-Id: Ie33180b91d67f4b178c44fd9ad526e00f74e263a
2021-03-23 00:01:31 +00:00
Paul Duffin c08e88340b Merge "Ensure that DepIsInSameApex is not called for ExcludeFromApexContentsTag" am: 6bef6fee3c am: abe8504ce1 am: 38a15cd52c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1645680

Change-Id: I9f42df334b69ce45f16ad610ee322230985a02d7
2021-03-22 20:38:29 +00:00
Paul Duffin 70d3bee3e0 Remove emptyFixtureFactory from apex and java
Bug: 183235980
Test: m nothing
Change-Id: I350b45e2f57430fb158f4141a566e75de17208cd
2021-03-22 18:31:53 +00:00
Paul Duffin 6bef6fee3c Merge "Ensure that DepIsInSameApex is not called for ExcludeFromApexContentsTag" 2021-03-22 18:30:10 +00:00
satayev 670ae1967f Merge changes from topic "move_allowed_deps_txt" am: 2b077baa5e am: 0ee372ad6f am: 3c5d96925f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1645088

Change-Id: I568df8371fb3eab090d417469c9d78a27be9d527
2021-03-22 12:45:29 +00:00
satayev 2b077baa5e Merge changes from topic "move_allowed_deps_txt"
* changes:
  Treat allowed_deps.txt source file as optional.
  Move allowed_deps.txt to packages/modules/common.
2021-03-22 10:48:45 +00:00
Paul Duffin cba0e1518f Merge "Cleanup the now unused testCustomizer" am: 50e49818a3 am: a1cf464f06 am: 605946671c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647199

Change-Id: Ieecab8e619eb27345b86269692a31a1ada75eb57
2021-03-22 10:00:22 +00:00
Paul Duffin 7ae8fc2a6c Merge "Convert test specific customizers to FixturePreparers" am: b535616a84 am: b7f2455646 am: 3fa8037bde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647198

Change-Id: I6df4da9131ce4da86babe0d7977dcb04fcf0a8ba
2021-03-22 10:00:14 +00:00
Paul Duffin 710c370485 Merge "Convert shared customizer functions to return FixturePreparers" am: 7ba0448314 am: 47e8b9af4e am: 85ca23b70e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647197

Change-Id: I223001416be6cc38c55ae4415536a0740a43e48f
2021-03-22 10:00:05 +00:00
Paul Duffin 992c564089 Merge "Allow test handlers to be either FixturePreparer or testCustomizer" am: 241f547365 am: 8381f3c74e am: d80d2f227a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1629633

Change-Id: Idd57f47b037c65dbcd4f106b5fcd4b7413c5fe1a
2021-03-22 09:59:56 +00:00
Paul Duffin 1c62e2eaa6 Merge "Convert apex/boot_image_test.go to use test fixtures" am: 043427b276 am: e20b5ea05e am: 8b92fdf019
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626508

Change-Id: Ie9919a542222bf117b50cbc4385f7309bea723ae
2021-03-22 09:59:47 +00:00
Paul Duffin 40931a80f3 Merge "Switch testApex and related methods to use test fixtures" am: 32b0e07228 am: 7b1a647d0d am: 0cd1c99cbd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626507

Change-Id: If591adb259ad8a8e7039bb283743b89c34b848f8
2021-03-22 09:59:38 +00:00
Paul Duffin 605946671c Merge "Cleanup the now unused testCustomizer" am: 50e49818a3 am: a1cf464f06
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647199

Change-Id: I5ad22fc23ae556c01adb415d7639efda1bbb23b9
2021-03-22 09:15:22 +00:00
Paul Duffin 3fa8037bde Merge "Convert test specific customizers to FixturePreparers" am: b535616a84 am: b7f2455646
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647198

Change-Id: I71c78c371952d89aa742e07f5f412536c554c4c4
2021-03-22 09:15:14 +00:00
Paul Duffin 85ca23b70e Merge "Convert shared customizer functions to return FixturePreparers" am: 7ba0448314 am: 47e8b9af4e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647197

Change-Id: I3b9cf01007f3cd29bb0e8a363330d3e4ddb960cf
2021-03-22 09:15:07 +00:00
Paul Duffin d80d2f227a Merge "Allow test handlers to be either FixturePreparer or testCustomizer" am: 241f547365 am: 8381f3c74e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1629633

Change-Id: I0187b3dcb18c4bb465b26c52098fcbc6feec6218
2021-03-22 09:15:00 +00:00
Paul Duffin 8b92fdf019 Merge "Convert apex/boot_image_test.go to use test fixtures" am: 043427b276 am: e20b5ea05e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626508

Change-Id: I261edc986b7f2489fdab0c7f3798d96f4d124933
2021-03-22 09:14:51 +00:00
Paul Duffin 0cd1c99cbd Merge "Switch testApex and related methods to use test fixtures" am: 32b0e07228 am: 7b1a647d0d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626507

Change-Id: Ic0de1a6802431c736f963e9843a05693d7cee7d4
2021-03-22 09:14:43 +00:00
Paul Duffin 4c3e8e2d67 Ensure that DepIsInSameApex is not called for ExcludeFromApexContentsTag
The ExcludeFromApexContentsTag marker interface was added to avoid
every implementation of DepIsInSameApex() from having to deal with the
special tags, like PrebuiltDepTag. Unfortunately, when adding that
not all calls to DepIsInSameApex() were protected which meant that the
BootImageModule, which panics if it doesn't recognize a tag, was
causing failures. This change documents the need and improves the
consistency.

A follow up change will add a test for this.

Bug: 182992071
Test: m nothing
Change-Id: If0bf9a7447ebf7a0bb0c88e91951a7220d4af45c
2021-03-22 08:43:55 +00:00
Paul Duffin 40b6257dc1 Cleanup the now unused testCustomizer
Bug: 181070625
Test: m nothing
Change-Id: I825e0da53b7fd82f4ef33d7183351c1f2ed8ee23
2021-03-20 11:42:48 +00:00
Paul Duffin 0a49fdca0b Convert test specific customizers to FixturePreparers
Bug: 181070625
Test: m nothing
Change-Id: I1c4b7303a1153b040b7266e95b06d172554dc52a
2021-03-20 11:39:23 +00:00
Paul Duffin 810f33d9ee Convert shared customizer functions to return FixturePreparers
Bug: 181070625
Test: m nothing
Change-Id: I8d09f91a3db23eb36cd73a13e418df98949ec72d
2021-03-20 11:33:03 +00:00
Paul Duffin 2be9dcd3aa Allow test handlers to be either FixturePreparer or testCustomizer
This allows the testCustomizers to be switched to FixturePreparers
incrementally rather than in one go.

Bug: 181070625
Test: m nothing
Change-Id: Idd9d2e28abf9b17fc46b5566ab8d3affa330287e
2021-03-20 10:25:45 +00:00
Paul Duffin 34d433ad7e Convert apex/boot_image_test.go to use test fixtures
Bug: 181070625
Test: m nothing
Change-Id: I940353e32233317d9e932b2d61908125e4c33766
2021-03-20 10:25:45 +00:00
Paul Duffin e05480ac47 Switch testApex and related methods to use test fixtures
Bug: 181070625
Test: m nothing
Change-Id: Icdd9c3d807d5497ef85946a877c6cd4b4af045bc
2021-03-20 10:25:45 +00:00
Justin Yun 43ad83767b Merge "Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__" am: b1d5479783 am: 2d0020dbbd am: 76e4387707
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620648

Change-Id: I507c493b93fc1fdfefe7f2d01e50e2c22e036368
2021-03-19 01:50:55 +00:00
Justin Yun 76e4387707 Merge "Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__" am: b1d5479783 am: 2d0020dbbd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620648

Change-Id: Ic0accb0b64f1034ed41ebeb8bc3e583678d114a9
2021-03-19 01:07:17 +00:00
Justin Yun b1d5479783 Merge "Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__" 2021-03-18 23:33:43 +00:00
Paul Duffin df06ca4ed2 Merge "Prevent ApexInfoMutator from creating unnecessary variants" am: b72dd403de am: 03cf98057f am: 351ae039aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642102

Change-Id: Iecfaa2ee6623155e8bd0a485e59ceb10a75bbc5c
2021-03-18 17:30:03 +00:00
Paul Duffin 351ae039aa Merge "Prevent ApexInfoMutator from creating unnecessary variants" am: b72dd403de am: 03cf98057f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642102

Change-Id: I395372d6b1088789330644214d8aec41a8a6370a
2021-03-18 16:30:14 +00:00
Paul Duffin c76957fd75 Merge "Add prebuilt_platform_compat_config" am: d5065cfc66 am: c5b7854036 am: 8185bd8586
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642109

Change-Id: Ifb7ff86d694146b0bbc30ca607bf160cd4ce7911
2021-03-18 15:19:19 +00:00
Paul Duffin d46309e3ad Merge "Correct typo in the name of compatConfigTag" am: 603fa13e08 am: 7eccf3774b am: 0176573920
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642108

Change-Id: I57c8dda9dfc4eac6d6b1e51de84fb70b01ec6109
2021-03-18 15:16:53 +00:00
Paul Duffin 26b1da534b Merge "Allow apex dependencies to be restricted to source modules only" am: c0a5ccbf3b am: 69f4244007 am: 25703000a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642107

Change-Id: I1aa04096592ef837d29dde57c8a53b117143c9fd
2021-03-18 15:16:46 +00:00
Paul Duffin b72dd403de Merge "Prevent ApexInfoMutator from creating unnecessary variants" 2021-03-18 15:13:39 +00:00
Paul Duffin 8185bd8586 Merge "Add prebuilt_platform_compat_config" am: d5065cfc66 am: c5b7854036
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642109

Change-Id: I85be48a0c65bc9caa2e2d4b7063ac41ec2581b6c
2021-03-18 13:12:21 +00:00
Artur Satayev b77b0c5e05 Treat allowed_deps.txt source file as optional.
Not all branches have packages/common/module, which breaks the build
for them.

Bug: 179234385
Test: removed allowed_deps.txt && m apex-allowed-deps-check
Change-Id: I38f47c7200e1afbd899e29843d0214bef826fcf9
2021-03-18 11:15:33 +00:00
Paul Duffin 0176573920 Merge "Correct typo in the name of compatConfigTag" am: 603fa13e08 am: 7eccf3774b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642108

Change-Id: I68e973776e85b2966ca182eb21d9fa4296c2cee0
2021-03-18 09:13:44 +00:00
Paul Duffin 25703000a5 Merge "Allow apex dependencies to be restricted to source modules only" am: c0a5ccbf3b am: 69f4244007
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642107

Change-Id: I97bdc2f4f20f15bc72708f461eb05d9f2a2e597d
2021-03-18 09:13:38 +00:00
Paul Duffin 573989d821 Prevent ApexInfoMutator from creating unnecessary variants
Adds the AlwaysRequireApexVariantTag interface to enable
ApexInfoMutator to differentiate between a tag that is excluded from
apex contents but still requires an apex variant and a tag that is
excluded from apex contents and does not require an apex variant.

That is needed to support the sdkMemberVersionedDepTag which excludes
the target from being added to the APEX but requires an APEX variant.
A more detailed explanation is in the comments.

The AlwaysRequireApexVariant() method follows the pattern used in
ReplaceSourceWithPrebuilt of having a method that returns a bool to
trigger the behavior and not say ExcludeFromApexContentsTag that simply
relies on the tag implementing an interface to trigger. That is because
the former is more flexible and allows a tag type to parameterize the
behavior if necessary.

The tags that this will exclude from creating an apex variant are:
* PrebuiltDepTag - by the time the apex variant has been created any
  preferred prebuilts will have replaced the sources so there is no
  need to create an APEX variant if the only dependency path from the
  APEX to the prebuilt is via this tag.
* hiddenApiAnnotationsDependencyTag - the target of which is a purely
  build time artifect and MUST NEVER end up in the APEX.

It will also stop calling DepIsInSameApex for any dependency created
by the sdkMemberVersionedDepTag. Which will fix the issue reported in
the bug.

Bug: 182992071
Test: m nothing
Change-Id: I9569e488d6446ca45d3ea8f32a9b74524eb865df
2021-03-18 09:05:28 +00:00
TreeHugger Robot b39e6fa1ad Merge "Move allowed_deps.txt to packages/modules/common." into rvc-qpr-dev-plus-aosp 2021-03-17 21:02:33 +00:00
Paul Duffin 1b29e003f3 Add prebuilt_platform_compat_config
It just provides the metadata needed by the global singleton as the
rest is in the apex.

Bug: 182402754
Test: m nothing
Change-Id: I511df7a3a06dab13ddb9ad63392ae5310dfee9c4
2021-03-17 18:16:31 +00:00
Paul Duffin 0b8177873a Correct typo in the name of compatConfigTag
It was called compatConfigsTag which is inconsistent.

Bug: 182402754
Test: m nothing
Change-Id: I4636d72cee53b361f3b0ab17789e61a439c34edf
2021-03-17 18:16:31 +00:00
Paul Duffin 8c535dad36 Allow apex dependencies to be restricted to source modules only
An upcoming change to create a prebuilt_platform_compat_config module
will break if the apex tries to use it instead of a
platform_compat_config because the former does not provide all the
information that the apex needs. This change will allow the
compatConfigsTag to be configured to prevent the prebuilt from being
used even when it is preferred.

Bug: 182402754
Test: m nothing
Change-Id: Ib9dc06c038f7cf3fc229f3c4d2b025335a4715b4
2021-03-17 18:16:31 +00:00
Artur Satayev f67c06a7f5 Move allowed_deps.txt to packages/modules/common.
Bug: 179234385
Test: run update-apex-allowed-deps.sh locally
Change-Id: I8e8864468b87342c688d001bc5f6e6f8416863ed
Merged-In: I8e8864468b87342c688d001bc5f6e6f8416863ed
2021-03-17 15:26:16 +00:00
Artur Satayev fdb61edf43 Move allowed_deps.txt to packages/modules/common.
Bug: 179234385
Test: run update-apex-allowed-deps.sh locally
Change-Id: I8e8864468b87342c688d001bc5f6e6f8416863ed
Merged-In: I8e8864468b87342c688d001bc5f6e6f8416863ed
2021-03-17 13:44:16 +00:00
TreeHugger Robot a089ef0de4 Merge "Move allowed_deps.txt to packages/modules/common." into sc-dev 2021-03-16 17:45:34 +00:00
Paul Duffin cdf2426d76 Switch platform_compat_config to use common arch am: 4defbf4d39 am: 75c51ba191 am: e9292b1459
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638281

Change-Id: I43f4b4ff67f19326ba4124a4ed86ef4ce86feaef
2021-03-16 17:30:06 +00:00
Paul Duffin fc0b2c7f6b Disallow platform_compat_config modules in apex prebuilts property am: 1bc21dc7e6 am: c6df3b278a am: 3c54ef1e10
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638280

Change-Id: I62615c1ed2069dfed50c1a576dbd8f702ece662b
2021-03-16 15:46:29 +00:00
Artur Satayev 8dfcbe466c Move allowed_deps.txt to packages/modules/common.
Bug: 179234385
Test: run update-apex-allowed-deps.sh locally
Change-Id: I8e8864468b87342c688d001bc5f6e6f8416863ed
Merged-In: I8e8864468b87342c688d001bc5f6e6f8416863ed
(cherry picked from commit 732d6264210513b971205b5c9f1b2f49b9cafdf3)
2021-03-16 15:02:55 +00:00
Paul Duffin e9292b1459 Switch platform_compat_config to use common arch am: 4defbf4d39 am: 75c51ba191
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638281

Change-Id: I213738e09bee4613f93203b0dd6e935b07957114
2021-03-16 14:45:28 +00:00
Paul Duffin 3c54ef1e10 Disallow platform_compat_config modules in apex prebuilts property am: 1bc21dc7e6 am: c6df3b278a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638280

Change-Id: I3994109c2acb934d2be6039d8fdbf556b4783774
2021-03-16 14:45:17 +00:00
Paul Duffin c605053f97 Add new compat_configs property to the apex am: 3abc174cfd am: d4716ce5a6 am: f75ab18b5b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638279

Change-Id: I2cd91954b7fba10e1c5cbbef194fc365b3103745
2021-03-16 10:11:22 +00:00
Paul Duffin a13f1c8dc0 Convert TestCompatConfig test to use test fixtures am: a369c7b50d am: 28cae4ca6f am: 6fb02328eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626505

Change-Id: I852b9b300a6e98c765e3c968023399b1152faa20
2021-03-16 09:51:45 +00:00
Paul Duffin f75ab18b5b Add new compat_configs property to the apex am: 3abc174cfd am: d4716ce5a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638279

Change-Id: I3822016f85c030f27820538ba133ec007861417c
2021-03-16 08:05:09 +00:00
Paul Duffin 6fb02328eb Convert TestCompatConfig test to use test fixtures am: a369c7b50d am: 28cae4ca6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626505

Change-Id: Ief32c21320ead2b92f47b3e485e2c3736290903f
2021-03-16 08:05:05 +00:00
Paul Duffin 4defbf4d39 Switch platform_compat_config to use common arch
Bug: 182816033
Test: m nothing
Change-Id: If8886edd9278d67fe2b6288a6bd8b152f2314401
2021-03-15 23:19:39 +00:00
Paul Duffin 1bc21dc7e6 Disallow platform_compat_config modules in apex prebuilts property
Bug: 182816033
Test: m nothing
Change-Id: I50dcc358e8ae143e21b1fbf1a12835bf1342606f
2021-03-15 23:19:39 +00:00
Paul Duffin 3abc174cfd Add new compat_configs property to the apex
Bug: 182816033
Test: m nothing
Change-Id: I485d7b178c0ed17e336a6ac2a13e8313426f374b
2021-03-15 23:19:36 +00:00
Paul Duffin a369c7b50d Convert TestCompatConfig test to use test fixtures
As this test is the only test in the apex package to use the
platform_compat_config module type it does not make sense to include
that in all the tests so instead this converts the test to use fixtures
so it can easily customize it with the additional module type.

Bug: 181070625
Test: m nothing
Change-Id: I56fda772ee336db6cfb677143aa28b1a18911bff
2021-03-15 19:56:38 +00:00
satayev b5c1a74f5d Merge "Don't track modules that are only available to APEXes." am: 2338d6f6e4 am: ebfe02a781 am: 13c655bf29
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1628693

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8794765359558cfee7c9d1cb2ef74674a244f283
2021-03-15 14:11:23 +00:00
satayev 13c655bf29 Merge "Don't track modules that are only available to APEXes." am: 2338d6f6e4 am: ebfe02a781
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1628693

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I468324eaa0ed012feba41cbf99809c8bd6ea397c
2021-03-15 13:28:54 +00:00
Paul Duffin 8a63b042d5 Merge "Convert ...InstallHwasan.. tests to use fixtures" am: ef0449b0f3 am: feed9a6153 am: 972e1eafe0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626503

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5d49be067f9984b1497dde48d39a4b25d9dda6a3
2021-03-15 12:55:23 +00:00
satayev 2338d6f6e4 Merge "Don't track modules that are only available to APEXes." 2021-03-15 12:47:00 +00:00
Paul Duffin 972e1eafe0 Merge "Convert ...InstallHwasan.. tests to use fixtures" am: ef0449b0f3 am: feed9a6153
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626503

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I198ca31959a9f549af19344c136b30d6efd4cbe8
2021-03-15 12:12:47 +00:00
Paul Duffin ef0449b0f3 Merge "Convert ...InstallHwasan.. tests to use fixtures" 2021-03-15 11:09:22 +00:00
Nicolas Geoffray d45fa2d8ba Merge "Treat core_platform as stable unless module uses legacy" am: fb856f6add am: b684567a46 am: 5a8f6c5c96
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619411

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5a43ed15e67d55c3e05d09698ca73520ef185745
2021-03-15 10:38:11 +00:00
Nicolas Geoffray 5a8f6c5c96 Merge "Treat core_platform as stable unless module uses legacy" am: fb856f6add am: b684567a46
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619411

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I501e1099d77697b34c70f13b064840b94424d52d
2021-03-15 09:57:43 +00:00
Nicolas Geoffray fb856f6add Merge "Treat core_platform as stable unless module uses legacy" 2021-03-15 08:42:43 +00:00
Justin Yun 13decfb0bb Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__
__ANDROID_VNDK__ is defined for the modules that are able to use the
VNDK libraries. As both product and vendor variants define
__ANDROID_VNDK__, we don't know if a module is built for vendor or
product on build time.

__ANDROID_VENDOR__ and __ANDROID_PRODUCT__ macros can be used to
specify the image-variant-dependent codes.

Bug: 180646847
Test: m nothing
Change-Id: Id6c3e1e3d47deaf3684c0c02964718658cf2fec5
2021-03-15 17:28:59 +09:00
Paul Duffin a02cae345b Convert ...InstallHwasan.. tests to use fixtures
These tests rely on changing the definition of the "libc" module which
is a default module provided by the cc.GatherRequiredDepsForTest()
function. That function is called from within testApexContext() and so
added by default.

Previously, the tests relied on a number of factors to work:
1. All the default cc modules were added to the bp contents that were
   passed to testApexContext().
2. testApexContext() passed the augmented bp contents to
   TestArchConfig().
3. TestArchConfig() only stored the supplied bp contents in the root
   Android.bp file if it did not exist.

So, in order to override the default modules it simply made sure to add
its own Android.bp file into the file system first.

Unfortunately, that does not work with the test fixtures as the default
modules are defined in their own specific paths to avoid conflicting
with each other. To achieve the same effect as previously, i.e. no
default modules, this test uses an emptyFixtureFactory and only adds
preparers for cc and apex build components and ignores the default
module definitions altogether.

Bug: 181070625
Test: m nothing
Change-Id: Ic6b961dd2bd78c32cb326b2c7905426ee971c2d8
2021-03-12 18:26:41 +00:00
TreeHugger Robot 84c192f566 Merge "Allow ExtServices to use tflite_support" into mainline-prod am: 9c2890cac3
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/13806986

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I17909dd25cecc0cd284becc274311feabe7cfac3
2021-03-12 17:19:25 +00:00
TreeHugger Robot 9c2890cac3 Merge "Allow ExtServices to use tflite_support" into mainline-prod 2021-03-12 16:43:07 +00:00
Lev Proleev a2f2edcb68 Merge "Add libruy_static to allowed_deps" am: f6b5f8217c am: 894c8eb61b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610793

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icb0b3dd46d8e5aec6d5c1aadd1943a8b3f7a1fcd
2021-03-12 15:14:56 +00:00
Lev Proleev f6b5f8217c Merge "Add libruy_static to allowed_deps" 2021-03-12 14:00:45 +00:00
Paul Duffin d03f6a868f Merge changes Ifc96992e,Ic76523ba am: c10ee77ea6 am: b1ef3e2ce9 am: b587704556
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1628691

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I15bfdaef65a848ec6ed0210c883195409ce85814
2021-03-12 09:44:13 +00:00
Paul Duffin b587704556 Merge changes Ifc96992e,Ic76523ba am: c10ee77ea6 am: b1ef3e2ce9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1628691

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7f98cabe5a6ddae90458f7dc8a8b1725095493f4
2021-03-12 09:02:39 +00:00
Sophie Zheng 663778c712 Merge "Fix getting list of module libraries in builder.go" into mainline-prod 2021-03-11 23:38:08 +00:00
Artur Satayev 533b98cde3 Don't track modules that are only available to APEXes.
Modules that are not available for platform are developed with
updatability in mind, and do not require manual approvals.

Bug: 181223240
Test: checkbuild
Change-Id: I10b91053b3ef5a9ff5400d9d7a68fae3144a671c
2021-03-11 18:13:18 +00:00
Paul Duffin 37aad60507 Add apexFixtureFactory to apex package
Unlike the similar changes in other packages this change separates the
addition of the fixture factory and the conversion of the test...
methods to use them as there are a few tests that need converting to
use test fixtures first.

Bug: 181070625
Test: m nothing
Change-Id: Ic76523ba89fc1967631aeb682935935b5af116df
2021-03-11 17:25:29 +00:00
Artur Satayev ff36f17b40 Introduce derive_classpath service.
go/updatable-classpath

Bug: 180105615
Test: manual + boot test
Change-Id: I713b3b881e2214f2994e1830580ae1122d7c5c3d
2021-03-11 11:46:28 +00:00
Chen Xu 42be01b733 Merge "include new settings lib to the apex-dependency allow list" into sc-dev 2021-03-11 04:51:40 +00:00
Paul Duffin e5e761eab2 Merge "Avoid calling DepIsInSameApex when excluded from apex contents" am: 9c2e6d50b4 am: 46a694ba85 am: 4ea76e8caf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626500

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib6248a20ea0b929286691a083fa5e5a93ea65285
2021-03-11 03:04:16 +00:00
Paul Duffin 4ea76e8caf Merge "Avoid calling DepIsInSameApex when excluded from apex contents" am: 9c2e6d50b4 am: 46a694ba85
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626500

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If3b078034869c482a624c66b1093fb97e0ae6871
2021-03-11 02:19:40 +00:00
Treehugger Robot 215725913c Merge "update apex/allowed_deps.txt" 2021-03-11 01:35:46 +00:00
Paul Duffin 9c2e6d50b4 Merge "Avoid calling DepIsInSameApex when excluded from apex contents" 2021-03-10 23:30:48 +00:00
Paul Duffin d3bf0fad8f Merge "Extract apex registration code into function for reuse" am: 3d3f7a0c3f am: 5dccf644f1 am: 0f9e7887fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625379

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5ea84198248eab3591b7b065b065478ac400bd01
2021-03-10 21:00:54 +00:00
Paul Duffin 0f9e7887fa Merge "Extract apex registration code into function for reuse" am: 3d3f7a0c3f am: 5dccf644f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625379

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c20a0a5a5fed0aae8cdbdb678f09474e09d8324
2021-03-10 20:12:30 +00:00
sophiez fdfe8f74fd Fix getting list of module libraries in builder.go
Replace f.stem to f.Stem() method otherwise empty libNames get passed
in.

Fixes:181991887

Test: DIST_DIR=~/my_dist_dir TARGET_BUILD_VARIANT=userdebug PRODUCT=mainline_modules_x86 ./vendor/google/build/build_unbundled_coverage_mainline_module.sh -j80

Change-Id: I3384f3a73c5637928584b9d87b2f936116a8f15e
Merged-In: Ie1799c0972d63da823ad375f008018de782529d1
2021-03-10 19:27:54 +00:00
Paul Duffin 3d3f7a0c3f Merge "Extract apex registration code into function for reuse" 2021-03-10 17:31:13 +00:00
Paul Duffin e9612824ea Avoid calling DepIsInSameApex when excluded from apex contents
While debugging an issue with some work I was doing on boot image
modules I noticed that markPlatformAvailability() is calling
DepIsInSameApex() even when the dependency tag indicates that it is
excluded from the apex contents.

Test: m droid
Change-Id: Iac49049546a886f7a3a0d9640ffd31ce24c61364
2021-03-10 16:44:57 +00:00
Paul Duffin 043f5e7881 Treat core_platform as stable unless module uses legacy
The sdk_version: "core_platform" refers to the stable core platform
unless the module is in the exception list. This change makes sure that
CheckStableSdkVersion() reflects that behavior.

Bug: 180399951
Test: m nothing
Change-Id: Ia0b1e13322352b87f5a3c6621e37f23ba637ffb6
2021-03-10 13:04:03 +00:00
Jeongik Cha 5225ca9434 update apex/allowed_deps.txt
Bug: 150578172
Test: m
Change-Id: I0ea6b33c2d27081a5f0622edb0f5df4088a71455
Merged-In: I0ea6b33c2d27081a5f0622edb0f5df4088a71455
2021-03-10 09:16:14 +09:00
Paul Duffin 667893c657 Extract apex registration code into function for reuse
Test: m nothing
Change-Id: Id2c918891ecd9e874004f6828f71374bf0cdb9e4
2021-03-09 23:03:40 +00:00
TreeHugger Robot 98a2c750dd Merge "update apex/allowed_deps.txt" into mainline-prod 2021-03-09 22:03:39 +00:00
Jooyung Han 7eb6684058 Merge "Run "prebuilt_postdeps" mutator again" am: 77e7d7769e am: 1226de1315 am: b2821d6c8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620647

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I68944034e6b09d866466fb10d7caf7c0539de6ec
2021-03-09 18:23:21 +00:00
Jooyung Han b2821d6c8c Merge "Run "prebuilt_postdeps" mutator again" am: 77e7d7769e am: 1226de1315
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620647

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8fec1a135d285d296ce4121a725a64f443fc0f51
2021-03-09 17:38:39 +00:00
Jooyung Han 77e7d7769e Merge "Run "prebuilt_postdeps" mutator again" 2021-03-09 16:21:33 +00:00
Tony Mak 9418d6747f Allow ExtServices to use tflite_support
tflite_support provides some tflite ops and utils functions.

> How big is the binary size increase for affected APEXes?
+100K
> Is the new dependency committed to support previous platform releases?
note that you have to support all the releases starting from the minSdkVersion value you are declaring
Yes.
> Is the new dependency being developed AOSP-first or internal?
AOSP-first. We don't "develop" it there tho.
We import the code from github and the library is developed by another
team in google.
> What’s the testing strategy for the new dependency? Does it have its own tests, and are you adding integration tests?
We test the library with our own unit and integration tests.

Bug: 169147920

Test: build/soong/scripts/update-apex-allowed-deps.sh

Change-Id: Ic15226dd36dce98f9a3e54672353f87adcc6312f
2021-03-09 12:02:00 +00:00
Treehugger Robot f58582a3c1 Merge "Introduce derive_classpath service." am: c285125110 am: eb4bc50101
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614805

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I79df795b34714b5f12c2d34302096c40672ca1f5
2021-03-09 11:50:04 +00:00
Treehugger Robot c285125110 Merge "Introduce derive_classpath service." 2021-03-09 10:23:49 +00:00
TreeHugger Robot f053d84257 Merge "update apex/allowed_deps.txt" into sc-dev 2021-03-09 07:14:19 +00:00
Jooyung Han 86feead0d5 Run "prebuilt_postdeps" mutator again
Because OverridablePropertiesDepsMutator is run after prebuilt_postdeps,
prebuilt's replacement doesn't affect to those deps added by overridable
properties.

By running prebuilt_postdeps again after
OverridablePropertiesDepsMutator, replacing source with prebuilts is
applied to those deps.

Bug: 152155285
Bug: 181953909
Bug: 181974714
Test: m nothing
Change-Id: I24acc02785c9580c2beca096042f1173eb28ba9a
2021-03-09 11:23:46 +09:00
Artur Satayev ce06cc0c25 Introduce derive_classpath service.
go/updatable-classpath

Bug: 180105615
Test: manual + boot test
Change-Id: If0a3cb00754834133abea12caff3fdc5b7cff696
Merged-In: If0a3cb00754834133abea12caff3fdc5b7cff696
2021-03-09 00:11:13 +00:00
TreeHugger Robot 2970f7ea17 Merge "Introduce derive_classpath service." into sc-dev 2021-03-09 00:00:51 +00:00
Colin Cross cbd14768a4 Merge "Remove extra return value from testApex" am: 110bca5bd1 am: f686c21c3b am: bbf3dcf9ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1590978

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0e904bf0966fcf1f402daeba5b79486d725c5b35
2021-03-08 20:15:03 +00:00
Colin Cross bbf3dcf9ec Merge "Remove extra return value from testApex" am: 110bca5bd1 am: f686c21c3b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1590978

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie3887d404da1c6be15e591ecc389cab72826bef5
2021-03-08 19:28:35 +00:00
Colin Cross 110bca5bd1 Merge "Remove extra return value from testApex" 2021-03-08 18:16:23 +00:00
Artur Satayev 74030452b6 Introduce derive_classpath service.
go/updatable-classpath

Bug: 180105615
Test: manual + boot test
Merged-In: If0a3cb00754834133abea12caff3fdc5b7cff696
Change-Id: If0a3cb00754834133abea12caff3fdc5b7cff696
2021-03-08 18:06:59 +00:00
Artur Satayev 92f7874e82 Introduce derive_classpath service.
go/updatable-classpath

Bug: 180105615
Test: manual + boot test
Change-Id: If0a3cb00754834133abea12caff3fdc5b7cff696
2021-03-08 18:03:59 +00:00
TreeHugger Robot e7b67eb018 Merge "Add statslog_media dependency to media module." into sc-dev 2021-03-08 18:01:32 +00:00
Anton Hansson 6b9ef0da30 Merge "Allow PermissionController to set min_sdk_version to 30." am: 921a89e376 am: 328bb54dab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621413

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9c278a129377a25f011353e400826006ecb74865
2021-03-08 12:24:02 +00:00
Anton Hansson 921a89e376 Merge "Allow PermissionController to set min_sdk_version to 30." 2021-03-08 11:18:16 +00:00
Paul Duffin 1c58ce4a52 Merge "Fix mutator ordering issue in apex tests" am: 97c8128eea am: d8033e1d26 am: e672daac6b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621415

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifa3b28737bcf55fb5ccda37e3e4dec4973cf8e34
2021-03-06 09:56:43 +00:00
Paul Duffin e672daac6b Merge "Fix mutator ordering issue in apex tests" am: 97c8128eea am: d8033e1d26
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621415

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I84cb412a6a78c132107f962e3d746f7c5941c2e3
2021-03-06 09:06:03 +00:00
Linus Nilsson 2cb4b01f1f Add statslog_media dependency to media module.
To support logging transcoding metrics to westworld
a small auto generated wrapper lib is needed to
send structured data to statsd.

Bug: 179274112
Test: Will verify build with presubmit
Change-Id: I9b3a0b1825b7acb9859b92b9a52b3550e31ef1f1
2021-03-05 21:52:30 +00:00
Paul Duffin 6d119b804c Fix mutator ordering issue in apex tests
Previously, the override mutators were being run before the prebuilt
mutators that did not match the runtime behavior. This change fixes
that ordering.

In the process it broke TestApexWithAppImportsPrefer. That test tries
to verify that an apex that depends on an android_app will use an
android_app_import if that is preferred. Unfortunately, it only worked
because of the incorrect order of the mutators.

The test worked before this change because the prebuilt mutators were
being run after the overridableModuleDepsMutator. That meant that any
dependencies added by that mutator onto source modules could be
replaced by the PrebuiltPostDepsMutator with the preferred prebuilt
module.

Switching the order to match the runtime meant that the prebuilt
mutators were run before the overrides so never had a chance to replace
the dependencies added by the overrides.

Bug: 181953909
Bug: 181974714
Test: m nothing
Change-Id: Ic98fdc29a63155174a3227e7e918b26f0a8763bb
2021-03-05 18:38:58 +00:00
Hai Zhang 9bb022a4aa Allow PermissionController to set min_sdk_version to 30.
PermissionController is updatable since R, so its minimum SDK version
should be 30.

Bug: 174770904
Test: build
Merged-In: I5c98dc0053687bd4601ab06f6e092aeb851cdba7
Change-Id: I5c98dc0053687bd4601ab06f6e092aeb851cdba7
2021-03-05 17:46:25 +00:00
Jeongik Cha 480762d78b update apex/allowed_deps.txt
Bug: 150578172
Test: m
Change-Id: I0ea6b33c2d27081a5f0622edb0f5df4088a71455
Merged-In: I0ea6b33c2d27081a5f0622edb0f5df4088a71455
2021-03-05 21:47:22 +09:00
Jeongik Cha c38777cb75 update apex/allowed_deps.txt
Bug: 150578172
Test: m
Change-Id: I0ea6b33c2d27081a5f0622edb0f5df4088a71455
Merged-In: I0ea6b33c2d27081a5f0622edb0f5df4088a71455
2021-03-05 21:39:17 +09:00
Jeongik Cha 555752f09e update apex/allowed_deps.txt
Bug: 150578172
Test: m
Change-Id: I0ea6b33c2d27081a5f0622edb0f5df4088a71455
2021-03-05 21:10:19 +09:00
Treehugger Robot e26cd8f5a0 Merge "Friendly error message on apex_available and min_sdk_version checks" am: 4a349ab66b am: 5bb26755f9 am: 0aa0afdfe2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614908

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic88794c361b576be6032298dbca76173bd08331e
2021-03-05 06:22:49 +00:00
Treehugger Robot 0aa0afdfe2 Merge "Friendly error message on apex_available and min_sdk_version checks" am: 4a349ab66b am: 5bb26755f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614908

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia42eb7ea29401fc53c188ded76315072080b85cd
2021-03-05 05:57:35 +00:00
Treehugger Robot 4a349ab66b Merge "Friendly error message on apex_available and min_sdk_version checks" 2021-03-05 03:30:11 +00:00
Makoto Onuki 4d32bcd77f Merge "Remove myself from the OWNERS" am: e9d0de4932 am: f8a09af582 am: fe185ffa11
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1615279

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If45c9aa7034e62829fd33e0a0e03cfa8920ba4fe
2021-03-04 19:21:20 +00:00
Makoto Onuki fe185ffa11 Merge "Remove myself from the OWNERS" am: e9d0de4932 am: f8a09af582
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1615279

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I78ebb78934af20071071cbdd96625899c5c8e9fe
2021-03-04 18:57:34 +00:00
Makoto Onuki e9d0de4932 Merge "Remove myself from the OWNERS" 2021-03-04 17:04:53 +00:00
Chen Xu 6618f04006 include new settings lib to the apex-dependency allow list
Bug: 177638076
Test: Manual
Change-Id: Ib686d0aed0d985eb5452859774a31e398cda2795
2021-03-04 18:03:21 +08:00
Lukács T. Berki 213810ca19 Merge "cd to / before running soong_build ." am: ddebd2c82a am: db9632fbd0 am: 13dac96f2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609473

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1416378dec2959c10b37b6bea847bc2fd7c93027
2021-03-04 09:41:49 +00:00
Lukács T. Berki 13dac96f2c Merge "cd to / before running soong_build ." am: ddebd2c82a am: db9632fbd0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609473

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6fb83ce60ddefcfdff85db83c05a9fc45dc27a9c
2021-03-04 08:37:36 +00:00
Lukács T. Berki ddebd2c82a Merge "cd to / before running soong_build ." 2021-03-04 07:07:02 +00:00
Jiyong Park 767dbd9d3b Friendly error message on apex_available and min_sdk_version checks
1) suggest a fix at the end of the message
2) add new lines around the dependency path so that they are visually
separated from rest of the error message

Bug: N/A
Test: m with an intentional break
error: bionic/apex/Android.bp:32:1: module "com.android.runtime" variant "android_common_com.android.runtime_image": "libutils_headers" requires "libsystem_headers" that doesn't list the APEX under 'apex_available'.

Dependency path:
           via tag apex.dependencyTag: { name:executable payload:true}
    -> crash_dump{os:android,image:,arch:arm_armv8-a,sdk:,apex:apex10000}
           via tag cc.libraryDependencyTag: { Kind:staticLibraryDependency Order:normalLibraryDependency wholeStatic:false reexportFlags:false explicitlyVersioned:false dataLib:false ndk:false staticUnwinder:false makeSuffix: skipApexAllowedDependenciesCheck:false excludeInApex:false}
    -> libtombstoned_client_static{os:android,image:,arch:arm_armv8-a,sdk:,link:static,apex:apex10000}
           via tag cc.libraryDependencyTag: { Kind:staticLibraryDependency Order:normalLibraryDependency wholeStatic:true reexportFlags:true explicitlyVersioned:false dataLib:false ndk:false staticUnwinder:false makeSuffix: skipApexAllowedDependenciesCheck:false excludeInApex:false}
    -> libcutils{os:android,image:,arch:arm_armv8-a,sdk:,link:static,asan:,apex:apex10000}
           via tag cc.libraryDependencyTag: { Kind:headerLibraryDependency Order:normalLibraryDependency wholeStatic:false reexportFlags:false explicitlyVersioned:false dataLib:false ndk:false staticUnwinder:false makeSuffix: skipApexAllowedDependenciesCheck:false excludeInApex:false}
    -> libutils_headers{os:android,image:,arch:arm_armv8-a,sdk:,asan:,apex:apex10000}
           via tag cc.libraryDependencyTag: { Kind:headerLibraryDependency Order:normalLibraryDependency wholeStatic:false reexportFlags:true explicitlyVersioned:false dataLib:false ndk:false staticUnwinder:false makeSuffix: skipApexAllowedDependenciesCheck:false excludeInApex:false}
    -> libsystem_headers{os:android,image:,arch:arm_armv8-a,sdk:,asan:,apex:apex10000}

Consider adding "com.android.runtime" to 'apex_available' property of "libsystem_headers"

Change-Id: I09f92c3086ea433780133a33ba0ad73baee6dc41
2021-03-04 13:07:36 +09:00
Xin Li cbcc5b7179 Merge "Merge RQ2A.210305.007" 2021-03-03 21:41:40 +00:00
Mathew Inwood dcb7d03edd Make apex.updatable default to true. am: f8dcf5ead2 am: 8d200e4279 am: a795bf267c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1589972

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9d62e35fb4a897c3c1742c28ef0cead9cd3d1a18
2021-03-03 18:29:14 +00:00
Mathew Inwood a795bf267c Make apex.updatable default to true. am: f8dcf5ead2 am: 8d200e4279
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1589972

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id5c822301839f69c7372d6a968bcd1652654fa66
2021-03-03 17:21:36 +00:00
Xin Li 2964583d62 Merge RQ2A.210305.007
Bug: 180401296
Merged-In: I422ccc35977e0be846bb7a3497a50c2fc2c42e92
Change-Id: I230429666794c8218e515099292600d77a4b9604
2021-03-03 09:12:01 -08:00
Makoto Onuki 55418f8c37 Remove myself from the OWNERS
Bug: n/a
Test: n/a
Change-Id: I84f09ac8dc619921d4f8adfc3ea56f5ee01510a2
2021-03-03 08:21:17 -08:00
Mathew Inwood 8d200e4279 Make apex.updatable default to true. am: f8dcf5ead2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1589972

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I77aae495c41af1a0b6ab0254965d4f64c7419854
2021-03-03 16:20:22 +00:00
Lev Proleev 93b7340bdd Merge "Add libruy_static to allowed_deps" into sc-dev 2021-03-03 14:50:52 +00:00
Lev Proleev d152f5b0ed Add libruy_static to allowed_deps
To be used in NNAPI apex as part of TF Lite.

Bug: 178609672
Test: m
Change-Id: Iaf623823e85e7488e30b3dcf2592d1a90bf9fc9f
Merged-In: Iaf623823e85e7488e30b3dcf2592d1a90bf9fc9f
2021-03-03 10:55:26 +00:00
Mathew Inwood f8dcf5ead2 Make apex.updatable default to true.
Update tests accordingly and add a new test case for this.

Bug: 180375550
Test: Treehugger
Change-Id: I835e189f4dae1e4bc79dce7bc59b7b9c7bd19fd9
2021-03-03 10:28:26 +00:00
Lukacs T. Berki 7690c09953 cd to / before running soong_build .
This lets one avoid any decisions as to when to chdir there during its
execution and leads to better sandboxing because the pwd doesn't leak to
init() functions anymore.

Test: Manual.
Change-Id: I1560da8ed3a621249426f9e8908aa890c21e13ba
2021-03-03 09:14:22 +01:00
Colin Cross 2adb1ee447 Merge changes I3e6bc9b5,If9f8fb10 am: fdf28ca403 am: 342db477c8 am: e9f7dff1d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1611942

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ied4766b84dc6ffc6de3acef6e9bb411f0b10d5ca
2021-03-03 08:10:25 +00:00
Colin Cross e9f7dff1d5 Merge changes I3e6bc9b5,If9f8fb10 am: fdf28ca403 am: 342db477c8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1611942

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iff1d41973ece6f21641bcb5476a4e76d4536eb35
2021-03-03 02:59:08 +00:00
Colin Cross 342db477c8 Merge changes I3e6bc9b5,If9f8fb10 am: fdf28ca403
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1611942

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9b1d3c1c4a41e853e00ffecc17bfc6d0ad051cc0
2021-03-03 02:17:05 +00:00
Colin Cross fdf28ca403 Merge changes I3e6bc9b5,If9f8fb10
* changes:
  Disable TestSendLog on the buildbots
  Remove global state from VNDK apexes
2021-03-03 01:45:02 +00:00
Hyundo Moon a385a630b8 Add modules-annotation-minsdk in allowed_deps am: 4416350471 am: 77273fad21 am: d6a52586c4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1612299

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I42e8bb972236fd9c832de4aca8127822d6ab703b
2021-03-03 00:23:51 +00:00
Paul Duffin 0b0921a808 Merge "Remove deapexer and prebuilt apex select mutators" am: 4b786d2da1 am: 0630dacc0c am: 9d697b3d94
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610795

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4670d011f304c943cc6156312b0154e9236ca08f
2021-03-03 00:23:03 +00:00
Hyundo Moon d6a52586c4 Add modules-annotation-minsdk in allowed_deps am: 4416350471 am: 77273fad21
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1612299

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I648d42cb97a92c9e602d77c4d49ac42650ab5278
2021-03-02 23:25:50 +00:00
Paul Duffin 9d697b3d94 Merge "Remove deapexer and prebuilt apex select mutators" am: 4b786d2da1 am: 0630dacc0c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610795

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib9b898e2788ca9a5bfba6944839026f1bcb92aad
2021-03-02 23:23:36 +00:00
Paul Duffin 9b1893fbba Merge "Verify the prebuilt_apex selects the correct input apex file" am: 9b41efabd1 am: b267e12670 am: 196fe7325a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610797

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I20b4040a82bb80a58744803ef3427266d448648e
2021-03-02 22:34:02 +00:00
Paul Duffin 64ef3f7058 Merge "Add test to verify the deapexer rule's input apex file" am: 30c9fe93e0 am: 6f342644d0 am: 906fb68c12
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610796

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If7f5291c9eae0eea81f459263188b067ef3707cf
2021-03-02 22:33:20 +00:00
Hyundo Moon 77273fad21 Add modules-annotation-minsdk in allowed_deps am: 4416350471
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1612299

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I695b56d0d9b999beb941c343fb19ecf83f935994
2021-03-02 22:30:07 +00:00
Paul Duffin 0630dacc0c Merge "Remove deapexer and prebuilt apex select mutators" am: 4b786d2da1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610795

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia285f625de493e02e8b2f0ea5aa6a245927bc581
2021-03-02 22:27:27 +00:00
Paul Duffin 196fe7325a Merge "Verify the prebuilt_apex selects the correct input apex file" am: 9b41efabd1 am: b267e12670
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610797

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaa64f22f2afa5172702482999c3b861aec0d39ff
2021-03-02 21:50:49 +00:00
Paul Duffin 906fb68c12 Merge "Add test to verify the deapexer rule's input apex file" am: 30c9fe93e0 am: 6f342644d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610796

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I65700e9f3b7e1d87bf8a755b249bf176417ddcd9
2021-03-02 21:50:08 +00:00
Paul Duffin b267e12670 Merge "Verify the prebuilt_apex selects the correct input apex file" am: 9b41efabd1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610797

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I422ccc35977e0be846bb7a3497a50c2fc2c42e92
2021-03-02 21:36:01 +00:00
Paul Duffin 6f342644d0 Merge "Add test to verify the deapexer rule's input apex file" am: 30c9fe93e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610796

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibb6beaaa979cb14cf005a9bed7fd851253f91115
2021-03-02 21:26:58 +00:00
Lev Proleev e4b585d73e Add libruy_static to allowed_deps
To be used in NNAPI apex as part of TF Lite.

This commit is required to resolve merge conflict from aosp/1610793

Bug: 178609672
Test: m
Change-Id: Iaf623823e85e7488e30b3dcf2592d1a90bf9fc9f
2021-03-02 20:33:05 +00:00
Colin Cross 2807f0047b Remove global state from VNDK apexes
Use the name of the apex instead of a global map to find the right
VNDK apex for each VNDK version.

Bug: 181689854
Test: apex tests
Change-Id: If9f8fb10d09e125c9e7d44228e1aa746bf53c082
2021-03-02 12:23:16 -08:00
Hyundo Moon 4416350471 Add modules-annotation-minsdk in allowed_deps
This enables using @MinSdk in media APEX.

Bug: 181649697
Test: Builds successfully
Change-Id: If69d0a6e84e31d26484c7e29dfdde4f14410a024
2021-03-02 17:22:34 +00:00
Paul Duffin 4b786d2da1 Merge "Remove deapexer and prebuilt apex select mutators" 2021-03-02 10:48:29 +00:00
Paul Duffin 9b41efabd1 Merge "Verify the prebuilt_apex selects the correct input apex file" 2021-03-02 10:47:48 +00:00
Paul Duffin 30c9fe93e0 Merge "Add test to verify the deapexer rule's input apex file" 2021-03-02 10:47:33 +00:00
Treehugger Robot b8b4d74d37 Merge "APEX uses the latest version of the stub" am: ce80f18749 am: 3310e2d9ea am: 803eece603
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic9355035dd83782c478a12fb16a5896c50968a58
2021-03-02 03:10:43 +00:00
Treehugger Robot 803eece603 Merge "APEX uses the latest version of the stub" am: ce80f18749 am: 3310e2d9ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0378b9870949effb36b58bd709626ee0f821f5c2
2021-03-02 02:22:46 +00:00
Treehugger Robot 3310e2d9ea Merge "APEX uses the latest version of the stub" am: ce80f18749
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I294103da51c7a9ad11a81e3eadb1a0e2e98920e8
2021-03-02 02:03:34 +00:00
Treehugger Robot ce80f18749 Merge "APEX uses the latest version of the stub" 2021-03-02 01:02:18 +00:00
Paul Duffin 07e6744ac5 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" am: 69804ac388 am: 764a15f4e5 am: 08515806b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609478

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic6bbf28746c7216a106a5ba66da944145ac5ab4b
2021-03-01 20:50:11 +00:00
Paul Duffin 09845d0105 Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" am: 0a8d5248ef am: b1426419ec am: 86d8214509
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I827dbe2b0fa2d6e70637c1087181a4d6422fbea5
2021-03-01 20:49:54 +00:00
Paul Duffin 08515806b9 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" am: 69804ac388 am: 764a15f4e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609478

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia22b20976de4b81e4e97026ceae4213309a28b5e
2021-03-01 20:09:21 +00:00
Paul Duffin 86d8214509 Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" am: 0a8d5248ef am: b1426419ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0dc9e98b69c22ceb22d109ee412f59d3fb5e4819
2021-03-01 20:08:56 +00:00
Paul Duffin 764a15f4e5 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" am: 69804ac388
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609478

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9c06fde9d8d3f34ec60bea58bfa39f5dc98a66bd
2021-03-01 19:31:06 +00:00
Paul Duffin b1426419ec Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" am: 0a8d5248ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia9e4f4591c7fc3ee8ab303635a71ac84b1a99327
2021-03-01 19:30:32 +00:00
Paul Duffin c04fb9e6a2 Remove deapexer and prebuilt apex select mutators
Originally, when the prebuilt_apex was first created, it selected the
source to use in its DepsMutator. It did that because that was a
convenient place for it to perform that work which had to be:
* After the arch mutator had run so MultiTargets() was available.
* Before the prebuilt_select mutator runs as that relied on the Source
  property to have been set.

Change 064b70c9 then duplicated the call from the DepsMutator of the
deapexer module type that was added as part of the work to make dex
files available for hiddenapi processing.

Change 356f7d45 moved it out of the the DepsMutator methods into its
their own mutators, presumably because it interfered with the
Soong -> Bazel conversion work.

This change improves the existing PrebuiltSrcsSupplier mechanism to
support reporting errors so that the logic for selecting the source can
be done on demand rather than in separate mutators.

The main complication was that PrebuiltSrcsSupplier is called with a
BaseModuleContext for both source and prebuilt modules so it cannot use
any methods on it that are related to the current module. That
necessitated adding MultiTargets() to android.Module.

Bug: 181267622
Test: m droid
Change-Id: I106c78fd21016f051a315b82b470d8f12b1f820b
2021-03-01 17:11:25 +00:00
Paul Duffin 0d10c3c304 Verify the prebuilt_apex selects the correct input apex file
This will ensure that the following refactoring does not change the
behavior.

Bug: 181267622
Test: m nothing
Change-Id: Ieb9b37c2a1ef609b2d6565c54c261439a1ce7147
2021-03-01 17:10:31 +00:00
Paul Duffin f6932afeae Add test to verify the deapexer rule's input apex file
This will ensure that the following refactoring does not change the
behavior.

Bug: 181267622
Test: m nothing
Change-Id: I36ae9ec9a0a7977bd394f4100c72941052d763ac
2021-03-01 13:40:06 +00:00
Paul Duffin 3785673f9b Allow java_sdk_library_import to contribute to hiddenapi processing
Invokes hiddenAPIExtractInformation() on the java_sdk_library_import's
dex implementation jar provided by the deapexer (on behalf of
prebuilt_apex) so that hiddenAPI can extract the information it needs,
if anything, from the dex file.

The dex file provided by deapexer has already had the hiddenapi
information encoded into it so it does not need to do that again.

Usually, it would require a classes implementation jar as well in
order to extract information from UnsupportedAppUsage annotations but
that is not available for a java_sdk_library_import. Fortunately, the
modules that are currently affected by this do not contain any such
annotations. This just uses a public api stubs jar instead.

Bug: 181267622
Test: m nothing
Change-Id: I96275e46f8b7fecba88075319e9f2da5ae315c03
2021-03-01 12:58:28 +00:00
Paul Duffin 3985351df6 Retrieve dex implementation jars from apex for java_sdk_library_import
Bug: 181267622
Test: m nothing
Change-Id: Idd6af2482f48bd3a05db88b8a06dbbbdee01ef78
2021-03-01 12:58:28 +00:00
Jiyong Park 55549df051 APEX uses the latest version of the stub
Previously when an APEX whose min_sdk_version is set is linked to an
external library providing multiple versions of stubs, the
maximum version that is less than or equal to the min_sdk_version was
chosen. For example, if the versions of a library stubs are 28, 29, 30,
and 31, then APEX with min_sdk_version: 29 linked to the version 29 of
the stub.

This was to ensure that the APEX doesn't use any new APIs whose
existence can't be guaranteed.

This however imposes a severe restriction that the APEX can never use
new APIs even when the APIs are actually available: i.e. when the
APEX is running on a newer platform.

With the recent work about unguarded availability, using the future APIs
became much safer. When you use an API that is newer than your
min_sdk_version, the API is automatically declared as a weak symbol
(thus no link error at runtime), while the call to API is guaranteed to
be guarded with the `__builtin_available(...)` macro.

So, there really is no reason to use the old version of the stub. We can
always use the latest version of stub safely.

Bug: N/A
Test: m
Change-Id: Iaac0d8761d8929154527dc2e861a51ae31e23d49
2021-03-01 09:12:32 +00:00
Gang Wang efadd4aead Add fft2d dependency to unblock ag/13690416.
BUG: 180551745
Test: unit test
Change-Id: I8b312dda50020c3ec9d16b5e4a3d2d05bf2ee037
2021-02-27 18:47:08 -05:00
Lorenzo Colitti f17a64cd60 Add allowed dependencies for tethering in mainline-prod.
We are in the process of snapping the Tethering module in
mainline-prod to AOSP HEAD so we can re-enable the automerger.
This CL adds the necessary dependencies. These are mostly
already present in the allowed_deps file in AOSP master.

Generated by build/soong/scripts/update-apex-allowed-deps.sh .

The merged-in tag is from aosp/1549716, which added one of these
dependencies. This change should not automerge to any branch
because sc-dev and downstream branches already have all these
dependencies.

Test: m
Bug: 167645754
Change-Id: I0216372f973f3d8fa75f7edb2990b9e9db48e3f7
Merged-In: Ief5ffbb96c216796e4f0f4cacbde7c08f4af274a
2021-02-25 22:23:59 +09:00
Lorenzo Colitti 7029d13fce Merge "Add the new NetworkStack shim libraries to APEX allowed deps." am: 9023138b5e am: 1fd8f115b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597976

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id59956b5865cfbd8b9bfe8ece498269ae8586bb7
2021-02-24 17:16:55 +00:00
Lorenzo Colitti 1fd8f115b2 Merge "Add the new NetworkStack shim libraries to APEX allowed deps." am: 9023138b5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597976

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icaefda26de292dc9b3bd011cc13c36d0f8893e10
2021-02-24 16:39:00 +00:00
Lorenzo Colitti 9023138b5e Merge "Add the new NetworkStack shim libraries to APEX allowed deps." 2021-02-24 16:01:08 +00:00
TreeHugger Robot 1ab53db083 Merge "Add the new NetworkStack shim libraries to APEX allowed deps." into mainline-prod 2021-02-24 09:34:44 +00:00
Lorenzo Colitti 58d6d27e5d Merge "Add the new NetworkStack shim libraries to APEX allowed deps." into sc-dev 2021-02-24 07:30:13 +00:00
Ady Abraham 3210f11c24 Merge "Add libmath_headers to allowed_deps.txt" into sc-dev 2021-02-23 23:16:31 +00:00
Ady Abraham 1af9f614e6 Add libmath_headers to allowed_deps.txt
A new header lib was added to libmath as libui depends
on a libmath header.

Bug: 158790260
Test: libui unit tests
Test: libmath unit tests
Change-Id: Ibdd43a040ebbda314575b6047a8eade415ccd106
2021-02-23 10:14:49 -08:00
TreeHugger Robot 4191ec7529 Merge "Merge ab/7061308 into stage." into stage-aosp-master 2021-02-23 08:43:12 +00:00
Treehugger Robot 2389a4d495 Merge "Add modules-utils-build_system to allowed deps" am: 4c666e81d0 am: 7daedc9c56 am: 6fd464910a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1596933

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic06fc4e3e7a7f4047593ce4b49bdbd56f2d34b35
2021-02-23 02:20:49 +00:00
Treehugger Robot 173eeb8ca0 Merge "Add ctx to AndroidMkExtraEntriesFunc" am: 277303f042 am: 5b72de988f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360943

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I90ae8f53df60dd6bdbc9ae040c44a28a334017e3
2021-02-23 01:45:26 +00:00
Treehugger Robot 6fd464910a Merge "Add modules-utils-build_system to allowed deps" am: 4c666e81d0 am: 7daedc9c56
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1596933

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I03f91913ade1729a4f60f0f0364baa0f589c1ca7
2021-02-23 01:44:52 +00:00
Treehugger Robot 277303f042 Merge "Add ctx to AndroidMkExtraEntriesFunc" 2021-02-22 22:40:31 +00:00
Bob Badour 987f33cafc DO NOT MERGE "Export soong license data to make."
61a55a0344

Test: m nothing

Bug: 180688789

Change-Id: I5fb017c683df18bad42a8e27fb2d7c7c510514e5
2021-02-22 10:36:19 -08:00
Treehugger Robot 4c666e81d0 Merge "Add modules-utils-build_system to allowed deps" 2021-02-22 18:22:46 +00:00
Treehugger Robot 479ecdefb4 Merge "update apex/allowed_deps.txt" am: d4b9d04557 am: bcf3d3411c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597975

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id6552026db3ac2b94a768f423f85c72f70c8d441
2021-02-22 18:08:10 +00:00
Treehugger Robot d4b9d04557 Merge "update apex/allowed_deps.txt" 2021-02-22 15:38:08 +00:00
Anton Hansson afd93315e5 Merge "Remove sdkext apex_available allowlist" am: f19be717c6 am: 17a2d5439d am: a7a6c56128
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597936

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4e736000acf7031bde77c1958d2cd4b4588d1771
2021-02-22 14:41:38 +00:00
Lorenzo Colitti e1ed95bcfd Add the new NetworkStack shim libraries to APEX allowed deps.
These are not currently tracked before because the shims are just
filegroups. aosp/1598155 is turning them into libraries so each
shim can build with the appropriate SDK version.

Test: m
Bug: 180894665
Change-Id: I9df3dd98d46f49943211cb0893493d628ddd157c
2021-02-22 23:29:39 +09:00
Lorenzo Colitti 3cda28424c Add the new NetworkStack shim libraries to APEX allowed deps.
These are not currently tracked before because the shims are just
filegroups. aosp/1598155 is turning them into libraries so each
shim can build with the appropriate SDK version.

Test: m
Bug: 180894665
Change-Id: I9df3dd98d46f49943211cb0893493d628ddd157c
Merged-In: I9df3dd98d46f49943211cb0893493d628ddd157c
2021-02-22 23:29:16 +09:00
Anton Hansson a7a6c56128 Merge "Remove sdkext apex_available allowlist" am: f19be717c6 am: 17a2d5439d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597936

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iba6ed2476dcc08ae952940f582deda8d35ad4fb6
2021-02-22 14:19:54 +00:00
Lorenzo Colitti 97ca28e990 Add the new NetworkStack shim libraries to APEX allowed deps.
These are not currently tracked before because the shims are just
filegroups. aosp/1598155 is turning them into libraries so each
shim can build with the appropriate SDK version.

Test: m
Change-Id: I9df3dd98d46f49943211cb0893493d628ddd157c
Merged-In: I9df3dd98d46f49943211cb0893493d628ddd157c
2021-02-22 20:32:34 +09:00
Anton Hansson 6536ad7d0f Remove sdkext apex_available allowlist
Not needed anymore.

Bug: 180886919
Test: m
Change-Id: I1f716076eeb44c979e92b767ea67692649e1bfb4
2021-02-22 10:08:40 +00:00
Xin Li 982c52b034 Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I4638ba660a8cc1748693224ac15e6aa6cad33646
Change-Id: I24dd13b52b3f3a007d79753e32cb64e7f36df47c
2021-02-21 09:24:23 -08:00
Jeongik Cha 79f4ab21db update apex/allowed_deps.txt
Bug: 150820813
Test: m

Change-Id: Ib8ada6607b628a120103b64ea83132b3f3e6492e
Merged-In: Ib8ada6607b628a120103b64ea83132b3f3e6492e
2021-02-21 00:11:59 +09:00
Jeongik Cha 76b0ff7cc3 Merge "update apex/allowed_deps.txt" into mainline-prod 2021-02-20 01:48:45 +00:00
Colin Cross 1c460567b6 Remove extra return value from testApex
The config value returned by testApex is no longer used, remove it.

Test: go test  ./apex
Change-Id: I9327c1b139c17305454fb0a111e41456cdcaebc3
2021-02-19 23:06:01 +00:00
Colin Cross aa2555387d Add ctx to AndroidMkExtraEntriesFunc
Add a ctx parameter to AndroidMkExtraEntriesFunc to allow them to
access providers.

Test: m checkbuild
Change-Id: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
Merged-In: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
2021-02-19 23:05:40 +00:00
Evan Severson 5149805dcc Add modules-utils-build_system to allowed deps
Test: Treehugger
Bug: 178426097

Change-Id: I4c485b32c3479e08077206d497185b21aad45631
2021-02-19 10:59:54 -08:00
Jeongik Cha 35f18a8170 update apex/allowed_deps.txt
Bug: 150578172
Test: m
Change-Id: Ib8ada6607b628a120103b64ea83132b3f3e6492e
Merged-In: Ib8ada6607b628a120103b64ea83132b3f3e6492e
2021-02-19 11:03:36 +00:00
Jeongik Cha a54576bdea Merge "update apex/allowed_deps.txt" into sc-dev 2021-02-19 11:03:11 +00:00
TreeHugger Robot bd72625520 Merge "Add ctx to AndroidMkExtraEntriesFunc" into sc-dev 2021-02-19 01:03:10 +00:00
Jeongik Cha b0fc374461 update apex/allowed_deps.txt
Bug: 150578172
Test: m
Change-Id: Ib8ada6607b628a120103b64ea83132b3f3e6492e
2021-02-19 08:13:49 +09:00
Martijn Coenen 15679b7b27 Merge "Add MediaProvider dependencies to allowed_deps.txt" 2021-02-18 16:55:38 +00:00
Jiyong Park 2f04e04502 Merge "Linktype check error message becomes more correct" am: 4941e4b9d1 am: 4de1a5651f am: 605bc52821
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1593811

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6158deb212cd32e2f41a5484376a6791cfca2460
2021-02-18 16:20:01 +00:00