Commit Graph

6678 Commits

Author SHA1 Message Date
Alix Espino
4ca1a2cde4 Merge "Bp2build for android_app minsdkversion property" am: 895bc9463b am: 9de50677f7 am: fff54efaf8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2496376

Change-Id: I581f929d54478db01e86655e2dd172a796f64e3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 18:03:22 +00:00
Alix Espino
895bc9463b Merge "Bp2build for android_app minsdkversion property" 2023-03-20 15:38:53 +00:00
Ioana Alexandru
554eaf913c Merge "Revert "Export non-apex variants of modules to make"" am: 54fb18d43b am: aebbc670a6 am: 18fed433ff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2497035

Change-Id: I4daebc840cadd17d66a48886b59e3fe3f8fec05c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 12:53:50 +00:00
Ioana Alexandru
54fb18d43b Merge "Revert "Export non-apex variants of modules to make"" 2023-03-20 11:08:55 +00:00
Jingwen Chen
8ac7d7d01d Revert "Export non-apex variants of modules to make"
This reverts commit 502da3987a.

Reason for revert: b/274195633

```
In file included from out/soong/installs-aosp_cf_x86_pasan.mk:134984:
In file included from out/soong/Android-aosp_cf_x86_pasan.mk:981696:
In file included from build/make/core/soong_cc_rust_prebuilt.mk:76:
build/make/core/base_rules.mk:342: error: packages/modules/Uwb/service/uci/jni: MODULE.TARGET.SHARED_LIBRARIES.libuwb_uci_jni_rust already defined by packages/modules/Uwb/service/uci/jni.
```

Change-Id: Ic1ea6969e54c23a7d126eb0fb47ab6f2e44ee965
2023-03-20 11:05:16 +00:00
Alix
e5085ebbc1 Bp2build for android_app minsdkversion property
Bug: 249265719
Test: go test ./bp2build
Test: insepcted generated build files
Change-Id: I02ed54a9fdcc88d98439e0a61626a0afc1fce639
2023-03-17 20:47:52 +00:00
Alix Espino
671172b003 Merge "Create helper function for BazelTargetModuleProperties in java/android" am: 2eb2ecfec0 am: bc5cacedf5 am: 8d2b140206
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2494323

Change-Id: Ifac07263d11e8ffe155911b90428a704789a2f61
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 19:05:54 +00:00
Cole Faust
b5edb1a0e4 Merge "Export non-apex variants of modules to make" am: bebe607db4 am: 09f4a08f55 am: 59a02182c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2486355

Change-Id: I2e614d603aea40bd1bacbda919e9ad1daf58f876
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 19:04:28 +00:00
Alix Espino
2eb2ecfec0 Merge "Create helper function for BazelTargetModuleProperties in java/android" 2023-03-17 17:43:39 +00:00
Cole Faust
bebe607db4 Merge "Export non-apex variants of modules to make" 2023-03-17 17:20:19 +00:00
Romain Jobredeaux
5923a576fb Merge "Create an intermediate java library for every java_binary target" am: d3d2be2636 am: e9cee4bcf0 am: 2552659d92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2494319

Change-Id: Ie3d807b9d160bc8a0712ccda3f788580747becf9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 14:24:20 +00:00
Alix
3254002a7c Create helper function for BazelTargetModuleProperties in java/android
Prevents inconsistent load locations from being added for java_library,
android_library, kt_jvm_library targets that are generated in multiple
places.

Change-Id: I66ae5af137d7dff3f6fa6660dee539cf9ab22b9e
Test: go test ./bp2build
2023-03-16 21:29:01 +00:00
Romain Jobredeaux
f5f6073ff5 Create an intermediate java library for every java_binary target
We're already doing this for kotlin libraries as java_binary does not
support kotlin sources.

Change-Id: I4967b3aca21dac8e0eaf54d48cc35d57a4c4923e
2023-03-16 21:11:30 +00:00
Cole Faust
502da3987a Export non-apex variants of modules to make
Currently, non-apex variants of modules that are in apexes are not
exported to make unless they're apex_available to the platform. This
means that you can't `m` those modules directly.

However, there is a workaround in the apex androidmk implementation that
emits make rules for the removed modules, but just redirects them to
build the apex itself. We want to remove that, but one of the problems
with doing so is that you can no longer `m` many modules afterwards.

To fix that, unhide the apex's dependencies from make. To ensure they're
not installed, call SkipInstall() on them, and update SkipInstall() to
be more strict by setting `LOCAL_UNINSTALLABLE_MODULE := true`.

Bug: 254205429
Test: Presubmits
Change-Id: Ib971981559f3b642ce6be8890679e994e1b44be0
2023-03-16 11:13:23 -07:00
Nicolas Geoffray
7471b92542 Merge "Revert^2 "Generate a boot image extension for mainline BCP..." am: addd60c430 am: 952b720b66 am: eabac6f206
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2470961

Change-Id: I1793e512d95a85d5f0b14d6394aae7770c5d2841
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 17:21:15 +00:00
Jiakai Zhang
b879620ca8 Revert^2 "Generate a boot image extension for mainline BCP...
Revert submission 2465993-boot-image-mainline-revert

Reason for revert: Relanding the changes

Reverted changes: /q/submissionid:2465993-boot-image-mainline-revert

Change-Id: Ie611cf3a1ff4be7a7beab164f69b4186c474be5c
2023-03-16 08:46:29 +00:00
Yuyang Huang
c35ec04dd3 Merge "Revert "Promote NewApi to an error again"" into udc-dev 2023-03-15 03:43:40 +00:00
Yuyang Huang
2eb349a79b Revert "Promote NewApi to an error again"
This reverts commit c398be808e.

Reason for revert: Broken the build b/273624365

Change-Id: I87bb4ca7c561cfbc6643501f60b4c00a53201908
2023-03-15 03:05:05 +00:00
Cole Faust
b595ff69aa Merge "Promote NewApi to an error again" into udc-dev 2023-03-14 23:08:18 +00:00
Alix Espino
7a8eb6a09f Merge "bp2build kotlinCFlags" am: d184706daa am: 54bfcc938f am: ea66e1bd5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2486117

Change-Id: Iecf554834e09c97103b054c8726d63715e42395e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 20:02:17 +00:00
Alix
f848bf8225 bp2build kotlinCFlags
for java_library, java_binary, android_app & android_library

Change-Id: Ia8dec7e7d497eb41b2d8dcd8c44c3090d1d3b4bd
Bug: 271265771
Test: go test ./bp2build
2023-03-14 13:57:22 +00:00
Matt Gilbride
bd1d4cd780 Merge "Disable new lint checks from Android Studio" am: 34127be4e9 am: d9ccbe1eb9 am: 69893d62d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2383132

Change-Id: I8b67eb247401accc351a010e1822ed1c4fb0232d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-13 20:00:47 +00:00
Matt Gilbride
34127be4e9 Merge "Disable new lint checks from Android Studio" 2023-03-13 18:03:46 +00:00
Alix Espino
5ae61b6e2b Merge "Update load statements in java.go bp2build" am: 686df31852 am: fd11e9ee5b am: ebf4fd11e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2480297

Change-Id: I77aa18166e04c11e5197298508c0cc5bc1cc23f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-13 17:34:10 +00:00
Alix Espino
686df31852 Merge "Update load statements in java.go bp2build" 2023-03-13 15:27:15 +00:00
Alix
82acaf545f Update load statements in java.go bp2build
load statements will all now point to rules.bzl files and won't have to
be constantly updated.

Bug: 271612705
Test: CI
Change-Id: I663b9730f1b5b333682ea301ce4d9a505626faaa
2023-03-13 15:27:01 +00:00
Cole Faust
c398be808e Promote NewApi to an error again
Now that issues have been baselined.

Bug: 268261262
Test: Presubmits
Change-Id: I3a1591d650fc46f67426d0f64162d261a24aa6eb
2023-03-10 11:58:39 -08:00
Iván Budnik
03613bbe9a Merge "Revert "Export non-apex variants of modules to make"" am: ff8c95b610 am: 85b9f6e7b2 am: e36c6c1c37
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2481059

Change-Id: Ib05486f8c8934cd530a6f08f02c6901f2a0907bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 18:17:23 +00:00
Iván Budnik
ff8c95b610 Merge "Revert "Export non-apex variants of modules to make"" 2023-03-10 16:30:32 +00:00
Iván Budnik
295da16b95 Revert "Export non-apex variants of modules to make"
Revert submission 2462194-androidmk_for_apex_dependencies

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=full-eng&lkgb=9723453&lkbb=9724944&fkbb=9723508, bug b/272663333.

Reverted changes: /q/submissionid:2462194-androidmk_for_apex_dependencies

Bug: 272663333
Change-Id: I847fa910a8d54de19954f56fe92a80a9bcd0ee18
2023-03-10 16:11:26 +00:00
Cole Faust
57129350e0 Merge "Export non-apex variants of modules to make" am: f42c21d5f8 am: f183fc5413 am: 578aa6c684
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2462194

Change-Id: Ic27c6ed62af76d18b3df3f8357c96d9419403f6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 07:48:13 +00:00
Cole Faust
f42c21d5f8 Merge "Export non-apex variants of modules to make" 2023-03-10 06:36:03 +00:00
Cole Faust
ad222f271a Export non-apex variants of modules to make
Currently, non-apex variants of modules that are in apexes are not
exported to make unless they're apex_available to the platform. This
means that you can't `m` those modules directly.

However, there is a workaround in the apex androidmk implementation that
emits make rules for the removed modules, but just redirects them to
build the apex itself. We want to remove that, but one of the problems
with doing so is that you can no longer `m` many modules afterwards.

To fix that, unhide the apex's dependencies from make. To ensure they're
not installed, call SkipInstall() on them, and update SkipInstall() to
be more strict by setting `LOCAL_UNINSTALLABLE_MODULE := true`.

Bug: 254205429
Test: Presubmits
Change-Id: Ib094feb2c437ad50d8319c58caa997759e7ce32f
2023-03-09 11:20:10 -08:00
Romain Jobredeaux
91dc849eed Merge "Call ResolveExcludes after arch-based sources computation in java.go" am: 8062140a16 am: 81771ec3d5 am: b42297540a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2478276

Change-Id: I5282958274ca012100eefb5f32e7a1e03f8db93c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 17:30:42 +00:00
Romain Jobredeaux
8062140a16 Merge "Call ResolveExcludes after arch-based sources computation in java.go" 2023-03-09 14:40:58 +00:00
mattgilbride
9d6cf7e598 Disable new lint checks from Android Studio
PermissionImpliesUnsupportedChromeOsHardware
is ChromeOS specific and does not apply to the
Android tree, thus disabled.

UnsafeImplicitIntentLaunch surfaces false
positives and crashes in a specific corner case.
Disable until the related detector can surface
errors only when it is certain the intent will
get launched.

InvalidId gives false positives due to the package
name that is used in several places in platform.

Bug: 264608708
Test: TH
Change-Id: I441ba27a6fa97ed674145a051944dce4280692cd
2023-03-09 14:11:47 +00:00
Alix Espino
c1dd43e6e4 Merge "Created kotlinAttributes struct" am: eb33a1d474 am: f8cf202b64 am: f736aab4fc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2475004

Change-Id: I5fc5c80b09dbe2904fda3f6c09605b18adc241ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 22:25:55 +00:00
Romain Jobredeaux
3eaf747ae5 Call ResolveExcludes after arch-based sources computation in java.go
TEST: go test
Change-Id: I93a8ae5e0842dab03f73b0edb32841755d2ea435
2023-03-08 16:34:17 -05:00
Alix
75db7840ab Created kotlinAttributes struct
makes it clearer which attributes are kotlin specific
embedded within javaCommonAttributes since both
java_* and android_* use kotlin.

Change-Id: Ib7c9b912a9901cd1c3d150ab1e0a79011d8e07de
Test: go test ./bp2build
2023-03-08 17:15:10 +00:00
Sorin Basca
76055cb6dd Merge "Correct SDK version for Java 17" am: 71eca49214 am: 16661aab12 am: dc2c01e3bb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2468461

Change-Id: Ie4426cc01bf371736cfe0181c494e45ceaef2698
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 09:30:48 +00:00
Sorin Basca
71eca49214 Merge "Correct SDK version for Java 17" 2023-03-08 07:56:45 +00:00
Zi Wang
b31a833c8e Incorporate Bazel-built fingerprint file into mixed builds
Test: m and TH

Bug: 268337233
Merged-In: Ib2f7fa35b2d94972869e8e85be47b288ff875408
Change-Id: Ia2670ebc0b1b4b720e79281fe81235555d498789
2023-03-07 15:33:05 -08:00
Zi Wang
fbaad8dc50 Merge "Incorporate Bazel-built fingerprint file into mixed builds" into udc-dev 2023-03-07 23:32:17 +00:00
Zi Wang
76889ce00a Incorporate Bazel-built fingerprint file into mixed builds
Test: m and TH

Bug: 268337233
Ignore-AOSP-First: merge conflict resolutions
Change-Id: Ib2f7fa35b2d94972869e8e85be47b288ff875408
2023-03-07 13:34:02 -08:00
Wei Li
ea1c8bd414 Export Soong module type to LOCAL_SOONG_MODULE_TYPE to Make for SBOM generation. am: 598f92d704 am: 261721421f am: 13d1319456
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2374715

Change-Id: I97bdbaed3fd5df6411f7817c18c972ccc25bb6f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 21:21:44 +00:00
Alix Espino
b0b1af3b18 Merge changes from topic "ktResourceStrip" am: 09907dab55 am: 956e77d412 am: f0dcf6eec7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2470481

Change-Id: I95dc8e8f8c60dc8e0ef268b0f5a1385d46948a72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 20:44:05 +00:00
Alix
33cbf2d461 resource_strip_prefix support for kotlin srcs am: 4d56abf937 am: 9ba68b0ba3 am: 6722869b6c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2470480

Change-Id: I5421779dd471cfc592b75fe418bb9fd2f0cca903
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 20:44:01 +00:00
Jiakai Zhang
da72c03f76 Merge "Revert "Generate a boot image extension for mainline BCP jars."" am: fe7755802e am: c2a7ec3783 am: aba25ecccb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2466300

Change-Id: I53574a5a0ea6a78fb1881a33cc89a0c215f38d5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 01:01:59 +00:00
Wei Li
598f92d704 Export Soong module type to LOCAL_SOONG_MODULE_TYPE to Make for SBOM generation.
Bug: 266726655
Test: CI

Change-Id: If5b1a77930a591b6061ca2749c9c5ad29b4491fb
2023-03-06 22:51:03 +00:00
Alix
9ba68b0ba3 resource_strip_prefix support for kotlin srcs am: 4d56abf937
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2470480

Change-Id: I1067269852d77b2ed53550840eeb7daa98a92560
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-06 21:05:08 +00:00