Commit graph

6332 commits

Author SHA1 Message Date
Sam Delmerico
c31778ffbc Merge "add java_import to mixed build" 2022-08-03 17:13:06 +00:00
Sam Delmerico
9276c1a4bb Merge "copy JNI from AAR files to android_app APK" am: fb845984df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149174

Change-Id: I8697a193bf054623dcdf67f6beded56a75c52875
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 13:31:01 +00:00
Alexei Nicoara
69cf0f3756 Overriding placeholder version in updatable apks
Test: presubmit, checked the app version after build locally
Bug: 231691162
Change-Id: Icd242432540ea424235b226a45aac839dbc995be
2022-08-03 12:05:14 +01:00
Sam Delmerico
82602492fc copy JNI from AAR files to android_app APK
JNI libs present in AAR files are ignored in the build. If those
libraries are necessary, they must be manually extracted and a
prebuilt_cc_library module must be created for them. Instead, we can
extract these libraries and copy them to an output APK as part of the build.

Bug: 228848794
Test: created android_app that depends on an android_library_import with
  JNI embedded, and verified that .so libs are present in APK
Test: created android_app that depends on an android_library which
  depends on android_library_import with JNI embedded, and verified
  that .so libs are present in APK
Test: verified that multiple .so's from a single architecture are copied
  to APK
Test: verified that the absence of a jni/<arch> folder or files in the
  folder will cause the Ninja action to error
Change-Id: I242a862d7bd881f7a4a8c23493924d8fe441ea25
2022-08-02 16:12:06 -04:00
Sam Delmerico
277795cb4f add java_import to mixed build
Bug: 220168131
Test: go test ./java -run TestImportMixedBuild
Test: USE_BAZEL_ANALYSIS=1 m CtsManagedProfileApp && verify jars are
  included from execroot/__main__ directory
Test: build/bazel/ci/mixed_droid.sh
Change-Id: I6d35a2389ea35525d532efc8474c71d2c8825646
2022-07-26 17:14:42 -04:00
Treehugger Robot
77f6fef4ed Merge "fix typo in AARImport prebuilt type assertion" am: 28ee99f3c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2164784

Change-Id: Ic3ae553b8d16478367a1df7cde46981052841e2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 17:19:32 +00:00
Sam Delmerico
af8bb7008a fix typo in AARImport prebuilt type assertion
This looks like it may have been a typo'd copy paste or maybe a name
change that got forgotten about.

Test: CI
Change-Id: I9f5c17f8e2d11b9cf6cd0da4685d719cdbbdcc11
2022-07-25 15:39:32 -04:00
Cole Faust
ce19924dd8 Merge "Downgrade/disable lint checks" am: b59a3dba02
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2141377

Change-Id: I59fe86bafba8f58d33cfb4b2a408f97fa366c2e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 22:30:59 +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
Cole Faust
b59a3dba02 Merge "Downgrade/disable lint checks" 2022-07-21 19:57:17 +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
Paul Duffin
7d92232f3a Merge "Use implementation jar for updatable-media in snapshot for S" am: b262f883a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2155558

Change-Id: If34798d721c41308a99271e11a440c0b3e2a46e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 22:51:16 +00:00
Paul Duffin
b262f883a9 Merge "Use implementation jar for updatable-media in snapshot for S" 2022-07-15 22:32:58 +00:00
Paul Duffin
1364891fad Use implementation jar for updatable-media in snapshot for S
While enabling prebuilts in T we hit b/229932396 which was caused by
some parts of the build depending on the prebuilt updatable-media jar
which used to be a full implementation jar but which is now an invalid
jar as the snapshot must not be including implementation details. We
fixed the issue in T but we are hitting the same problem in S with the
M-2022-07.

That is the first train in which the prebuilt updatable-media module
provides an invalid jar, prior to that it was always providing an
implementation jar. This change tweaks the sdk snapshot generation
code to use an implementation jar for updatable-media in the S
snapshot to avoid partners having to cherry pick changes similar to
those needed to fix b/229932396 in T.

Bug: 239121291
Test: packages/modules/common/build/mainline_modules_sdks.sh
      # Check that S media snapshot includes implementation jar.
      # Check that S art snapshot includes invalid jar.
      # Check that T media snapshot includes invalid jar.
Change-Id: Ib49484d00a60b4ed7f8268e04f9c10a3498edb56
2022-07-15 17:23:10 +00:00
William Loh
b6d77a7652 Merge "Propagate max_sdk_version to manifest_fixer" am: 50dbe0a074
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2104965

Change-Id: If87b6e5740ae3bd2f90c57b096ac358f0f84ba08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 00:38:35 +00:00
William Loh
50dbe0a074 Merge "Propagate max_sdk_version to manifest_fixer" 2022-07-14 00:20:35 +00:00
Cole Faust
3f6462693e Downgrade/disable lint checks
Lint is being updated, and some of the
new checks have many failures or false
positives in the current android tree.

Bug: 215567981
Bug: 238784089
Test: Presubmits
Change-Id: I33a47d3c0404ca37f0334421a02bb80f745ae792
2022-07-12 15:19:08 -07:00
Ulya Trofimovich
a04dbddc64 Merge "Remove trash files that were committed by accident." am: 348b777b86
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149656

Change-Id: Icb6d7e8c0d43055c6691d4f709a92c4526acc55c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 09:58:44 +00:00
Ulya Trofimovich
348b777b86 Merge "Remove trash files that were committed by accident." 2022-07-12 09:32:24 +00:00
Nicolas Geoffray
9d63346c18 Merge "Add a new file for the boot image." am: 4a8dd372f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149660

Change-Id: I92e5069a76db18e21d555d0c72505be3240b8ba6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 08:20:27 +00:00
Nicolas Geoffray
4a8dd372f0 Merge "Add a new file for the boot image." 2022-07-12 07:59:01 +00:00
Treehugger Robot
41bf7540ab Merge "Revert "Add -Xjvm-defaults=all to kotlin compilations"" am: 7631bdf109
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149655

Change-Id: I1732a02d2f42a438ba98939f480f0a6ce26e0dd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 19:34:41 +00:00
Treehugger Robot
7631bdf109 Merge "Revert "Add -Xjvm-defaults=all to kotlin compilations"" 2022-07-11 19:29:18 +00:00
Nicolas Geoffray
58d349cbe5 Add a new file for the boot image.
In that file, we can list methods which we want to compile but that our
boot image profiling implementation did not cover.

Test: m
Bug: 235557326
Change-Id: I839727c231a09b9208d00f3205996f2add8779bd
2022-07-11 17:47:58 +01:00
Ulya Trafimovich
9af9a4761f Remove trash files that were committed by accident.
The files were added in https://r.android.com/2085466. They do not
affect the build because they are not added to Android.bp.

Bug: none
Test: treehugger
Change-Id: Ibb42212e12249835c569e7d88365344ca599d8f3
2022-07-11 10:50:37 +01:00
Jordan Demeulenaere
b0ef8b16d5 Revert "Add -Xjvm-defaults=all to kotlin compilations"
This reverts commit 7ce6837979.

Reason for revert: b/238405276

Change-Id: Ifcd1c02a3d4505af090cc1cd187730aa959fc463
2022-07-11 09:29:57 +00:00
Cole Faust
d5ac017c49 Merge "Add -Xjvm-defaults=all to kotlin compilations" am: 01365d5890
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139092

Change-Id: I71d6538976170f0ac5ebf3e520f853a4fefad3f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-08 05:40:19 +00:00
Cole Faust
01365d5890 Merge "Add -Xjvm-defaults=all to kotlin compilations" 2022-07-08 05:18:22 +00: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
Cole Faust
306061072d Merge "Use the current java version for -jvm-target" am: b0353ed3b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139094

Change-Id: I4d06c9105fdef3e24409f1208d019d5e15ad8b53
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 06:23:31 +00:00
Cole Faust
b0353ed3b1 Merge "Use the current java version for -jvm-target" 2022-07-07 06:08:18 +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
Paul Duffin
e942d5d7e9 Merge "Stop exporting systemserverclasspath_fragment when targeting S" am: 014fded49d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2143673

Change-Id: I2ad06eae7d11f1ef9ae7727a5a41052d48fc9e44
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-05 17:15:57 +00:00
Paul Duffin
014fded49d Merge "Stop exporting systemserverclasspath_fragment when targeting S" 2022-07-05 16:44:10 +00:00
Paul Duffin
f861df7907 Stop exporting systemserverclasspath_fragment when targeting S
Previously, when targeting the S release the generated sdk snapshot
would contain prebuilt_systemserverclasspath_fragment modules even
though they were only added in T.

This allows SdkMemberTypes to specify the set of target build releases
they support and ignores them when targeting an unsupported target
build release.

Test: m nothing
      packages/modules/common/build/mainline_modules_sdks.sh
      # Check that the for-S-build snapshots do not include SSCPFs.
Bug: 237718221
Change-Id: I2df08c2fcebf9b866695d691572a9d3783758b17
2022-07-05 15:13:09 +00:00
Cole Faust
2b4402d43f Merge "Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"" am: 100c7ad7f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2143082

Change-Id: I393938d1bf83b8dc734761679fbd5df10caf1c93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 23:06:03 +00:00
Cole Faust
100c7ad7f2 Merge "Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"" 2022-07-01 22:48:49 +00:00
Cole Faust
e5bf3fb4c2 Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"
This reverts commit 5d80d895b6.

Reason for revert: The issue that broke the build the first time this was submitted has been fixed in ag/19125702. Also the errorprone build was added to presubmit for changes to these files so we should hopefully catch any other issues at presubmit now: cl/458501206

Change-Id: I80ca08df49c58a1ad70de917822301368d49fc67
2022-07-01 19:39:14 +00:00
Treehugger Robot
f4da9403f3 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75 am: 4d2f767217
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139101

Change-Id: I35551b07799c29cb56e2ffdaf7c1693b23f4f8d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 13:10:11 +00:00
Treehugger Robot
4d2f767217 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75
* changes:
  Pass -fno-sanitize=vptr,function for musl
  Use musl rust prebuilts for USE_HOST_MUSL=true
  Don't package host cross modules in javaFuzzPackager
  Add rust musl arm and arm64 toolchains
2022-07-01 12:46:58 +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
Paul Duffin
e7b1f5b0a5 Avoid modifying Compile_dex property
Previously, the code would modify the Compile_dex property to set it to
true if the module was part of an APEX as the APEX needs the dex file.
That lost information about whether the Compile_dex property was
specified in the .bp file and also meant that the APEX variant had
different properties to other variants which could result in unexpected
differences in behavior between them.

One of those differences can occur in the sdk snapshot generation code
which uses the Compile_dex property to determined whether to write a
compile_dex property in the generated snapshot. If it uses an APEX
variant then it will always add compile_dex: true but if it used a non
APEX variant then it would depend on the setting of compile_dex in the
source. That leads to the generated snapshot being affected not just
by the set of modules that are included but also how they were
specified.

This change stops modifying the properties and just uses a local
variable to store the updated value. All the other (4) uses of the
Compile_dex property were checked and 1 accesses the property before
it is updated, 2 access the property from a module type (Import) that
does not update the property and the other is in the sdk snapshot
generation code which accesses it after it has been modified but needs
to access the unmodified value.

This is needed for the follow up change that allows an sdk module to
reference an apex to automatically add exportable parts of the apex
contents to the sdk snapshot avoiding duplication which can lead to
errors.

Bug: 232401814
Test: m nothing
Change-Id: Ibc80d93473a266dc9f9900ec1cb175b51460b5e9
2022-06-29 10:15:52 +00:00
Cole Faust
7ce6837979 Add -Xjvm-defaults=all to kotlin compilations
This causes kotlinc to output default methods
instead of DefaultsImpl inner classes. It's required
for code that depends on other libraries using
@JvmDefault. It will be the default in a future
version of kotlin.

Bug: 236431222
Test: treehugger
Change-Id: I67a7cb3b816b41a441af7ec78cc64bc358c6889d
2022-06-28 16:27:52 -07:00
Cole Faust
d96eebf3bc Use the current java version for -jvm-target
This is a partial revert of aosp/541879.
In that cl, the kotlin jvm version was always
set to 1.8 because that's what the kotlin
complier supported at the time, but now
it supports more versions:

$ ./external/kotlinc/bin/kotlinc -jvm-target foo
error: unknown JVM target version: foo
Supported versions: 1.6, 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17

Bug: 69160377
Bug: 236431222
Test: Treehugger
Change-Id: I273e0b4d1f484013889e17c60bc1b299a3f975a1
2022-06-28 16:06:16 -07:00
Colin Cross
39a1814f24 Don't package host cross modules in javaFuzzPackager
Normally the host cross OS is windows, which only builds a few opted-in
modules.  When the host cross OS is set to linux_musl it builds all
modules that haven't explicitly opted out, producing linux_musl_common
variants of java modules.  Filter these out of javaFuzzPackager to
avoid conflicts with the linux_glibc_common modules.

Host cross common variants targets were missing the HostCross flag,
so also set it in getCommonTargets.

Bug: 236052820
Test: builds with linux_musl arm64 host cross enabled
Change-Id: I58c846076091bee7df50016c240a176c039c42e9
2022-06-28 15:16:15 -07:00
William Loh
5a082f9a33 Propagate max_sdk_version to manifest_fixer
If max_sdk_version is included in Android.bp that value will now be
propagated to manifest_fixer.py. This value will then be used to
override any maxSdkVersion attribute set on permission or
uses-permission tags in the android manifest if maxSdkVersion="-1".

Bug: 223902327
Test: add max_sdk_version to Android.bp for test app
Test: create permission in test app manifest with maxSdkVersion="-1"
Test: run test to check maxSdkVersion=max_sdk_version
Change-Id: Ic533ef2a41b9ecc9ee68c69399026df47ee945b7
2022-06-28 22:07:23 +00:00
Xin Li
313fdb5812 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
Change-Id: If059be00e6bdaaa94171b456afae1d585540639c
2022-06-28 21:23:06 +00:00
Ivan Lozano
3742d6ad9e Merge "rust: Allow rust_ffi_shared in jni_libs" 2022-06-28 12:57:05 +00:00
Ivan Lozano
7f67c2a665 rust: Allow rust_ffi_shared in jni_libs
Allow listing rust_ffi_shared modules as a jni_libs dependency
in conjunction with platform_api: true. This allows inclusion by
android_app modules.

Bug: 237304791
Test: android_app module builds with a rust_ffi_shared dependency.
Change-Id: I3a28e1baa522ad8f9c2aa86f1d23b19ce9f967e1
2022-06-27 16:00:26 -04:00
Ian Zerny
750986db96 Merge "Use R8 wrapper target and flags." 2022-06-27 08:30:11 +00:00
TreeHugger Robot
49030cd143 Merge "Move embedded notice file path above aapt rule generation" into tm-dev am: 8378feda12
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049995

Change-Id: I3a23f9b49c98c0c6662c768ac8b07b1d4dbeeff4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 20:07:24 +00:00
Colin Cross
61fb62e5e3 Move embedded notice file path above aapt rule generation
The embedded notice file generation for apps was moved below the aapt
rules, which meant the added asset path was ignored.  Move the code
to pick the notice file path selection back above the aapt rules,
and leave the code to generate the notice file rule where it is.

Bug: 236006463
Test: m NetworkStack ALWAYS_EMBED_NOTICES=true
Change-Id: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
Merged-in: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
2022-06-23 18:05:47 +00:00
Colin Cross
3d6cfd14d3 Move embedded notice file path above aapt rule generation
The embedded notice file generation for apps was moved below the aapt
rules, which meant the added asset path was ignored.  Move the code
to pick the notice file path selection back above the aapt rules,
and leave the code to generate the notice file rule where it is.

Bug: 236006463
Test: m NetworkStack ALWAYS_EMBED_NOTICES=true
Change-Id: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
Merged-in: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
2022-06-23 18:05:09 +00:00
Ian Zerny
dc2893aeea Use R8 wrapper target and flags.
Bug: b/227746536
Test: atest --host r8retrace-check-retraced-stacktrace
Change-Id: Ia0f65180181df19f5c043cc371893cfe45d248a9
2022-06-23 12:23:18 +02:00
Treehugger Robot
988a7b3dd4 Merge "Fix normalize string for Java 17" am: 82392b747c am: edb9757a41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2132595

Change-Id: I309244cb6de9d0deb36aaeee04f79aa7808e743f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 19:08:04 +00:00
Sorin Basca
5938fed33c Fix normalize string for Java 17
Bug: 233029164
Test: EXPERIMENTAL_TARGET_JAVA_VERSION_17=true \
			EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN=true m
Change-Id: Ic436f813ae19cbdb089c63421ffde70a9cdbd83d
2022-06-22 12:53:51 +01:00
Pedro Loureiro
492128b526 Translate SDK codenames to SDK versions for finalized releases am: 489912283e
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18965894

Change-Id: I67c2cd6d39d13ff9bf00b7da5986664da4ae95c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 22:00:47 +00:00
Pedro Loureiro
489912283e Translate SDK codenames to SDK versions for finalized releases
This applies to updatability attributes of shared libraries.

Bug: 235318264

Test: atest UpdatableSharedLibsTest
Change-Id: Id2c2b769a99ca1debb5d8525e46d37698ef2fc6c
2022-06-17 20:01:21 +00:00
TreeHugger Robot
d23c863fae Merge "Fix strip_prefix flags to strip install paths." into tm-dev 2022-06-10 23:06:33 +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
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
Sam Delmerico
b706b4efef add multilib data_device_bins properties
Some targets need to be able to specify the specific architecture for a
data_device_bin module. This commit adds new properties to allow
specification of first, both, 32, or 64 multilib properties.

Bug: 231448797
Bug: 232408185
Test: go test ./java -run TestDataDeviceBinsBuildsDeviceBinary
Change-Id: I457cf4b1a9ccb28b46042f874c96bd0a87009fab
Merged-In: I457cf4b1a9ccb28b46042f874c96bd0a87009fab
2022-06-08 19:26:01 +00:00
Sam Delmerico
b0837c2fe2 Merge "add multilib data_device_bins properties" am: a22e2c982d am: 88fa2f6a6a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2113524

Change-Id: Id91e9272c91768dd95cd549d9860667f8fe30a0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 14:53:22 +00:00
Sam Delmerico
a22e2c982d Merge "add multilib data_device_bins properties" 2022-06-08 14:07:11 +00:00
Sam Delmerico
cc271e2065 add multilib data_device_bins properties
Some targets need to be able to specify the specific architecture for a
data_device_bin module. This commit adds new properties to allow
specification of first, both, 32, or 64 multilib properties.

Bug: 231448797
Bug: 232408185
Test: go test ./java -run TestDataDeviceBinsBuildsDeviceBinary
Change-Id: I457cf4b1a9ccb28b46042f874c96bd0a87009fab
2022-06-06 20:11:46 +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
Jared Duke
2ecf00081a Merge "Revert "Revert "Use D8 by default for android_test""" am: 44338663a5 am: d810453e7c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2115753

Change-Id: Ibb75070b8e99a4b1b522af5586536ee2652c6e16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 23:30:03 +00:00
Jared Duke
44338663a5 Merge "Revert "Revert "Use D8 by default for android_test""" 2022-06-02 22:35:43 +00:00
Jared Duke
63a3da94d1 Revert "Revert "Use D8 by default for android_test""
This reverts commit 4e445be558.

Reason for revert: GtsExoPlayerTestCases now uses multidex.

Test: m + manual builds for test_suites_x86_64_coverage
Change-Id: I608b3b79137b216f546446e1c4f89f4542572581
Bug: 192032291
2022-06-02 19:12:30 +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
Rico Wind
60722b54d0 Merge "Disable deferred tracing in R8" am: d9a0bf79ec am: 567c248ea2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2106305

Change-Id: I929b78d0c25f85c7453838496eae31d0936dd284
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 04:33:13 +00:00
Rico Wind
d9a0bf79ec Merge "Disable deferred tracing in R8" 2022-06-01 03:54:59 +00:00
Treehugger Robot
e6113e96ea Merge "add missing java/*_test.go files" am: 545d509d94 am: dc17cf675d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2108328

Change-Id: I6d97e49fbdbf4c0a1715eeff9db6eb4b22e503fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 20:51:31 +00:00
Treehugger Robot
545d509d94 Merge "add missing java/*_test.go files" 2022-05-31 19:59:09 +00:00
Sam Delmerico
974c6229e2 add missing java/*_test.go files
fuzz_test.go is not included for now because there is a fix in progress
to make tests pass again.

Test: go test ./java
Change-Id: Idd44fb95c1dda728659ebfc58381252ab49c8230
2022-05-31 18:07:03 +00:00
Rico Wind
1cd1729011 Disable deferred tracing in R8
Bug: 227455445
Bug: 233630328
Test: m -j77 SystemUI + disasm grep mStatusBarWindowCallback
Change-Id: I2d6bb859e74c1afc398e629e53d2ce541ef27642
2022-05-30 12:54:25 +00:00
Paul Duffin
4c6b51a1d5 Merge changes I093fbec4,Iee5c09d5 am: 1db9d96d6a am: 7d40722b8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062449

Change-Id: Iee15dd53c385454ef8dd1e3f59c813dbf8a68d0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 10:14:03 +00:00
Paul Duffin
1db9d96d6a Merge changes I093fbec4,Iee5c09d5
* changes:
  bootclasspath_fragment: Treat some specific modules as test
  bootclasspath_fragment: Add test specific module type
2022-05-30 09:26:24 +00:00
Paul Duffin
ac23cbba12 Merge "Check that API is up-to-date when building java_sdk_library" am: 54e0bb61f0 am: 15e5b40b39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2107342

Change-Id: I96f41264bc8a79d010b76740500a2698d13eedf0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 16:36:43 +00:00
Paul Duffin
54e0bb61f0 Merge "Check that API is up-to-date when building java_sdk_library" 2022-05-27 16:01:57 +00: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
Paul Duffin
ff9b6faba2 bootclasspath_fragment: Treat some specific modules as test
Treats bootclasspath_fragment modules that have not yet been converted
to test modules as if they were test modules. This is a temporary work
around to ease the migration to bootclasspath_fragment_test modules and
is expected to be reverted.

Bug: 194063708
Test: m nothing
Change-Id: I093fbec4e926719b644c64ebfc63f9e3070e28db
2022-05-27 16:17:44 +01:00
Paul Duffin
c15b9e99e5 bootclasspath_fragment: Add test specific module type
This is needed to allow the behavior of the bootclasspath_fragment to
be tweaked for test fragments.

Bug: 194063708
Test: m nothing
Change-Id: Iee5c09d5b580d088ba081d95a788dbde883078ed
2022-05-27 16:17:44 +01:00
Paul Duffin
c166b68589 Check that API is up-to-date when building java_sdk_library
Previously, the checked in version of an API was only checked to make
sure it was up-to-date when running the checkapi target. This change
adds a validation dependency to the ninja rule that generates the API
from source so that up-to-date check is always performed every time
the API is generated. However, because it is a validation dependency
it does not lengthen the build's critical path.

Bug: 234113632
Test: echo > packages/modules/SdkExtensions/java/android/os/ext/api/current.txt
      m framework-sdkextension
      # Passes without this change even though the checked in API is
      # not up-to-date.
      # With this change the build fails reporting correctly that the
      # checked in API is not up-to-date.
Change-Id: I8e65cf716d94aecd61bd943f1485468664ad4a22
2022-05-27 14:03:44 +00:00
Treehugger Robot
ce10c28eb9 Merge "sdkLibraryProperties: fix typo" am: bf04adae7c am: 4ca266f966
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2106444

Change-Id: I85e03e534a8e08c59833f410b855002eaa0a3523
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 17:30:06 +00:00
Treehugger Robot
bf04adae7c Merge "sdkLibraryProperties: fix typo" 2022-05-25 16:29:47 +00:00
Mårten Kongstad
81d909525d sdkLibraryProperties: fix typo
Test: m nothing
Change-Id: Id9a0ba0a1123a298b8713f6dd6526ccb54fe5c46
2022-05-25 16:27:55 +02:00
Muhammad Haseeb Ahmad
35ca6bc67f Merge "Make IsSanitizerEnabledForJni return false" am: 53a129db89 am: e353655540
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2105764

Change-Id: Icb9a49ce6817fe2f7fa6a6d35b6b2345cd07035c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 06:59:42 +00:00
Muhammad Haseeb Ahmad
e6567fe56b Make IsSanitizerEnabledForJni return false
Change-Id: I5e1722bc32b63649fc9973d11e9fd5bdea72ddbe
Test: m
2022-05-25 00:13:08 +00:00
Sorin Basca
ec9d37f146 Merge "Add experimental option to target Java 17" am: 78ce8c23de am: a571b7d389
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2104326

Change-Id: Iac56194ce46c845e0498e0fb794f4eb29895d78e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 16:10:38 +00:00
Sorin Basca
ce720c3663 Add experimental option to target Java 17
Bug: 233029164
Test: EXPERIMENTAL_TARGET_JAVA_VERSION_17=true \
      EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN=true m
Change-Id: I80a9ba9eb356a460c1036e711e793c2ca6620f53
2022-05-24 13:05:17 +01:00
Treehugger Robot
a2a665b40e Merge "Clean up some bp2build technical debt" am: 5bec8d41ea am: d5c19f1eb9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2075729

Change-Id: Ia782f52cc1dfb7a43cef80f8fd374160b0208526
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:53:44 +00:00
Treehugger Robot
5bec8d41ea Merge "Clean up some bp2build technical debt" 2022-05-23 18:01:04 +00:00
Treehugger Robot
d4899ce231 Merge "Revert "Use D8 by default for android_test"" am: 14b500daba am: 1e2e5fcb73
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2100965

Change-Id: I263ec410fc4a118374989d16e0fadee30d9ddf63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 06:20:25 +00:00
Treehugger Robot
14b500daba Merge "Revert "Use D8 by default for android_test"" 2022-05-23 05:49:40 +00:00
Jared Duke
4e445be558 Revert "Use D8 by default for android_test"
This reverts commit 02edc10047.

Reason for revert: Breaks test_suites_x86_64_coverage

Bug: 233421462
Change-Id: I7b04d3fd7802be0f271ea3c29ef25e3d08ab1389
2022-05-23 04:00:44 +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
Treehugger Robot
7158bc6012 Merge "Use D8 by default for android_test" am: 1811ed3764 am: db7ee090e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2097291

Change-Id: I898a3308b5fe5d7477a261fc4d20871f5cacb01d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 23:23:50 +00:00
Treehugger Robot
1811ed3764 Merge "Use D8 by default for android_test" 2022-05-20 22:46:15 +00:00
Jared Duke
02edc10047 Use D8 by default for android_test
android_test defaults to using R8, but with shrinking, optimization and
obfuscation disabled, eliminating most of the benefits of R8. Instead,
use D8 by default, improving build performance and avoiding any other
issues that may arise in test-specific code related to whole-program R8
execution. An initial audit shows that android_test targets that *do*
enable shrinking or optimization also explicitly opt in to R8.

A follow-up CL will do the same for android_test_helper_app, but that
requires some additional auditing of downstream targets.

Bug: 192032291
Test: m + presubmit
Change-Id: I5b14a0986dde210f241a77c3a93daacf9e53d667
2022-05-20 12:02:13 -07:00
Paul Duffin
0ccfe77dd3 Merge "Add custom java_sdk_library info to the SDK info file" am: e73d52cb9b am: e917d3ae4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096802

Change-Id: I27a97a5b6477fe25ce3aafbe8bbdb9ebe2e0bd52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 16:15:25 +00:00
Paul Duffin
e73d52cb9b Merge "Add custom java_sdk_library info to the SDK info file" 2022-05-20 13:59:19 +00:00
Colin Cross
7065be231c Merge "Don't call dexpreopter methods on host modules" am: 6c04c66b7e am: e00639d4ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1908174

Change-Id: I6f0685edfd6f809f9839a4063ca2c5608b9f008e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 21:13:50 +00:00
Colin Cross
6c04c66b7e Merge "Don't call dexpreopter methods on host modules" 2022-05-19 20:46:23 +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
Colin Cross
d7d2a2a6bf Merge "Fix prebuilts of overridden apps" into tm-dev 2022-05-18 17:40:23 +00:00
Lukács T. Berki
5258c42167 Merge "Make java_fuzz_host not implement Sanitizeable." am: 53c6c67cbb am: 2928c292e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096734

Change-Id: I1827cc21a64596be2af5760519d755c078658383
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 07:33:06 +00:00
Lukács T. Berki
53c6c67cbb Merge "Make java_fuzz_host not implement Sanitizeable." 2022-05-18 06:43:42 +00:00
Colin Cross
5088544ddc Fix prebuilts of overridden apps
AndroidApp had its own HideFromMake method and flag that shadowed
the one in ModuleBase.  This caused performOverrideMutator to set the
AndroidApp flag, but ModuleBase.skipInstall to read the ModuleBase
flag, resulting in a conflicting install rule being created.  Remove
AndroidApp's HideFromMake in favor of the ModuleBase one.

Bug: 232788722
Test: TestOverrideAndroidAppWithPrebuilt
Change-Id: I8c0dfcb50ff4dc1e4d0574f150b10d79908f46aa
Merged-In: I8c0dfcb50ff4dc1e4d0574f150b10d79908f46aa
(cherry picked from commit aaa0c1ffcd)
2022-05-17 14:39:36 -07:00
Treehugger Robot
9f2eab6462 Merge "Fix prebuilts of overridden apps" am: 822029166d am: 7a8e610703
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2099730

Change-Id: Ib50d77543a68c07a7c1f2391225132cf0c91b57a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-17 21:19:07 +00:00
Colin Cross
61df14acce Don't call dexpreopter methods on host modules
Only call the dexpreopter methods on device modules so broken
dexpreopt configs don't break host-only unbundled builds.

Bug: 207813628
Test: tradefed branch builds
Change-Id: I41deb765a29c5cef9130a4d26aad7f956f75cdd5
2022-05-17 13:15:39 -07:00
Treehugger Robot
822029166d Merge "Fix prebuilts of overridden apps" 2022-05-17 19:03:42 +00:00
Lukacs T. Berki
8c77ae369a Make java_fuzz_host not implement Sanitizeable.
Also remove a tiny bit of state mutation from sanitizerMutator. Every
little bit helps!

Test: Prebuilts + comparing soong/build.ninja .
 Your branch is up to date with 'aosp/master'.

Change-Id: I73b28b660b572610242765d87b70ab081b0b43df
2022-05-17 11:25:28 +02:00
Treehugger Robot
7583481570 Merge "Make "overrides" attribute of Android_app overridable" 2022-05-17 06:38:19 +00:00
Colin Cross
aaa0c1ffcd Fix prebuilts of overridden apps
AndroidApp had its own HideFromMake method and flag that shadowed
the one in ModuleBase.  This caused performOverrideMutator to set the
AndroidApp flag, but ModuleBase.skipInstall to read the ModuleBase
flag, resulting in a conflicting install rule being created.  Remove
AndroidApp's HideFromMake in favor of the ModuleBase one.

Bug: 232788722
Test: TestOverrideAndroidAppWithPrebuilt
Change-Id: I8c0dfcb50ff4dc1e4d0574f150b10d79908f46aa
2022-05-16 18:27:00 -07:00
zhidou
198f589222 Make "overrides" attribute of Android_app overridable
Move overrides attribute from appProperties to overridableAppProperties

Bug: 220029162
Test: m
Change-Id: I6f527df3173f142311734333ad37018c83d5e279
Merged-In: I6f527df3173f142311734333ad37018c83d5e279
(cherry picked from commit a2ce78f80d)
2022-05-16 18:26:52 -07:00
Paul Duffin
958806b8c8 Add custom java_sdk_library info to the SDK info file
Previously the SDK info file only contained basic common information
about each member. This change adds support for each member to
provide custom information to add to the info file.

It uses that mechanism to add the following:
* "dist_stem"
* "scopes" object containing:
  * for each scope a:
    "<scope>" object containing:
    * "current_api" - the path within the snapshot for the API's .txt
                      file.
    * "removed_api" - the path within the snapshot for the removed
                      API's .txt file.
    * "latest_api" - the path within the build to the latest finalized
                     API .txt file.
    * "latest_removed_api" - the path within the build to the latest
                             finalized removed API .txt file.

In order to access the latest API files it was necessary to add and
resolve dependencies on the module that makes them available. In order
to do that safely the code for creating the names of the modules was
refactored to avoid duplicating the name creation logic.

Bug: 204763318
Test: m nothing
Change-Id: Ica68abbd2b2c7c2b2b7877b502f96cc89f06fd68
2022-05-16 17:09:10 +00:00
Liz Kammer
3bf97bd1c0 Clean up some bp2build technical debt
Previously we ran mutators in bp2build mode to add dependencies, now we
look up modules by name directly. Remove workarounds to allow bp2build
mode to not fail when adding/handling dependencies.

Test: m bp2build
Change-Id: Ibf6fd905150cac306e5c395902ef28f609f4df2a
2022-05-13 19:47:48 -04: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
Spandan Das
456a77e9a0 Update sdk_version check for jni_libs of updatable apps
With aosp/1640364, all variants of a cc_* module use min_sdk_version as
the version part of the clang triple. Therefore, checking
min_sdk_version of jni_libs should be sufficient to ensure that there is
no unintended access to symbols in newer Android versions

Test: go test ./java
Test: TH
Bug: 155209650
Bug: 209409604

Change-Id: I6c064f8a6ea12c8aa40165a9063380306a180c9b
Merged-In: I6c064f8a6ea12c8aa40165a9063380306a180c9b
(cherry picked from commit 2e8c044b2c)
2022-05-13 19:15:58 +00:00
Sam Delmerico
c4eb800be1 Merge "disable usage of plugins as static libs" am: 1cb1c45e8c am: ec2519b0b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2076860

Change-Id: Ic840d8ddbfe8bc7c372ec911a560533809974a94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 18:30:07 +00:00
Sam Delmerico
1cb1c45e8c Merge "disable usage of plugins as static libs" 2022-05-13 17:57:15 +00:00
Thiébaud Weksteen
61aacdad9b Merge "java/lint: enable lint on non-generated srcjar" am: 5471f4ea83 am: 161080466b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2086850

Change-Id: I861533e0e24e854f2ad9cc0103bf333b5111c25a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 07:22:46 +00:00
Thiébaud Weksteen
5471f4ea83 Merge "java/lint: enable lint on non-generated srcjar" 2022-05-12 06:26:41 +00:00
Treehugger Robot
904e8d18f0 Merge "Ensure that *bootclasspath* module types depend on device variants" am: 1a6305f9e0 am: 9bc494bc08
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2095251

Change-Id: Ia0a25286a2d5d3b4861f3a91d529fe52655fc68e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:49:39 +00:00
Treehugger Robot
da3b642bf5 Merge "convert java_resources with bp2build" am: 2737c25e9e am: ff063f97fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2042845

Change-Id: I674693e21d9098ad9f185f394ee055dfac6869af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:49:27 +00:00
Sorin Basca
9bf8eb89da Merge "Strip annotations from library stubs" am: 61c6eef064 am: 12dd25adda
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092623

Change-Id: I05e2c8f527e3f38139d0bb6b9d8c75e27a61570c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:49:08 +00:00
Anton Hansson
ddbf242004 Merge "Use lint database from api_versions_public" am: b82b392423 am: 17094ecba8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092228

Change-Id: Ie5447a6494befbc1ace3f1938181658b2cd79d4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:48:08 +00: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
Anton Hansson
3bc0cdc239 Merge "Support using api-versions.xml from another module" am: 4d92d831ca am: 63c05717b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092227

Change-Id: I5265bd5e426cbe14371044a83c46c6a4517de82d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:46:56 +00:00
Anton Hansson
3f2e8ce166 Merge "Use merged annotations zip for lint" am: 3881e8d7fb am: 58729fada2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092226

Change-Id: I553a73673be5fb34c4c6756809611d61c93856ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:46:46 +00:00
Anton Hansson
15d071f64b Merge "Write AndroidMk for api-versions.xml module" am: 55c157791e am: adfab19c93
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092225

Change-Id: Id3fab7a78bd098d0c7fa4e915e26634a9eb2ffa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:46:33 +00:00
Treehugger Robot
1a6305f9e0 Merge "Ensure that *bootclasspath* module types depend on device variants" 2022-05-11 20:43:30 +00:00
Treehugger Robot
2737c25e9e Merge "convert java_resources with bp2build" 2022-05-11 19:58:48 +00:00
Paul Duffin
b2c2173bfd Ensure that *bootclasspath* module types depend on device variants
Needed to allow change https://r.android.com/2089503 to be reapplied.

Bug: 232106778
Test: Apply the change and then run
      m EMMA_INSTRUMENT=true nothing
Change-Id: I92d19c51cc828295ba13951e65911db707f0f2ba
2022-05-11 15:20:37 +00:00
Sorin Basca
61c6eef064 Merge "Strip annotations from library stubs" 2022-05-11 13:46:25 +00:00
Anton Hansson
b82b392423 Merge "Use lint database from api_versions_public" 2022-05-11 08:11:45 +00:00
Sorin Basca
69f4b082b9 Strip annotations from library stubs
Bug: 222743634
Test: m
Change-Id: Ic44bd7c4c163b723295eb369664432d3651b8597
2022-05-10 19:41:59 +01: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
Sam Delmerico
79985819fe convert java_resources with bp2build
Test: b build --platforms=//build/bazel/platforms:linux_x86
  //external/jarjar:jarjar-binary and try to use on a jar
Change-Id: Id6f4e6937687fd575360fbacaeda55c41922636e
2022-05-10 14:32:52 +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
Anton Hansson
67cf60e7c5 Use lint database from api_versions_public
These two databases are (nearly) identical but the latter is generated
in a much more efficient way.

The diffs are very minor and it's not clear to me which versions is more
correct than the other, though I'm fairly confident they don't matter.

https://paste.googleplex.com/5567994005553152

Bug: 187398174
Test: diff api-versions.xml
Change-Id: I0fa35d4067bc06936b4a31bda0bca7fd41f26aae
2022-05-09 13:10:24 +00:00