Commit graph

3179 commits

Author SHA1 Message Date
Treehugger Robot
926d00c2ad Merge "Don't add flattened files apex as dependencies of an image apex" 2022-11-09 05:00:29 +00:00
Wei Li
644c9fea7f Merge "Add support of <APEX>_backing.txt in mixed build." am: 9b9fe02960
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2290700

Change-Id: Ib470b91244d6d0ee29500d01beac2878064fd7ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-08 23:29:34 +00:00
Wei Li
cc73a05670 Add support of <APEX>_backing.txt in mixed build.
Bug: 239081456
Test: CIs
Change-Id: I8a8a5e606d5b1bc19294fc92cd469e7aa01cdb43
2022-11-08 12:00:42 -08:00
Jingwen Chen
e3716ca39e bazel apex: Add mixed builds support for <module>_using.txt file. am: 0c9a276ded
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2287093

Change-Id: I27b3b9d70ac36a99e00abbe840efbd1581f4f75e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-08 02:51:18 +00:00
Jingwen Chen
0c9a276ded bazel apex: Add mixed builds support for <module>_using.txt file.
Test: presubmits
Change-Id: I7203fcccb09f6c93e702550ffa47a4029c3351dd
2022-11-07 23:16:12 +00:00
Liz Kammer
22f7ad00ef Merge "Add apex_test for mixed builds" am: f1c70ed5ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2288161

Change-Id: Ic48f6d8e0e15ce4c474810b99cfda4def165aa38
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-07 22:28:45 +00:00
Liz Kammer
0e255ef6e6 Add apex_test for mixed builds
Test: go test soong tests
Change-Id: I33327e1fe7d6a4bbf32890d9fbd5453c28a9c5b1
2022-11-07 11:11:37 -05:00
Treehugger Robot
5aa7aca857 Merge "Remove unnecessary TestMain()" am: 9fa8a2e220
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2288158

Change-Id: Ia8a4d2e0da4e5a542dc8cb7e242642da68d68032
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-05 01:15:56 +00:00
Treehugger Robot
9fa8a2e220 Merge "Remove unnecessary TestMain()" 2022-11-05 00:30:04 +00:00
Liz Kammer
fdb6321d23 Remove unnecessary TestMain()
Test: go test Soong tests
Change-Id: I2a8710361b1a32d71417b6c7bbc19e87fa8b36ae
2022-11-04 16:24:29 -04:00
Cole Faust
b81814a7b4 Don't add flattened files apex as dependencies of an image apex
The image apex does not need all the files that make up a flattened
apex.

Bug: 254205429
Test: go tests
Change-Id: Iff05f2d01f11397bc9e9bf31868112575268969b
2022-11-04 11:05:49 -07:00
Colin Cross
1c9d4dc64d Merge "Add support for per-arch configuration in apex_defaults" am: a493e5ff91
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2266192

Change-Id: I5fbededf29db88b32585a079d4819a2d0e33069a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 14:38:09 +00:00
Colin Cross
a493e5ff91 Merge "Add support for per-arch configuration in apex_defaults" 2022-11-03 14:00:45 +00:00
Colin Cross
3958986725 Merge "Add exclude_* properties to apex arch-specific properties" am: a3599abc75
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2283143

Change-Id: I79bc652a8f32cbd5bc9ea1c6549b75750dd4d1be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 01:28:47 +00:00
Colin Cross
70572ed01e Add exclude_* properties to apex arch-specific properties
The libcronet prebuilt JNI library doesn't exist for riscv64 yet.
Add exclude_* properties to apex arch-specific properties so that
the libcronet dependency can be excluded from the apex that contains
when the arch is riscv64 until it exists for riscv64.

Test: TestApexWithArch
Change-Id: Ic395a077824f0f60b90178530fbfae8a96b3782f
2022-11-02 14:31:46 -07:00
Colin Cross
cb29876dcb Merge "HACK: use arm64 apex prebuilts for riscv64" am: cc7a5dcf44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2281571

Change-Id: I73464238cb8b4beeb60402096c789adea361ab0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-01 23:05:10 +00:00
Colin Cross
abacbe8436 HACK: use arm64 apex prebuilts for riscv64
There are no riscv64 apex prebuilts, which breaks the build when
provenance_metadata singelton tries to run a tool on all the input
apexes that don't exist.  Hack it to provide the arm64 apex for now
if no riscv64 apex is specified, which will allow the build to pass.

Test: lunch aosp_riscv64-userdebug && m droid
Change-Id: Ic39936539803615ea4b7f817daf7b59ab7c40e7e
2022-11-01 19:13:17 +00:00
Wei Li
60c7023976 Merge "Support new attributes added in ApexInfo in mixed build." am: aff9a46ca5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2271722

Change-Id: I9bef770a5e86bb14518abbbbb95a1d410f195b5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-29 02:01:28 +00:00
Wei Li
32dcdf9038 Support new attributes added in ApexInfo in mixed build.
Bug: 243748589
Test: CI
Change-Id: I6c9869464fe91ebf62811d92cf4403f2c7c9e8a9
2022-10-28 14:06:57 -07:00
Yu Liu
99416d29a6 Merge "Support apex_test." am: 2ff53da9f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2265965

Change-Id: I13c1017e5c91f83c649933c0cdf33a38c0f225ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-26 17:07:57 +00:00
Yu Liu
4c212ce058 Support apex_test.
Bug: 249744489
Test: Manual and unit test.
Change-Id: I866debf7ffee54a0f4649b5e5425a8e3cc3042a1
2022-10-24 10:35:12 -07:00
Nikita Ioffe
e58f527dfc Add support for per-arch configuration in apex_defaults
Bug: 243512044
Test: m
Change-Id: Icd63e8c11b6f65c5b425e4d89b016d400cac72c5
2022-10-24 17:24:38 +01:00
Jiyong Park
4cdaf63554 Merge "Install appSet using InstallFileWithExtraFilesZip" am: 61807339b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2261552

Change-Id: I7cdd0872a78489bdfe464469eb01aa6d85de8b60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 00:29:09 +00:00
Jiyong Park
61807339b8 Merge "Install appSet using InstallFileWithExtraFilesZip" 2022-10-21 00:17:52 +00:00
Treehugger Robot
6ec14861b7 Merge "Introduce BazelStringOrLabelFromProp." am: 95ac23eeeb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2255856

Change-Id: I54a2fd05ede068d2d103769f7144a06aba66bf40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-20 18:36:38 +00:00
Jingwen Chen
6817bbb3c8 Introduce BazelStringOrLabelFromProp.
Soong supports string properties, but they are overloaded, and can mean
one of three things:

* path reference
* module reference
* string literal

Bazel has different types: label and string attributes. Thus there needs
to be a way to categorize them correctly in bp2build.

This CL introduces a new function to be used on properties like
apex_key.private_key / apex_key.public_key, as well as
android_app.certificate / apex.certificate.

It is important to disambiguate the prop betenn a string literal
attribute or file/rule target label attribute, so this functions does
just that.  The new attributes are then further handled by their
respective macros (apex_key, android_binary, apex).

Bug: 253557437
Fixes: 253557437
Test: presubmits, new tests

Change-Id: Id8111cdd60d3aabcae7d17fe9da84d0ee3966023
2022-10-20 14:57:37 +00:00
Jiyong Park
f648d53154 Install appSet using InstallFileWithExtraFilesZip
This fixes a bug that only the primary output of an appSet is installed
when the appSet is part of a flattened APEX.

Bug: 247072627
Test: m GoogleExtServices on a device using flattened APEX.
system/apex/com.android.extservices.gms/priv-app/GoogleExtServices@TM
has these apks:

GoogleExtServices.apk  GoogleExtServices-arm64_v8a.apk
GoogleExtServices-hdpi.apk  GoogleExtServices-ldpi.apk
GoogleExtServices-mdpi.apk  GoogleExtServices-tvdpi.apk
GoogleExtServices-xhdpi.apk  GoogleExtServices-xxhdpi.apk
GoogleExtServices-xxxhdpi.apk

(before the fix, there only was GoogleExtServices.apk)

Change-Id: Icbc4dd002f856a3f751badec781ad132c423ac9b
2022-10-19 18:22:37 +09:00
Vinh Tran
7abf2c4f64 Merge "Default apex's compile_multilib to "first" in bp2build" am: 827db14152
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2243697

Change-Id: I6ffdf6e089443358751840e99981184ddd4d6a8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 14:37:59 +00:00
Vinh Tran
827db14152 Merge "Default apex's compile_multilib to "first" in bp2build" 2022-10-17 14:12:29 +00:00
Vinh Tran
8f5310f90c Default apex's compile_multilib to "first" in bp2build
In Soong, decodeMultilib, used to get multilib to determine the dep variations, return "first" if defaultMultilib is set to "common". apex sets defaultMultilib to "common" which means equivalent compileMultilib in bp2build for apex should be "first" (See new Soong unit tests for more context).

This CL fixes bp2build for apex to be more correct.

Bug: 251559512
Test: go tests
Change-Id: Id1cb4407980fc1fab91822c81326f37fb4adfa0a
2022-10-13 16:59:30 -04:00
Colin Cross
b5645cb929 Merge "Move checking of minApiForArch for apex into cc" am: 21c71a35bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2243980

Change-Id: Ie2123163a7d78d023db91d857dd012b83c3898f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-13 20:56:51 +00:00
Colin Cross
21c71a35bd Merge "Move checking of minApiForArch for apex into cc" 2022-10-13 20:15:30 +00:00
Treehugger Robot
9e192c1bfe Merge "Add riscv64 support for apex prebuilt" am: edc294aff2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2252453

Change-Id: Iac1b28b848431ea8e38e7e468138449ca17bcf4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-12 20:21:56 +00:00
Chen Guoyin
401f298e50 Add riscv64 support for apex prebuilt
This add support for src field in bp file.

Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: I9393696951db375d53436f9d5a9841b6a072cea3
2022-10-13 00:00:11 +08:00
Xin Li
748b114481 Merge "Merge tm-qpr-dev-plus-aosp-without-vendor@9129937" into stage-aosp-master 2022-10-11 17:39:27 +00:00
Colin Cross
8ca61c1820 Move checking of minApiForArch for apex into cc
I49220cbec628f1508709741dc56b62aaac7786d9 attempted to allow
apexes to depend on native code whose min_sdk_version had been
increased to meet the minimum supported API level for a new
architecture.  It wasn't quite right, as it assumed that the
primary architecture of the apex would be the newest, and
it applied to all dependencies, not just ones that were
specfiic to the new architecture.  Move the checking into
cc.ShouldSupportSdkVersion, where it can be specific to an
individual architecture variant.

Bug: 250918230
Test: TestApexMinSdkVersion_MinApiForArch
Change-Id: I303cf485ba54b4c6bf63a9f9b49286ff9b2c9c83
2022-10-07 16:04:50 -07:00
Xin Li
4369cdc509 Merge tm-qpr-dev-plus-aosp-without-vendor@9129937
Bug: 248070379
Merged-In: I368aabf4d032c02773416f27affa12eb40e77b40
Change-Id: I7747fa3ef0bb518c1b2aedd9170b9d4d880dc3af
2022-10-06 11:59:15 -07:00
Jingwen Chen
1d873331ad apex_key bp2build: disambiguate module and src deps.
(and remove unused keyName field.)

The private_key and public_key props of an apex_key can point to either
a module or a string. If it's a module, then respect it. If it's a
string, there's additional product variable lookup to find the apex_key
files in product_vars's DefaultAppCertificate parent dir.

This is similar to android_app_certificate.

Test: presubmits
Change-Id: Ib258da14cb0c2df8b5f817fcbc46afebcf225db8
2022-10-06 05:56:05 +00:00
Colin Cross
ec731a83e3 Merge "Use MinApiForArch to set minSdkVersion for apexes" 2022-10-05 22:03:22 +00:00
Colin Cross
a497606f1d Merge changes I154a6f3a,I79f0c20a,I605ae9af,I647c7305,I95e96e3e, ...
* changes:
  Move fuzzer's CollectAllSharedDependencies into GenerateAndroidBuildActions
  Support AllowMissingDependencies in prebuilt_apex modules
  Support AllowMissingDependencies for apex dependencies
  Add AllowMissingDependencies support for prebuilt_etc module with no src property
  Make OutputFileForModule work for AllowMissingDependencies
  Fix panics when target arch is riscv64
2022-10-05 21:25:17 +00:00
Colin Cross
56534df14f Use MinApiForArch to set minSdkVersion for apexes
Apexes for new architectures have to increase their minSdkVersion
to the minimum supported version for the architecture.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I49220cbec628f1508709741dc56b62aaac7786d9
2022-10-04 19:15:45 -07:00
Colin Cross
553a31be9d Support AllowMissingDependencies in prebuilt_apex modules
Arch-specfic prebuilt_apex modules may be missing prebuilts for new
architectures.  Mark the module as missing dependencies and allow
build analysis to continue when AllowMissingDependencies is set.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I79f0c20a0c9443fe443f9ed9bc846aa649f6b6a6
2022-10-04 16:38:14 -07:00
Colin Cross
1d48715961 Support AllowMissingDependencies for apex dependencies
Use android.OutputFileForModule instead of cc.Module.OutputFile,
which will already handle the AllowMissingDependencies case.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I605ae9afe06ac450adec1d2a856e529e45ed5cb5
2022-10-04 16:38:14 -07:00
Colin Cross
a2aaa2fdef Fix panics when target arch is riscv64
Fix panics in api_level.go and apex.go when using riscv64 as the target
arch.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I85c7685f3d14fa2dc7ffbcdea7f490feca304ef7
2022-10-04 10:53:07 -07:00
Jingwen Chen
bea58093b4 Share certificate bp2build between android_app and apex.
The certificate module is handled the same in Soong between android apps
and apexes, so share the bp2build code as well.

There are a few changes in this CL:

- If override_apex.certificate is unset, the generated apex also unsets
  it. This prevents the generated apex from using the base apex's
  certificate, which is most likely incorrect (e.g. google variant using
  the cert for the aosp variant). Instead, rely on the default
  certificate handling in the macro.
- If the certificate prop is a string, then it gets generated into
  certificate_name in order to disambiguate. This behavior is identical
  to android_app.

Test: added various unit tests.

Bug: 249089160
Fixes: 249089160
Change-Id: I99e18964ff546429a985d0f64dc21e2c69d35d9d
2022-10-03 09:20:47 +00:00
Treehugger Robot
649ca6995e Merge "Put base APK when AppSet is included in APEX" am: b5a04d7905 am: 361cfb2309 am: 8c15660653 am: 8abe2b3242
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2238204

Change-Id: Ifd26e31b97da1b16fed3f24c2ac531734b1d5a1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-30 06:01:52 +00:00
Treehugger Robot
b5a04d7905 Merge "Put base APK when AppSet is included in APEX" 2022-09-30 03:44:21 +00:00
Jiyong Park
4169a25f54 Put base APK when AppSet is included in APEX
This change fixes a bug that base APK of an AppSet is not put into the
APEX.

Bug: 236299724
Test: m nothing
Change-Id: I1010ec66d8551fcc1e2d9119be7ecdba22186607
2022-09-29 21:30:25 +09:00
Treehugger Robot
06251a633f Merge "Tag apex_set's 'set' config with android:"path"" am: 76832f5b10 am: b56c637eef am: f8695c4a31 am: b5fcdcd286
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2232749

Change-Id: Id68674672047d67df93137ff256c06775822423b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 23:32:52 +00:00
Pranav Gupta
eba03b0935 Tag apex_set's 'set' config with android:"path"
This allows apex_set's set config to use other soong modules as a dependency

Bug:249169376
Change-Id: I8da20c6f474328d63d9aa3811f94e3e04b89ea4c
Test: Added a test case to check soong module assignment to the set field of an apks_set rule
2022-09-27 16:29:36 +00:00
Jiyong Park
492f71aba8 Merge "Use PackedAdditionalOutputs when reading apk_set for canned_fs_config" am: afc97f0209 am: 48f6bdf8c3 am: 2a0ae316be am: eced5a2c57
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2230649

Change-Id: I1c207b02eebb9a9d952ce37e65773a91ee60fe61
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 01:16:13 +00:00
Jiyong Park
e1b6914f58 Use PackedAdditionalOutputs when reading apk_set for canned_fs_config
When an app_set module is included in an APEX, we don't use its
`builtFile` which is the main APK, , but `PackedAdditionalOutputs()`
which is the zip file where all APK files (main + additional) files are
packed. We then unzip them into the corresponding directory inside the
APEX.

However, `buildFile` still has been used when constructing
canned_fs_config whose content should match with what are actually
included in the APEX. Fixing the bug by using
`PackedAdditionalOutputs()` instead.

Bug: 236299724
Test: m nothing (apex_test.go amended)
Test: follow https://buganizer.corp.google.com/issues/236299724#comment34
* mkdir for-236299724
* cd for-236299724
* repo init -u https://android.googlesource.com/platform/manifest -b
* master --partial-clone --clone-filter=blob:none
* repo sync -c -j8
* unzip -l ~/Downloads/mainline_t_2022_jun_t1004275.zip | cut -c31- | grep | xargs rm -f
* unzip ~/Downloads/mainline_t_2022_jun_t1004275.zip
* source build/envsetup.sh
* choosecombo 1 aosp_arm64 userdebug
* m com.android.extservices.gms

Change-Id: If9752c07748300dbb963568de4e879b041b0a206
2022-09-26 14:55:35 +09:00
Treehugger Robot
2eade656df Merge "Remove obsolete com.android.bluetooth apex" 2022-09-16 05:28:06 +00:00
William Escande
f03a3b00fe Remove obsolete com.android.bluetooth apex
Also remove the soong hack that allowed us to build during the
transition

Bug: 243054261
Test: build + TH
Merged-In: I60bac1ec687f03a38f38240969a1c38a8e5bf92c
Change-Id: I60bac1ec687f03a38f38240969a1c38a8e5bf92c
2022-09-14 21:09:50 +00:00
William Escande
5c832be715 Remove obsolete com.android.bluetooth apex
Also remove the soong hack that allowed us to build during the
transition

Bug: 243054261
Test: build + TH
Change-Id: I60bac1ec687f03a38f38240969a1c38a8e5bf92c
2022-09-14 21:08:53 +00:00
Sam Delmerico
a75a69556f Merge "add jacocoagent by default to Java modules" am: 43c0eb17ae am: 7fd3c3b1f9 am: ea13cbadd0 am: bdbf431271
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2208216

Change-Id: I10879601459847b2b7cd4b4d75b7353e96188e52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 17:04:19 +00:00
Sam Delmerico
1e3f78f866 add jacocoagent by default to Java modules
On coverage builds, R8 will fail to properly optimize and fail the build
if ignore_warnings: false, because jacoco injects dependencies on
jacocoagent classes, but the jacocoagent library is not part of the
classpath libraries passed in to R8 in its arguments.

Instead we can add jacocoagent as a libs dependency for these modules so
that it will get pulled into the r8 flags.

Bug: 243903417
Test: m
Change-Id: Icc24cc260b896fc800125a0318308d823ccf7a83
2022-09-09 16:50:38 -04:00
Sam Delmerico
1b332cd0c3 Merge "jacoco libs dependency for instrumented libraries" am: 3dca115dda am: 882253d037 am: 370f703987 am: a8b4516b59
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2201682

Change-Id: I1e2ece9e538ed7615ad396b3a3ed3e48af80b7e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-02 21:49:35 +00:00
Sam Delmerico
c75937264b jacoco libs dependency for instrumented libraries
On coverage builds, R8 will fail to properly optimize and fail the build
if ignore_warnings: false, because jacoco injects dependencies on
jacocoagent classes, but the jacocoagent library is not part of the
classpath libraries passed in to R8 in its arguments.

Instead we can add jacocoagent as a libs dependency for these modules so
that it will get pulled into the r8 flags.

Bug: 243903417
Test: add optimize.ignore_warnings: false to NetworkStackAppDefaults &&
  make SKIP_ABI_CHECKS=true PRODUCT=cf_x86_phone-userdebug \
  EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true \
  CLANG_COVERAGE=true COVERAGE_PATHS="" \
  TARGET_USERDATAIMAGE_PARTITION_SIZE=17179869184 \
  SKIP_BOOT_JARS_CHECK=true \
  NetworkStack
Change-Id: I71313b1fd35437ec52890f5c30b3fd1381c7c3d2
2022-08-31 16:15:27 -04:00
Dennis Shen
4dd7ab8f24 Merge "Place native shared libs for soong build DCLA." am: ee959f49eb am: dec8ae572d am: 51ec697e2d am: 46df0dcbc7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2172270

Change-Id: I7c8fa8f14cc82e94f1b179722c2240f9a6c36c24
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 18:45:48 +00:00
Dennis Shen
ee959f49eb Merge "Place native shared libs for soong build DCLA." 2022-08-19 17:23:24 +00:00
Paul Duffin
dd9ff24dcd Merge "Reformat build/soong for go 1.19" am: 29d1667846 am: e20a796b76 am: d1d37b3056 am: 72b685eb29
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2186600

Change-Id: Ib42f4bbda790f2e32bcb27c1acacb6412d07d2ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 12:23:09 +00:00
Dennis Shen
af41bc13da Place native shared libs for soong build DCLA.
Currently, DCLA is built in rapid. With new train build, DCLA will be
directly built in soong, just like a regular module, refer to
b/239679485. In old rapid built DCLA, native shared libs are placed the
following way inside apex:

/lib(64)?/foo.so/<sha256 foo.so>/foo.so

The sha256 hash is used to differentiate different libs. To ensure the
same lib placement in soong built DCLA, three changes are made:

(1) in apex.go, added an apex soong module property called
dynamic_common_lib_apex to indicate if this apex is a DCLA
(2) in builder.go, update apexRule to call into run_apexer binary
instead of apexer binary. run_apexer binary is a wrapper of apexer
binary. If it is DCLA, the wrapper binary will place the native
shared libs in desired location and update canned_fs_config accordingly.

TEST: manuualy added this field to adbd. Local build by banchan
and then inspect the payload image contensts. All libs are proprely
placed.

BUG: 241096765

Change-Id: I2a5e7ea75a6e9a7af1932ff7dccb9dc3a3785db9
2022-08-18 18:25:19 +00:00
Colin Cross
d079e0b270 Reformat build/soong for go 1.19
Test: none
Change-Id: I132368f0fcbdb5ea088b5b84dbe4ccfdd9e94cad
2022-08-17 10:43:13 -07:00
Treehugger Robot
9e5b2e06af Merge "Introduce cc_api_library" am: 3a4088dfd1 am: d03ea3d4f1 am: 9076168ab5 am: 560087b69e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2162587

Change-Id: I9560f854f30e2a42e506e8c357d9d614872f2db2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 06:03:34 +00:00
Treehugger Robot
d03ea3d4f1 Merge "Introduce cc_api_library" am: 3a4088dfd1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2162587

Change-Id: I0902c1a7757db36b7fd4564c356f5f6046d3d1af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 04:35:55 +00:00
Treehugger Robot
3a4088dfd1 Merge "Introduce cc_api_library" 2022-08-10 04:12:32 +00:00
Kiyoung Kim
487689eaee Introduce cc_api_library
Introduce cc_api_library, which reflects imported API from other
inner-tree. This cc_api_library module type will later refer from
the other ninja module which generates stub library from the interface
description.

Tested environment :
* original libc definition has been removed temporarily, to ensure that
  imported api stub library is being used from build
* Added new definition of libc as below
 cc_api_library {
  name: "libc",
  arch: {
    x86: {
      src: "libs/x86/libc.so",
    },
    x86_64: {
      src: "libs/x86_64/libc.so",
    },
  },
  header_libs: [
    "libc_headers",
  ],
  export_header_lib_headers: ["libc_headers"],
  min_sdk_version: "9",
  vendor_available: true,
 }

Bug: 236087698
Test: `ALLOW_MISSING_DEPENDENCIES=true m vendorimage` succeeded
Change-Id: I67070b0f3561aa2afd73b6c1c0fdf4255218baac
2022-08-10 10:12:18 +09:00
Spandan Das
8e742d4188 Merge "Spellcheck" am: 6b7c1dbf88 am: d6068de346 am: 88654a8b88 am: 8db5f3ffd9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2175925

Change-Id: Ia17fd408f3ba2d878beb0265dc4c5bd9ce1bb243
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-05 23:35:02 +00:00
Spandan Das
d6068de346 Merge "Spellcheck" am: 6b7c1dbf88
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2175925

Change-Id: I19195f0a91317762b24bb99c10c06bab79fcf455
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-05 21:50:03 +00:00
Spandan Das
a5f39a12de Spellcheck
This should fix a spelling error that crept in during a documentation CL

Test: N/A
Change-Id: I085f7fd1399f06e3b8808ed54963abce0e06f7fe
2022-08-05 02:36:36 +00:00
Treehugger Robot
f31eb7ded3 Merge "Remove obsolete notice property." am: 0ea404eb36 am: 13d06a134f am: 941ca2a81d am: 054a7691c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2156349

Change-Id: I45e40a639aac2b0de6ce07e69a19ad3f64f63ca7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 18:53:54 +00:00
Treehugger Robot
13d06a134f Merge "Remove obsolete notice property." am: 0ea404eb36
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2156349

Change-Id: Ib08598705dbf4904d50f18b1b1c5c206557cf197
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 17:46:17 +00:00
Treehugger Robot
0ea404eb36 Merge "Remove obsolete notice property." 2022-08-02 17:22:42 +00:00
Jingwen Chen
c71569ef5d Export default apex version from updatable_modules.go to Bazel's am: 7810e17e54 am: 88516533e1 am: 0e0dd7d4c7 am: 08f1333ec8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2168944

Change-Id: I56bc811860f0953652de4fb1ca90e9a9d0adb3c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 13:20:34 +00:00
Jingwen Chen
88516533e1 Export default apex version from updatable_modules.go to Bazel's am: 7810e17e54
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2168944

Change-Id: Ic5fde55e1dc90d60772635458f16e5626cf8b41c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 12:21:45 +00:00
Alexei Nicoara
f99fac8f5a Merge "Moving default version outside of apex package" am: 21b027dca8 am: 18ecb86247 am: 65e6a8c7b9 am: 4e1ef5f5b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2167105

Change-Id: I262912a958483563fe88a66d1fec600fc36b3617
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 11:21:46 +00:00
Jingwen Chen
7810e17e54 Export default apex version from updatable_modules.go to Bazel's
apex_toolchain through soong_injection.

This is necessary to keep both Bazel and Soong in sync.

Test: presubmit
Bug: 238723069
Fixes: 238153998

Change-Id: Ibf4a8ed91d358dc7800c10e4112485a52f0606bb
2022-08-02 10:11:36 +00:00
Alexei Nicoara
18ecb86247 Merge "Moving default version outside of apex package" am: 21b027dca8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2167105

Change-Id: I92100d519f4744678a4c1082c460daddc085cb56
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 09:18:23 +00:00
Alexei Nicoara
7579b67ef9 Moving default version outside of apex package
The default version needs to be used by both apex and apk updatable
modules. Moving it to android package so it can be accessed without
circular dependencies.

Test: presubmit
Bug: 231691162

Change-Id: Icafd50d0b065e89a115ae9c9b6ea55adf2730b49
Merged-In: Icafd50d0b065e89a115ae9c9b6ea55adf2730b49
2022-08-01 16:28:48 +01:00
Treehugger Robot
88f1d5d368 Merge "Implement mixed builds for apex modules, take 2." am: 88e7512572 am: 953254b150 am: 1c0be10898 am: e4fe8254fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2167802

Change-Id: If608e5c6aaaabcef7c2586a19f6779cca91910d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-30 00:26:42 +00:00
Treehugger Robot
953254b150 Merge "Implement mixed builds for apex modules, take 2." am: 88e7512572
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2167802

Change-Id: I9efd3c2e6f8c93aa8d1add3cbe6802e24d73b084
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 23:06:00 +00:00
Treehugger Robot
88e7512572 Merge "Implement mixed builds for apex modules, take 2." 2022-07-29 22:43:19 +00:00
Bob Badour
0cc5facf79 Remove obsolete notice property.
Bug: 192434786

Test: m droid dist

Change-Id: I0f384ae895cebab9732448b82db600c67eb8f711
2022-07-29 17:54:40 +00:00
Sasha Smundak
fe9a5b833d Implement mixed builds for apex modules, take 2.
* Add ApexCqueryInfo to obtain apex artifacts used by the makefile
  generator and downstream modules
* Refactor code common to GenerateAndroidBuildActions and ProcessBazelQueryResponse
* Implement android.MixedBuildBuildable for modules
* Enable mixed build for apex modules with payload_type:"image"

The first take 6a2b7c40b was setting compressed APEX suffix incorrectly, and
was reverted in 8a3c91494.

Fixes: 239925080 239695521 232085015
Test: treehugger
Change-Id: I1720f8db3c7cc773183d25a815d9b7eeaf7c73ad
2022-07-28 14:43:50 -07:00
Ken Chen
adc07dce61 Merge "Disallow '_' in bpf source name" am: d8cded58fe am: 9b259932f7 am: 8219d90a58 am: 318d8c51f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2147825

Change-Id: Ib33a7069c9301d4836694f16fb5926f6ec5d8415
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 08:50:51 +00:00
Ken Chen
9b259932f7 Merge "Disallow '_' in bpf source name" am: d8cded58fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2147825

Change-Id: Ia3ea5b08ccd37f096ad7d9cd053a45b25b045ba3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 07:21:56 +00:00
Ken Chen
d8cded58fe Merge "Disallow '_' in bpf source name" 2022-07-28 07:00:12 +00:00
Martin Stjernholm
49e037486b Merge "Revert "Implement mixed builds for apex modules."" am: 0bb7f0494e am: 2fb081fd28 am: 3346a24aef am: 87b3ef440b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2165026

Change-Id: I277e0641c4423109c5f8b42b275d8e462f2d891e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 16:04:08 +00:00
Martin Stjernholm
2fb081fd28 Merge "Revert "Implement mixed builds for apex modules."" am: 0bb7f0494e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2165026

Change-Id: I375077ee73ba18308d0841ca76956757935dd992
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 14:08:18 +00:00
Martin Stjernholm
0bb7f0494e Merge "Revert "Implement mixed builds for apex modules."" 2022-07-26 13:52:18 +00:00
Martin Stjernholm
8a3c914942 Revert "Implement mixed builds for apex modules."
Revert submission 2147387-mixed_builds

Reason for revert: Breaks zipapex build on git_master-art-host
Bug: 239925080
Reverted Changes:
I9f1e03e5e:Implement mixed builds for apex modules.
I13d9a0270:Add container and bundle encription key pairs to t...

Change-Id: I0eaad4dd81cac16d634f4c9cec18137a38e30d47
2022-07-26 09:35:39 +00:00
Paul Duffin
e3e8ba7745 Merge "Export any platform_compat_config used by apex to sdk snapshot" am: 69d09f49ec am: fa26f65155 am: 4dcb86de2c am: a984b2b876
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2160797

Change-Id: I416dc6c804b2b110946d879f10fcbe1b5683132e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 23:39:41 +00:00
Paul Duffin
fa26f65155 Merge "Export any platform_compat_config used by apex to sdk snapshot" am: 69d09f49ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2160797

Change-Id: Icb98af219a66d7ad48518ac49c6150798361f62b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 22:29:39 +00:00
Paul Duffin
fcf79850d8 Export any platform_compat_config used by apex to sdk snapshot
Previously, the platform_compat_config modules needed to be explicitly
listed in the sdk snapshot and the apex. This change will automatically
export them to the sdk snapshot when the apex is listed in its apexes
property.

Bug: 232401814
Test: m tethering-module-sdk
      # Before this change the generated snapshot did not contain the
      # platform_compat_config, after this change it did.
      m art-module-sdk
      # As that explicitly specifies the platform_compat_config in its
      # compat_configs property this change has no effect.
Change-Id: Ia854b9a52db2b1619fca41a387ce98d7f9f9efe9
2022-07-20 14:18:24 +00:00
Alexander Smundak
8e728f144e Merge "Implement mixed builds for apex modules." am: 9ec1ff98b7 am: f7ccf8c822 am: 34a6bda87e am: 035e5fddd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2104104

Change-Id: I65ea31f7232738d87ed3319c684475fa7d44d561
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 15:01:44 +00:00
Alexander Smundak
f7ccf8c822 Merge "Implement mixed builds for apex modules." am: 9ec1ff98b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2104104

Change-Id: I1fb794735088c8d69bd425cbe6a9d4b62b9ca43d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 13:59:21 +00:00
Alexander Smundak
9ec1ff98b7 Merge "Implement mixed builds for apex modules." 2022-07-19 13:38:55 +00:00
Treehugger Robot
ba126223e4 Merge changes I0484ea34,I188e4824 am: b3f18a9f9f am: 03c590b4e1 am: bc5a0199e9 am: 3283d6c8d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2153678

Change-Id: I067e38c5db2f7b09820df4c3c45b3ffefcade38e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 07:44:47 +00:00
Treehugger Robot
03c590b4e1 Merge changes I0484ea34,I188e4824 am: b3f18a9f9f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2153678

Change-Id: I412a85473760a3dc7915984d013350edb00ad74b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 06:44:19 +00:00
Jiyong Park
85cc35a143 Distinguish # apex and # systemapi symbols
Previously, the symbol tag `# apex` was treated the same as `#
systemapi`. With this CL, they have different meanings.

`# systemapi`: APIs that are defined in the platform (the non-updatable
part), and are exposed to unbundled system components like APEX

`# apex`: APIs that are defined in the APEX and are exposed to the
platform or other APEXes

Bug: 239274367
Test: m
Change-Id: I0484ea349656dbbd337e5fe3a5970f0ad275b807
2022-07-19 13:47:19 +09:00
Sasha Smundak
6a2b7c40b3 Implement mixed builds for apex modules.
* Add ApexCqueryInfo to obtain apex artifacts used by the makefile
  generator and downstream modules
* Refactor code common to GenerateAndroidBuildActions and ProcessBazelQueryResponse
* Implement android.MixedBuildBuildable for modules
* Enable mixed build for apex modules with payload_type:"image"

Bug: 232085015
Test: treehugger
Change-Id: I9f1e03e5e7a5b5dde35a5db10c253069543ac973
2022-07-18 13:34:36 -07:00
Alexei Nicoara
d4ffbcacb6 Merge "Cleaning up comment removal and version replacement" am: 74788ec25e am: 2276889374 am: 6ed3b0b41a am: b003b289d1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2151256

Change-Id: Ieebac0a5127ab28f4ad4dc5282fcb4ba7f20f386
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 12:31:05 +00:00
Alexei Nicoara
2276889374 Merge "Cleaning up comment removal and version replacement" am: 74788ec25e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2151256

Change-Id: I4ca57f41efd50def2c4a204e34d1567f9e6f5d1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 11:37:59 +00:00
Alexei Nicoara
e2d0984654 Merge changes Ibcf908d9,I786ab152 am: 1e3d27821b am: 6a5cdc7c19 am: 2426047290 am: a5642cbdfb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149659

Change-Id: I4879ce2b54a55eb33d942e1c714119addf411d6f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 14:37:35 +00:00
Alexei Nicoara
0a3892031e Cleaning up comment removal and version replacement
jsonmodify is now responsible for striping the comments and replacing the placeholder  version with the defaule one. Cleaning up the old code.

Test: presubmit
Bug: 231691643
Change-Id: I09af00199aefec09b2d5995b2923525a3a42c362
2022-07-12 14:50:48 +01:00
Alexei Nicoara
6a5cdc7c19 Merge changes Ibcf908d9,I786ab152 am: 1e3d27821b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149659

Change-Id: I59debb4001f86899d6116df849088db60832e3c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 13:28:03 +00:00
Alexei Nicoara
d887e24260 Cleaning up the version sed rule
Bug: 231691643
Test: presubmit, checked itermediary jsons
Change-Id: Ibcf908d9365ab41e5a19211f5a60305a0896dea5
2022-07-12 11:53:21 +01:00
Alexei Nicoara
e938002c24 Merge "Replace version 0 with the default version" am: 2971a94e4c am: 656399f062 am: 2668973418 am: c34e227419
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149073

Change-Id: Ib16bec5543d9bba6eed411a7dd27e6137bc18ac6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 11:29:37 +00:00
Alexei Nicoara
656399f062 Merge "Replace version 0 with the default version" am: 2971a94e4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149073

Change-Id: Iab0a62bca5829017965ad2dfdf85423792ff7733
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 09:31:10 +00:00
Alexei Nicoara
e922d2139d Replace version 0 with the default version
Having 0 as the default version causes problems in flattened apexes and
is being parsed in protobuf as non-existing field. It will be hard to
revert 100 of commits for all the modules. Changing the version in soong
to mitigate time impact.

Test: presubmit, checked .intermediary jsons
Bug: 231691643
Change-Id: I451186d79fd9f8345fd4e28d9daadbfc59047445
2022-07-08 17:38:52 +01:00
Paul Duffin
3611e6609d Merge "Add apexes property to sdk" am: 0d89b3dc27 am: 4057d6455a am: da014983b3 am: 00e64f4aa0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096447

Change-Id: Icaef07d099761c689ce7556b04b655971f30b4c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 12:08:22 +00:00
Ken Chen
5372a24375 Disallow '_' in bpf source name
Current design:
1. The bpf compiled object name is derived from the source name
   (e.g. foo.c -> foo.o).
2. Full bpf program/map name are concatenated by object name + '_' +
   program/map name in run-time. (e.g. obj name: x.o; program name: y_z;
   full bpf program name will be x_y_z)

Issue:
x.o with map y_z and x_y.o with map z can cause naming collision in
run-time, since both result in x_y_z. This commit prevents it from
happening with a build-time check.

Bug: 236706995
Test: m
Change-Id: Ic03bfcf07a5748ed63246b71d5ae8de0405e658a
2022-07-07 20:02:28 +08:00
Paul Duffin
4057d6455a Merge "Add apexes property to sdk" am: 0d89b3dc27
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096447

Change-Id: Ib57f709febd0827967afcd301825d7dae568b67a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 10:59:52 +00:00
Paul Duffin
0d89b3dc27 Merge "Add apexes property to sdk" 2022-07-07 10:40:00 +00:00
Treehugger Robot
f26e6d0f5f Merge "Passing default version to zipApex as well" am: 87d74dc54e am: 97bc4873db am: 52939c2ec8 am: e099d90bd5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2146859

Change-Id: Ic26807d0a4d0c6c8e93b3ab95cb5212f0d0dd78a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 19:14:08 +00:00
Treehugger Robot
97bc4873db Merge "Passing default version to zipApex as well" am: 87d74dc54e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2146859

Change-Id: I08367146ccb17bc16ad6d612c1470f850b469955
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 18:21:11 +00:00
Treehugger Robot
87d74dc54e Merge "Passing default version to zipApex as well" 2022-07-06 17:42:34 +00:00
Paul Duffin
4e7d1c43e2 Add apexes property to sdk
Specifying an apex in the apexes propety will cause all the
*classpath_fragments that are contents of the APEX to be automatically
added as members of the sdk and appear in the snapshot.

The purpose of this change is to dedup the APEX and sdk definitions and
try and avoid some of the issues that we have been finding while
attempting to build against the prebuilts.

Two tests, one each for bootclasspath_fragment and
systemserverclasspath_fragment, have been refactored to compare the
output when adding the *fragment to the sdk directly of via the APEX.
That ensures switching to use the APEX will not change the sdk snapshot
unless it was previously missing a *fragment.

There was also a slight difference in where the hidden API flags were
copied from. That should have no impact on the output as the flags are
identical.

The sdk snapshot generation needed some tweaks to avoid generating a
prebuilt for the APEX.

Bug: 232401814
Test: m nothing
Change-Id: I7aaf16a3a0ab4bebf97765d1484215cc008dc4b8
2022-07-06 15:58:43 +00:00
Alexei Nicoara
c939b0181d Passing default version to zipApex as well
Test: presubmit
Bug: 231691643
Change-Id: Ic751d7ea2d23180855897702a03bf1b589d7ef80
2022-07-06 13:56:50 +01:00
Alexei Nicoara
919fc29377 Merge "Removing comment lines from apex_manifest.json" am: f6152a161b am: 663d7560da am: 5bb9d3e85d am: 8a9f099c34
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2142072

Change-Id: Iadfc5433db3a40e8397f3ee566b2a21f707c94cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 15:20:43 +00:00
Alexei Nicoara
663d7560da Merge "Removing comment lines from apex_manifest.json" am: f6152a161b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2142072

Change-Id: I1009e2d99e417e25e48b24345810f32f5dcaf818
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 14:30:12 +00:00
Alexei Nicoara
ee4b633627 Removing comment lines from apex_manifest.json
Allowing comments in apex_manifest.json by stripping all the lines which
start with //

Test: presubmit
Bug: 237532860
Change-Id: Iec8c9987edf19b763b2b87df7d125c006ffb217a
2022-06-30 16:34:28 +01:00
William Escande
49bc23b601 Clear apex.go entries for bluetooth libs am: 89bca3f301
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19111518

Change-Id: Ib43164dedb4fcd90addcecd570f195e08dc6428b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 00:55:59 +00:00
Xin Li
42307c80c7 Merge "Merge tm-dev-plus-aosp-without-vendor@8763363" into stage-aosp-master 2022-06-29 21:16:54 +00:00
Treehugger Robot
4f7d0eb241 Merge "Refactor apexBundle code." am: 114ad30d76 am: 7028b50308 am: a416730bf1 am: 05941e95e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2138053

Change-Id: I41db417767906075c49c274bab766773e5cebab2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 09:17:56 +00:00
Treehugger Robot
a416730bf1 Merge "Refactor apexBundle code." am: 114ad30d76 am: 7028b50308
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2138053

Change-Id: I20c91b9425adffb44115dfc59e4b40cfa562b669
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 08:32:59 +00:00
Sasha Smundak
6f9e91d5e9 Refactor apexBundle code.
Move dependency walker out of GenerateAndroidBuildActions, reduce IDE
warnings.

Test: treehugger
Change-Id: I520c59772b1da7102d2a2364b2c56789455ea7fb
2022-06-28 22:47:43 -07:00
William Escande
89bca3f301 Clear apex.go entries for bluetooth libs
The module availability to Bluetooth is currently hard-coded in apex.go.
We are in the process of cleaning the apex.go by adding the availability
in each required module

Test: Build + TH + boot phone & use bluetooth
Bug: 216433795
Change-Id: I883a12f89a6d7eb43778e04ac50d6af38dd97116
2022-06-29 01:04:15 +00:00
William Escande
0ac940fab3 Merge "Clear apex.go entries for bluetooth libs" into tm-qpr-dev am: aec111952d
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18743691

Change-Id: Ied2610e2599dea44e338b3d3f51bd5e873bf3400
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 23:25:51 +00:00
William Escande
aec111952d Merge "Clear apex.go entries for bluetooth libs" into tm-qpr-dev 2022-06-28 23:09:56 +00:00
Oriol Prieto Gascó
cda10e187b Merge "Hard-code apex_available handling for the btservices apex" into tm-dev am: 3bb9d7a8d9 am: bb63423da1 am: 7b8cb64821
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18972588

Change-Id: I7742de88e124be497b0f60a73fd81852c464848d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 18:38:07 +00:00
Oriol Prieto Gascó
7d7bc5bef1 Merge "Hard-code apex_available handling for the btservices apex" into tm-dev am: 3bb9d7a8d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18972588

Change-Id: I5c6cc4bc32174ba0739d7ed6b42ae0b1685c4ef6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 17:43:25 +00:00
Oriol Prieto Gasco
8132fbf8c1 Hard-code apex_available handling for the btservices apex
Bug: 236192423
Test: TH
Change-Id: Ie095ae22704a80e0ec171b1bb3fdc995f95a1c64
2022-06-19 23:13:25 +00:00
Treehugger Robot
9f7fa50427 Merge "Restrict IsSanitizerEnabled() to android.Config()." am: 1c6502eba2 am: 7125d5d606
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2127446

Change-Id: Ie6b578793fa05304b869795af4e0ca4455b75d5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 23:05:53 +00:00
Lukacs T. Berki
01a648afa0 Restrict IsSanitizerEnabled() to android.Config().
Turns out, the whole context is not needed and then let's not
plumb it any further than necessary.

Test: Presubmits.
Change-Id: I1a25738e5a6ca20dea0d973c2ce435b5e152399b
2022-06-17 08:59:37 +02:00
Paul Duffin
5556c5f17a Treat <x> and <x>_compressed prebuilt APEXes as being equivalent
(cherry picked from commit 1aa50564c7)

When extracting dex files from prebuilt APEXes the build fails if it
finds two or more prebuilt APEXes that could provide the dex files.
This change treats <x> and <x>_compressed APEXes as being the same
and always selects the uncompressed APEX.

Bug: 235284603
Test: m nothing
      # Added TestDuplicateButEquivalentDeapexersFromPrebuiltApexes
      # Failed without this change, works with it.
Merged-In: I805cb9dfa9f590c91585d75c4f4586b212b73d41
Change-Id: I805cb9dfa9f590c91585d75c4f4586b212b73d41
2022-06-13 13:16:53 +00:00
Paul Duffin
5c24484a50 Merge "Treat <x> and <x>_compressed prebuilt APEXes as being equivalent" into tm-dev am: 60c0b9ec9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18801840

Change-Id: Ib7e45cf518950d65e7b87da42a0f5883266b0c5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 12:32:16 +00:00
Paul Duffin
60c0b9ec9c Merge "Treat <x> and <x>_compressed prebuilt APEXes as being equivalent" into tm-dev 2022-06-11 12:13:45 +00:00
Jingwen Chen
bd5b1a3672 Merge "bp2build: convert apex.logging_parent." am: c90a3cd6f6 am: d0645003cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2122357

Change-Id: Ic3bd9285dba93cc5c9455c3e4d91d6d460f776f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 03:15:54 +00:00
Jingwen Chen
c90a3cd6f6 Merge "bp2build: convert apex.logging_parent." 2022-06-11 02:38:08 +00:00
Treehugger Robot
302846a63b Merge "Fix strip_prefix flags to strip install paths." am: 20b623da89 am: 28b9607224
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2120624

Change-Id: I5c9edaeb2df8a61eb18fe9368dd2f8e9d1321343
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 20:32:30 +00:00
Treehugger Robot
20b623da89 Merge "Fix strip_prefix flags to strip install paths." 2022-06-10 18:07:41 +00:00
Paul Duffin
1aa50564c7 Treat <x> and <x>_compressed prebuilt APEXes as being equivalent
When extracting dex files from prebuilt APEXes the build fails if it
finds two or more prebuilt APEXes that could provide the dex files.
This change treats <x> and <x>_compressed APEXes as being the same
and always selects the uncompressed APEX.

Bug: 235284603
Test: m nothing
      # Added TestDuplicateButEquivalentDeapexersFromPrebuiltApexes
      # Failed without this change, works with it.
Change-Id: I805cb9dfa9f590c91585d75c4f4586b212b73d41
2022-06-10 11:05:53 +00:00
Jingwen Chen
b732d7c765 bp2build: convert apex.logging_parent.
Test: CI
Fixes: 235559958

Change-Id: I7b578c67eedb0379603bcf2fc029d03facfbbb0f
2022-06-10 08:38:03 +00:00
Bob Badour
3d16d5ddf8 Fix strip_prefix flags to strip install paths.
Bug: 235331488

Test: m droid dist

Change-Id: I3cd2af5d90e46a4c983728bc9b2d941d6ffda229
Merged-in: I3cd2af5d90e46a4c983728bc9b2d941d6ffda229
2022-06-09 15:00:08 -07:00
Bob Badour
c6ec9fb849 Fix strip_prefix flags to strip install paths.
Bug: 235331488

Test: m droid dist

Change-Id: I3cd2af5d90e46a4c983728bc9b2d941d6ffda229
2022-06-09 14:24:41 -07:00
Alexei Nicoara
7a7990f5cd Merge "Passing the default apex version to the apexer" am: 5b96d35851 am: ffe4e6394e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2104336

Change-Id: I0cc613283a063044fafe238c49526d50d8c95055
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 11:09:31 +00:00
Alexei Nicoara
5b96d35851 Merge "Passing the default apex version to the apexer" 2022-06-09 08:58:27 +00:00
Jingwen Chen
fe05ba0f01 Merge changes Ib9a08167,I925e98d5 am: 1f0b70e7c0 am: 08ee8f7360
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2119933

Change-Id: I817cdb98dbf3d390532ac14c6b0727d2ed894e15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 08:10:29 +00:00
Alexei Nicoara
3f8cbcb82c Passing the default apex version to the apexer
Test: presubmit
Bug: 231691643
Change-Id: I900a6acde9f212bf785b0be35f422416c8b62792
2022-06-08 17:49:50 +01:00
Jingwen Chen
df165c9e85 Only override prebuilts property if the override_apex.prebuilts is
explicitly specified (not nil).

This allows the base apex's prebuilts to be surfaced to the override
apex target.

Discovered when com.google.android.adbd's prebuilts didn't contain its
init.rc module.

Bug: 222588072
Test: CI
Change-Id: I925e98d53f7d9208652c629799ab568521ba7dfe
2022-06-08 16:03:03 +00:00
Treehugger Robot
2ab17c0491 Merge "bootclasspath_fragment: Require at least one hidden_api package property" am: 4a737a2d8b am: 811d444ce1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062450

Change-Id: I0e4673a5d702427d752e3e413bae96454b601207
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 18:33:18 +00:00
Treehugger Robot
4a737a2d8b Merge "bootclasspath_fragment: Require at least one hidden_api package property" 2022-06-06 16:05:12 +00:00
Treehugger Robot
45f09a5eed Merge "Convert override_apex.package_name with bp2build." am: 335071dad2 am: 463a1e580f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2114879

Change-Id: I57e30e1053115a05e8c56122f175c50b9f3944fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 15:46:52 +00:00
Treehugger Robot
335071dad2 Merge "Convert override_apex.package_name with bp2build." 2022-06-06 14:59:07 +00:00
Jingwen Chen
9b7ebca187 Convert override_apex.package_name with bp2build.
Bug: 216414792
Test: CI and new bazel/bp2build tests
Change-Id: I3974970cdd555b3912798e79e61d61786a4ff677
2022-06-06 10:08:53 +00:00
William Escande
cfbdc3bb69 Clear apex.go entries for bluetooth libs
The module availability to Bluetooth is currently hard-coded in apex.go.
We are in the process of cleaning the apex.go by adding the availability
in each required module

Test: Build + TH + boot phone & use bluetooth
Bug: 216433795
Change-Id: I545ad6039e501c70e3ff5d9fc74fabfd37067145
2022-06-04 02:13:54 +00:00
Treehugger Robot
4815e771f9 Merge "Make sure dist files have license metadata." am: f57b54cda7 am: c688531cba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063295

Change-Id: I09562d127844d389cb6af0c13833c6a463c826ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 18:19:54 +00:00
Bob Badour
5180438478 Make sure dist files have license metadata.
Bug: 151177513
Bug: 210912771

Test: m droid dist reportmissinglicenses

Change-Id: I0c85f6c49a3e9d9bb3219ed6ddfb939d90f80656
2022-06-01 21:07:25 -07:00
Paul Duffin
9fd564711e bootclasspath_fragment: Require at least one hidden_api package property
Previously, the split_packages, single_packages and package_prefixes
properties were all optional and the split_packages defaulted to ["*"].
As that value conflicted with the other package properties that meant
that split_packages always had to be specified even if it was to just
set it to an empty array.

This change requires at least one of them to be specified and defaults
split_packages to an empty list which means it is not required,
although it can be helpful to make that explicit.

Bug: 194063708
Test: m nothing
Change-Id: I5a4c2d68e72e39f5c4a2441326dfce8685fc8ff2
2022-05-27 16:27:50 +01:00
Wei Li
607978227e Convert the property "manifest" properly for override_apex. am: 40f9873612 am: e577ddd482
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2100361

Change-Id: I6baaa602a3d591974b68ac3d9362f8adc0529470
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 05:34:22 +00:00
Wei Li
40f9873612 Convert the property "manifest" properly for override_apex.
1) When it is not set in base apex, default file name should be set explicitly in bp2build converter of apex
2) The manifest file path should be used as-is when base apex and override_apex is in the same Android.bp
3) The manifest file path should be prepended with package of base apex when base apex and override_apex is in different Android.bp

Bug: 216442475
Test: m nothing
Change-Id: Icd3523ebc31d885f67bea02aec05dbfc77671e87
2022-05-23 17:22:35 -07:00
Oriol Prieto Gascó
c17b70053d Merge "Revert "Append APEX version instead of build ID for APK-in-APEX ..."" into tm-dev 2022-05-23 19:49:32 +00:00
Bob Badour
efdf8ab4cc Fix bug: allow multiple gen_notice modules. am: a5ea2479d3 am: d9771dedbb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098696

Change-Id: I921b541c513779e4a73a70876a9ffff23e4361f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-21 03:22:39 +00:00
Bob Badour
a5ea2479d3 Fix bug: allow multiple gen_notice modules.
Test: m cts dist reportmissinglicenses

Change-Id: I07963c83eaddfe363a04871e813b56fe7f1465ad
2022-05-20 16:54:00 -07:00
Oriol Prieto Gascó
a70425fb2f Revert "Append APEX version instead of build ID for APK-in-APEX ..."
Revert "Make apexer replace instances of version placeholder str..."

Revert submission 17944887-apk-in-apex

Reason for revert: Caused a regression (b/230873680)
Reverted Changes:
Ic37eeba8b:Make apexer replace instances of version placehold...
I9cef1418c:Append APEX version instead of build ID for APK-in...

Change-Id: I3da8bcb782baf71cddce9e4e92fe3894fc187b5c
2022-05-20 13:05:34 +00:00
Liz Kammer
dbd8eb11f4 Remove unused uses_sdks property for apexes
(cherry picked from commit 7eed538208)

Bug: 232546567
Test: m nothing & compare build.ninja before/after
Merged-In: I3f1199af338e1d2e48ec29cf9f59b6b36236c4cc
Change-Id: I3f1199af338e1d2e48ec29cf9f59b6b36236c4cc
2022-05-20 07:45:48 +00:00
Bob Badour
00d6beecc9 Merge "Add gen_notice module." am: 335a4333fe am: 15aba3f5e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2095028

Change-Id: I56c39b0693a8a18b6e43f0536c724e5b26338504
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 19:09:45 +00:00
Bob Badour
335a4333fe Merge "Add gen_notice module." 2022-05-19 18:03:09 +00:00
Bob Badour
eef4c1c563 Add gen_notice module.
Refactor notices to support notices for multiple modules.

Enforce visibility and handle missing dependencies.

Bug: 213388645

Change-Id: Id6a81987f087419ad37d0cce57a71e8a7c4cd6e0
2022-05-18 16:38:19 -07:00
Paul Duffin
1c29093729 Merge "Pass pointer to dependencyTag instead of copying struct" am: 4dd76eb26c am: fe844bb3f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096446

Change-Id: Iea6ea2f668a11c8ef0ea3ab6822987c7bcb2d373
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 22:50:02 +00:00
Spandan Das
91250b1ae4 Enforce updatable=true on apps of updatable apexes
- Update apex_info (a topdown mutator) so that it sets updatable=true on
  apps of updatable apexes
- Write a unit test that tests different combinations of
  updatable/non-updatable apks-in-apexes
- Update an existing unit test that asserts a different error

Test: go test ./java
Test: m nothing (in internal)
Bug: 209409604

Change-Id: Ie8881b857afcec44addf27fc360c5b8abf726bd2
Merged-In: Ie8881b857afcec44addf27fc360c5b8abf726bd2
(cherry picked from commit 42e89508ee)
2022-05-13 19:16:23 +00:00
Paul Duffin
520917af9d Pass pointer to dependencyTag instead of copying struct
A follow up change will add some more fields to the tag which will make
passing the struct around by value will get more expensive. Switching
to pointers will make this slightly more efficient.

Changing the type of the tags from dependencyTag to *dependencyTag
broke a test. Rather than simply patch the test and then maybe have to
patch it again in the next change this adds a a String() method that
will insulate the test from being affected by changes in the
dependencyTag contents.

Bug: 232401814
Test: m nothing
Change-Id: I23da742ebffb74ef3b9b68f772519ceb38332f5f
2022-05-13 16:06:36 +00:00
Treehugger Robot
7ee1422274 Merge "Clean up hard-coded min_sdk_version/apex_available" am: 1c87db50ca am: 793c10dcc7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2089563

Change-Id: I789fa4687a2bdac6f0130543b21c58cd7707d12f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 10:21:55 +00:00
Treehugger Robot
1c87db50ca Merge "Clean up hard-coded min_sdk_version/apex_available" 2022-05-13 04:56:59 +00:00
Wei Li
366fae54a1 Merge "Add bp2build converter for override_apex." am: 49611b39a9 am: 9acec92f04
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092595

Change-Id: I4bcef1a0da29197a01dea449997e533a37e330cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 08:02:05 +00:00
Wei Li
1c66fc74d2 Add bp2build converter for override_apex.
Bug: 216442475
Test: m nothing
Change-Id: I2f106d15c1d235583b8b1a8f0ac4b48162ff4fdd
2022-05-11 22:22:04 -07:00
Spandan Das
f454194692 Merge changes Ie8881b85,I6c064f8a am: f923333a93 am: e41be189f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2090231

Change-Id: I1eebfc246a05fdb728d1c9460f322f657f7d36df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:47:28 +00:00
Spandan Das
f923333a93 Merge changes Ie8881b85,I6c064f8a
* changes:
  Enforce updatable=true on apps of updatable apexes
  Update sdk_version check for jni_libs of updatable apps
2022-05-10 18:20:27 +00:00
Spandan Das
42e89508ee Enforce updatable=true on apps of updatable apexes
- Update apex_info (a topdown mutator) so that it sets updatable=true on
  apps of updatable apexes
- Write a unit test that tests different combinations of
  updatable/non-updatable apks-in-apexes
- Update an existing unit test that asserts a different error

Test: go test ./java
Test: m nothing (in internal)
Bug: 209409604

Change-Id: Ie8881b857afcec44addf27fc360c5b8abf726bd2
2022-05-10 00:01:34 +00:00
Treehugger Robot
32b22ed6e1 Merge "Revert "Append APEX version instead of build ID for APK-in-APEX ..."" am: beccdcdff2 am: da3367e8cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2087883

Change-Id: Icf30af7b6fe6e1a6e6043bfe38f522ca3c0a9245
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 04:01:12 +00:00
Jooyung Han
932d2c1932 Clean up hard-coded min_sdk_version/apex_available
Set min_sdk_version/apex_available for modules used by
com.android.permission APEX.

Bug: 147364041
Bug: 158059172
Test: m
Change-Id: I93ff72ed765354d44a2ccb5105b5f2820f0358f5
2022-05-06 12:21:04 +09:00
Treehugger Robot
beccdcdff2 Merge "Revert "Append APEX version instead of build ID for APK-in-APEX ..."" 2022-05-06 03:17:24 +00:00
Oriol Prieto Gasco
17e2290e9f Revert "Append APEX version instead of build ID for APK-in-APEX ..."
Revert submission 2067907-apk-in-apex

Bug: 230873680

Reason for revert: Change broke aab generation b/230873680
Reverted Changes:
I9cef1418c:Append APEX version instead of build ID for APK-in...
Ic37eeba8b:Make apexer replace instances of version placehold...

Change-Id: Ib113d56901e815435f71bf878049cdabd210503c
2022-05-05 14:32:37 +00:00
Treehugger Robot
ef758eca54 Merge "Remove unused uses_sdks property for apexes" am: a6fcf9fd92 am: 9a37c9bb75
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2071390

Change-Id: Icb6dec841f99bfafb4238255bf80934f6600d059
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 05:52:36 +00:00
Treehugger Robot
a6fcf9fd92 Merge "Remove unused uses_sdks property for apexes" 2022-05-03 03:24:59 +00:00
Treehugger Robot
38d7429735 Merge "Update locations of apex bzl files" am: a704eb1469 am: 1873bb0b18
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2081644

Change-Id: I5cd4b83307f4d53c6b42ae13b0b52423b86174c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-30 01:03:43 +00:00
Cole Faust
5f90da372e Update locations of apex bzl files
Bug: 230893497
Test: ./build/bazel/vendor/google/build_mainline_modules.sh
Test: b build //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal
Change-Id: Ib16bece720a9167d02d2ddd8c4f11257634d382b
2022-04-29 13:37:43 -07:00
Treehugger Robot
50da2c4530 Merge "Prototype changes for multitree" am: 184a6b87e5 am: 91255a653f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2076401

Change-Id: Icf425fdcfddcb1267d241175ec86758117e53afc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:09:34 +00:00
Inseob Kim
5eb7ee9fad Prototype changes for multitree
This change contains a prototype implementation for multitree. Several
interfaces and modules are added.

1. Imported/Exported
Modules implementing Exportable interface can export artifacts to other
components. "imported_filegroup" modules can import generated artifacts from other exported modules.

2. Multitree metadata
It contains information about imported/exported modules in each
component, and can be generated via "m update-meta".

3. cc library stub
It's based on prototype stub libraries. It uses imported/exported
mechanism to expose a C API, with a map.txt file and header files.

Bug: 230448564
Test: m
Change-Id: Id7ff7618e2c630c5617a564d8b23b60a1cc9c8e8
2022-04-28 08:20:10 +00:00
Jingwen Chen
3b1dcf4f46 Append APEX version instead of build ID for APK-in-APEX paths.
This CL removes the build_id.mk suffix and replaces it with a hardcoded
placeholder string that will be replaced with the actual version in
apex_manifest.json by apexer at apex construction time.

This means that as long as the apex version is incremented, the
APK-in-APEX will be installed to a new directory path from the package
manager's perspective.

Fixes: 229574810
Bug: 229625490
Bug: 226559955
Bug: 224589412
Bug: 227417611
Bug: 228157333
Bug: 228803590
Bug: 229136249

Test: atest StrictJavaPackagesTest
Test: soong tests
Test: deapexer list out/dist/com.google.android.permission.apex
Ignore-AOSP-First: this is an cherrypick
Change-Id: I9cef1418c3fc7e0970d96995b8398f5e82f479e0
Merged-In: I9cef1418c3fc7e0970d96995b8398f5e82f479e0
2022-04-26 12:54:50 +00:00
Jingwen Chen
97fbc24443 Merge "Append APEX version instead of build ID for APK-in-APEX paths." am: d21a8a5a42 am: 4eb789da50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2067907

Change-Id: Ib5c681d03dc12c5f4839b810b79ef4800235ea30
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 12:41:18 +00:00
Liz Kammer
7eed538208 Remove unused uses_sdks property for apexes
Test: m nothing & compare build.ninja before/after
Change-Id: I3f1199af338e1d2e48ec29cf9f59b6b36236c4cc
2022-04-21 11:13:45 -04:00
Jingwen Chen
6cb124b8d9 Append APEX version instead of build ID for APK-in-APEX paths.
This CL removes the build_id.mk suffix and replaces it with a hardcoded
placeholder string that will be replaced with the actual version in
apex_manifest.json by apexer at apex construction time.

This means that as long as the apex version is incremented, the
APK-in-APEX will be installed to a new directory path from the package
manager's perspective.

Fixes: 229574810
Bug: 229625490
Bug: 226559955
Bug: 224589412
Bug: 227417611
Bug: 228157333
Bug: 228803590
Bug: 229136249

Test: atest StrictJavaPackagesTest
Test: soong tests
Test: deapexer list out/dist/com.google.android.permission.apex
Change-Id: I9cef1418c3fc7e0970d96995b8398f5e82f479e0
2022-04-21 10:20:51 +00:00
Jingwen Chen
3a5be76dc0 Merge "Suffix the build ID to the dirname of APK-in-APEX files." 2022-04-21 09:24:22 +00:00
Colin Cross
b77e80015a Merge "Only install to $OUT/apex for installable apexes" am: e3db7f6d38 am: e0aec36cbe am: 112817c169
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2065677

Change-Id: Ibd03dc6e6a247ea18bdbec4feaf4675f042937d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 06:15:30 +00:00
Jingwen Chen
8ce1efc5af Suffix the build ID to the dirname of APK-in-APEX files.
This fixes an issue with package manager's cache invalidation.

Test: CI

Bug: 226559955
Bug: 224589412
Change-Id: I8af49d51ff99cf8184d0e4d1136fff1cdb29c23e
Merged-In: I8af49d51ff99cf8184d0e4d1136fff1cdb29c23e
2022-04-19 13:57:01 +00:00
Colin Cross
02730b93b2 Only install to $OUT/apex for installable apexes
When coverage is enabled there are two variants of the apex, one
installable and one not installable.  Don't try to install files
files to $OUT/apex for the non-installable variant.

Bug: 217453046
Test: m NATIVE_COVERAGE_PATHS="*" NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device" CLANG_COVERAGE=true USE_HOST_MUSL=true com.android.runtime
Change-Id: I23e58c811ff943b9d5dec025fa619c8db835b29c
2022-04-19 00:45:07 +00:00
Jiyong Park
bdd748835c Merge "Remove apex10000_private variants" am: 9c58a3628b am: 74810ac14d am: 81de76843f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062048

Change-Id: I35154eb0d2c5071a5ae5fe9e3b93e821dbe7ac64
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 21:00:17 +00:00