Commit Graph

6712 Commits

Author SHA1 Message Date
Spandan Das
e81fad3c7a Merge "Compile stubs to .dex" am: 709dbd08a0 am: bfbca5848b am: 0f9f20e2b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2503215

Change-Id: I09c3798da462c1ad09f1ce4b0de064f34130ab48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 00:27:00 +00:00
Spandan Das
709dbd08a0 Merge "Compile stubs to .dex" 2023-03-28 22:56:41 +00:00
Spandan Das
3362f1161a Merge "Update max_sdk_version from SdkSpec to ApiLevel" am: 5aade5f52d am: 8620bbd365 am: ab45f70472
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2494321

Change-Id: I8a5cdfd8bc72400954d9b5a3621ec4d832aeb421
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 20:11:16 +00:00
Spandan Das
5aade5f52d Merge "Update max_sdk_version from SdkSpec to ApiLevel" 2023-03-28 19:17:48 +00:00
Treehugger Robot
78da5815e2 Merge "Add apex_available aidl + aidl&lang libraries" am: 8fdb210be2 am: 67c5d36be5 am: 663faa6f80
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2507365

Change-Id: I3f3dc62bcd62e1a8901536ad4849285c00c86d50
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-25 02:18:12 +00:00
Liz Kammer
2b3f56ed22 Add apex_available aidl + aidl&lang libraries
Test: b build com.android.neuralnetworks com.android.media.swcodec
Change-Id: I008b915b22e4c8c2cf1f0aee6cfdaf17374cb3a9
2023-03-24 15:14:53 -04:00
Spandan Das
1c03772aa9 Merge "Update target_sdk_version from SdkSpec to ApiLevel" am: f5d3906505 am: 569b1d2730 am: c52b576571
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2494320

Change-Id: I26868afda4e3e7b715b754b1aad48e7f6d0b6333
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 02:03:47 +00:00
Spandan Das
cb368ea88a Compile stubs to .dex
Although stubs are not installable on device, we need to compile .dex to
support hiddenapi metadata generation.

Bug: 271443071
Test: Built out/soong/hiddenapi/hiddenapi-stub-flags.txt with
aosp/2487266
(There is still some delta due to missing signatures in child classes)
(Will address them in a followup CL)
Change-Id: Iac1330c449934085a479c487a1489aa1695a75ee

Change-Id: I1baa9c0f45eb8fc93f5c3177389ea5a2b7ca0a0b
2023-03-23 20:41:22 +00:00
Spandan Das
a26eda7f2c Update max_sdk_version from SdkSpec to ApiLevel
max_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid max_sdk_version in bp
files

Bug: 208456999
Test: no change in ninja file (this should be a no-op)
Test: TH
Change-Id: I304b5ad802bde200137d8e225182828dfd6f7227
2023-03-23 19:38:56 +00:00
Spandan Das
ca70fc40bd Update target_sdk_version from SdkSpec to ApiLevel
target_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid target_sdk_version in bp
files

Test: m nothing
Test: no change in ninja files (this should be a no-op)
Bug: 208456999

Change-Id: I3c19245e29184bd9e5660ad8981966f64dfa9424
2023-03-23 19:31:17 +00:00
Spandan Das
7ab0894ea4 Merge "Update min_sdk_version from SdkSpec to ApiLevel" am: ddfab60014 am: f1058758db am: a14f1b45cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2503257

Change-Id: I02d90d724f78eec72e7e7d6f80c2c2d15e25e9f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 18:38:52 +00:00
Spandan Das
ddfab60014 Merge "Update min_sdk_version from SdkSpec to ApiLevel" 2023-03-23 16:33:36 +00:00
Treehugger Robot
a811b8603a Merge "Android Lint: allow local override of --exitcode flag" am: 5c309aa37a am: f7cbb22206 am: de2c79af6c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2502955

Change-Id: I901464c0faf9d2f8fb68c6dbbc81fd4de4349aee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 04:56:26 +00:00
Treehugger Robot
5c309aa37a Merge "Android Lint: allow local override of --exitcode flag" 2023-03-23 03:19:30 +00:00
Spandan Das
8c9ae7ed67 Update min_sdk_version from SdkSpec to ApiLevel
This relands aosp/2457063. The original change broke T and U since those
branches still contain soong modules of type (kind+level). Those soong
modules have been cleaned up now

Test: Used go/abtd to test T and U branches with this change

Bug: 208456999
Change-Id: I0ef7933c055f88cb512a02108f1173e51156ef1c
2023-03-22 20:15:45 +00:00
mattgilbride
b597abdeb1 Android Lint: allow local override of --exitcode flag
The --exitcode flag tells lint to exit with an error code if any
incidents at ERROR level or above are found.  Unfortunately, that means
an invocation of lint against the entire tree will fail with whichever
module fails first. This covers up any other failures and makes updating
lint in AOSP more cumbersome.

This change allows one to set `ANDROID_LINT_SUPPRESS_EXIT_CODE=true` to
modify this behavior and collect full lint results even if there are
errors in some modules.

Bug: 274780888
Test: Tested manually by changing code to trigger lint errors, and
settig/unsetting this flag.

Change-Id: I71ab89c9bffafe6eb83171102c2c253171450266
2023-03-22 17:52:56 +00:00
Pranav Gupta
6f155cd7be Merge "Add skip-sdk-check to extract_apks" am: 957cd6bcbc am: 4edaab7e7a am: 522562cf3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2498217

Change-Id: I3e4964075760eec282b9c0dcce69ddc94a4ecce0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 21:24:22 +00:00
Pranav Gupta
957cd6bcbc Merge "Add skip-sdk-check to extract_apks" 2023-03-21 19:16:39 +00:00
Spandan Das
fd099f5ca1 Merge "Cleanup hardcoded references to android_*stubs_current" am: ef5b7e4e36 am: 91d512df2c am: 543629b206
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2497416

Change-Id: I2f54ca73b7ee6c9a98cd205f259cdfd003909647
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 19:06:07 +00:00
Spandan Das
ef5b7e4e36 Merge "Cleanup hardcoded references to android_*stubs_current" 2023-03-21 17:22:42 +00:00
Pranav Gupta
51645ff23e Add skip-sdk-check to extract_apks
Add skip-sdk-check to skip checking the SDK version when extracting an
APK/APEX from an App Set Bundle. This can be used when the platform SDK
version is not defined and the APEXs/APKs use SHA based SDK versions.
This check should not be set to true for non Beta dessert releases

Bug: 274518686
Test: # Add SHA targeting modules to platform
m SOONG_SKIP_APPSET_SDK_CHECK=true  #Build Passes
m SOONG_SKIP_APPSET_SDK_CHECK=false #Build Fails
m #No config supplied, build fails

Change-Id: I1919437d3410f09c991e1de39031bd88e1f8246a
2023-03-21 08:13:25 -07:00
Spandan Das
f4149e51ce Merge changes from topic "revert-2457063-EKFSKANQWZ" am: cd05792d06 am: d3d9c4ae59 am: 12992d3db9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2499159

Change-Id: I952f4fc41b91be9e3bd8145be9fe1d81abe2642c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 03:18:38 +00:00
Spandan Das
cd05792d06 Merge changes from topic "revert-2457063-EKFSKANQWZ"
* changes:
  Revert "Create two sentinel api levels"
  Revert "Create EffectiveVersion* functions for ApiLevel"
  Revert "Prework for migrating min_sdk_version from (kind+level) ..."
  Revert "Always include host variants in the sdk snapshot"
  Revert "Update min_sdk_version from SdkSpec to ApiLevel"
2023-03-21 01:56:16 +00:00
Spandan Das
b74d1e1d91 Revert "Update min_sdk_version from SdkSpec to ApiLevel"
Revert submission 2457063

Reason for revert: Broken udc-dev

Reverted changes: /q/submissionid:2457063

Change-Id: Id6349fc1318877044af713c914a0afd437d3d2d5
2023-03-21 01:36:47 +00:00
Alix Espino
cd64e93766 Merge "Add TODO comment for min_sdk_verison in android_app Bp2Build" am: a2be13e680 am: 67a5c9f3cb am: 6fda6f8209
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2497221

Change-Id: I290397f3194282963041fc4b224633710ff848a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 01:19:05 +00:00
Spandan Das
11524735b0 Merge changes Ie6ae7e26,I2fd822a2,Iddd497df,Iee5a936e,I628b443c am: ea93f64f03 am: 03ea4670b3 am: 235ed9f779
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2457063

Change-Id: I13484740359c98c077d7c11a0ee4043bdae0ef20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 01:18:46 +00:00
Treehugger Robot
b7c99f50c8 Merge "Enable annotations for sealed classes" am: 759524afc9 am: 842b197f4a am: 61373ea2c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2484075

Change-Id: I2da8483498c4fdfb1038cb93dc209a657e3532bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 01:16:24 +00:00
Alix Espino
a2be13e680 Merge "Add TODO comment for min_sdk_verison in android_app Bp2Build" 2023-03-20 23:36:55 +00:00
Spandan Das
ea93f64f03 Merge changes Ie6ae7e26,I2fd822a2,Iddd497df,Iee5a936e,I628b443c
* changes:
  Update min_sdk_version from SdkSpec to ApiLevel
  Always include host variants in the sdk snapshot
  Prework for migrating min_sdk_version from (kind+level) to (level)
  Create EffectiveVersion* functions for ApiLevel
  Create two sentinel api levels
2023-03-20 23:33:48 +00:00
Spandan Das
626a8ad934 Cleanup hardcoded references to android_*stubs_current
These hardcoded refs will need to be updated when we start using .txt
stub equivalent (single-tree/multi-tree). Instead of strewing this logic
all over the codebase, create a helper function that contains the
replacement logic. All other places should call this helper function
instead of calculating the name of .txt equivalent soong module by
itself.

(Will do a similar cleanup in build/make)

Test: no change in ninja file

Change-Id: I6bf999eb4aeaba6ac2a44b9016bae4ec8c79ce19
2023-03-20 20:50:03 +00:00
Alix
ffdeacb309 Add TODO comment for min_sdk_verison in android_app Bp2Build
Test: NA added a comment
Bug: 274474008
Change-Id: I1c02c2877e638589730a7b2b565382c010dfe084
2023-03-20 18:22:45 +00:00
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
Treehugger Robot
759524afc9 Merge "Enable annotations for sealed classes" 2023-03-20 17:52:31 +00:00
Spandan Das
e773739787 Update min_sdk_version from SdkSpec to ApiLevel
min_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid min_sdk_version in bp
files

Will do a similar cleanup for targetSdkVersion and maxSdkVersion in a
followup CL

Test: m nothing
Test: no change in ninja files (this should be a no-op)
Bug: 208456999

Change-Id: Ie6ae7e267d093c5e4787e82685daaca1021d202e
2023-03-20 16:51:32 +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