Commit Graph

6262 Commits

Author SHA1 Message Date
Paul Duffin
13fe665176 Merge "Revert "Check that API is up-to-date when building java_sdk_library"" 2022-08-17 09:13:23 +00:00
Treehugger Robot
48ec5b302a Merge "Add lint test property" 2022-08-16 21:23:12 +00:00
Colin Cross
79845f9cce Merge "Collect suggested modifications from lint" 2022-08-16 20:38:16 +00:00
Paul Duffin
e7a8664a6a Revert "Check that API is up-to-date when building java_sdk_library"
This reverts commit c166b68589.

Bug: 234113632
Bug: 236187167
Reason for revert: causes problems with update-api, see b/236187167

Change-Id: I4c88151cb5e2c86bb6c1a955c5065966a4fbb3e0
2022-08-16 15:43:20 +00:00
Colin Cross
62695b9f01 Collect suggested modifications from lint
Pass --apply-suggestions to lint, which will cause it to apply
suggested fixes to the source files in the sandbox.  Zip up the
modified sources and export them outside the sandbox.

Test: examine suggested-fixes.zip
Bug: 216456886
Change-Id: Iaeb406462c38cf4b10e51d641432ba1fda9327fa
2022-08-15 16:05:03 -07:00
Treehugger Robot
6d7b20f2e6 Merge "Revert^2 "Promote ExtraText lint warning to an error""" am: ffd6014a68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2183963

Change-Id: I2a9f0e7c05f95186bb1618798ce5cd57a97617a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 07:02:59 +00:00
Cole Faust
d57e8b2c2a Add lint test property
Some libraries are only used for tests, but
are not test module types. These modules get warnings
about @VisibleForTesting usages when they really
shouldn't. Expose a test flag that module authors
can use to make lint treat a module as test code.

Bug: 235339747
Test: Manually tested applying it to SystemUI-tests
Change-Id: I1356749a669dc80a7725605d7159da27c9a211b4
2022-08-11 12:26:51 -07:00
Cole Faust
2aa68684ba Revert^2 "Promote ExtraText lint warning to an error""
This reverts commit 0b29c62498.

Reason for revert: Issue that caused breakage has been fixed on stage-aosp-master. I'll test this cl on go/abtd for the stage-aosp-master branch before submitting.

Change-Id: I90f1941f67ebf9c40402713fa7762a99e368c17f
2022-08-11 17:21:45 +00:00
Mike McTernan
8883d52ce0 Revert "Promote ExtraText lint warning to an error" am: 0b29c62498
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2183156

Change-Id: I03abf2ef079a4b2c371eaf291b54e1d3fbf449b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-11 11:02:51 +00:00
Mike McTernan
0b29c62498 Revert "Promote ExtraText lint warning to an error"
This reverts commit 7868b9e942.

Reason for revert: DroidMonitor: Potential culprit for Bug b/242013483 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Bug: 242013483
Change-Id: Ib73f862f34ca2c8ede7e4b4b9403d1eed00d0426
2022-08-11 10:21:38 +00:00
Treehugger Robot
2a20239c70 Merge "Use aapt2" am: 258d296698
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2178198

Change-Id: I9fa8b617a0854826f6f4da5a66618d17338c5772
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 02:17:45 +00:00
Treehugger Robot
258d296698 Merge "Use aapt2" 2022-08-10 01:21:11 +00:00
Treehugger Robot
5457488c9a Merge "Promote ExtraText lint warning to an error" am: 69f5b684d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2180436

Change-Id: Ie5c874e675795f1ca68205c18a60005a22e9f0e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 00:29:21 +00:00
Treehugger Robot
69f5b684d4 Merge "Promote ExtraText lint warning to an error" 2022-08-10 00:01:46 +00:00
Romain Jobredeaux
20f7fbc61e Merge "Bp2Build converter for android_library_import and android_library." am: aaf4f5ec8a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2165698

Change-Id: I7b1a2b36507a3354bbe35769fdfebfdeb859066a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-09 18:14:50 +00:00
Romain Jobredeaux
aaf4f5ec8a Merge "Bp2Build converter for android_library_import and android_library." 2022-08-09 17:46:59 +00:00
Cole Faust
7868b9e942 Promote ExtraText lint warning to an error
It was previously demoted due to preexisting occurances
of it in the tree, but those have all been removed now.

Bug: 236431222
Test: m lint-check
Change-Id: Ic3501c43a09b10bc8a2944b0caa6ebbec663a008
2022-08-09 09:51:44 -07:00
Saeid Farivar Asanjan
fd27c7cbcc Use aapt2
Replace usage of `aapt` with `aapt2`.

Bug: 236602069
Test: m nothing
Change-Id: I0c3b224351aff82fa251fbe83447fd262ab520b1
2022-08-08 20:21:32 +00:00
Treehugger Robot
2ef4fc8940 Merge "Increase R8 max heap size to 4GB." am: f48643dc55
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2177442

Change-Id: I0d8c8e437966d03422f74299bc7054bc35c2afb1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-08 18:29:23 +00:00
Romain Jobredeaux
c9b2bba3cd Bp2Build converter for android_library_import and android_library.
Minor refactor of android_app converted to account for common attributes
between library and app.

Test: go test
Test: ../bazel/ci/bp2build.sh
Change-Id: I60b06eef6d2b9bc2d91f8b83522747ebbe76bbb6
Bug: 215230093
Bug: 215230095
2022-08-08 11:23:02 -04:00
Jordan Demeulenaere
c33f79996f Increase R8 max heap size to 4GB.
Bug: 241220562
Test: Manual
Change-Id: I983ded61b3a588e3d3b5c8e71596f80aaa2d59e6
2022-08-08 11:40:15 +02:00
Spandan Das
83df960615 Merge "Set targetSdkVersion to 10000 for MTS tests targeting current" am: 0264058aea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2164782

Change-Id: Ifff15aa2a63aed775150aa6d6147e6300633cbfb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-06 01:50:06 +00:00
Spandan Das
0264058aea Merge "Set targetSdkVersion to 10000 for MTS tests targeting current" 2022-08-05 22:52:27 +00:00
Remi NGUYEN VAN
85d5ed4bb2 Merge "Make ignorewarnings optional in optimize" am: 439fbfc25f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2173927

Change-Id: Ibe0ed43f6fab59054946ab1377fb27440a028141
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-05 01:39:21 +00:00
Remi NGUYEN VAN
439fbfc25f Merge "Make ignorewarnings optional in optimize" 2022-08-05 01:24:57 +00:00
Spandan Das
9f7ae7f565 Set targetSdkVersion to 10000 for MTS tests targeting current
MTS tests built on unstable branches (e.g. git_master) should be testable on
old system images (e.g. S). However, they run into an error during installation
on older images:
`Requires development platform $<current_codename>, but this is a
release platform`

This CL fixes this issue by updating the target_sdk_version of MTS test apps
targeting current to the magical sdk_version 10000

Bug: 227473065
Test: go build ./java
Test: TH
Change-Id: Ic0358a48a19dc239defbb4ee8ec99225cce75584
2022-08-04 21:23:14 +00:00
Alexei Nicoara
342945df01 Merge "Overriding placeholder version in updatable apks" am: 075571b5e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2167106

Change-Id: Ie411cb4fb7ba5c4c8b402bff916ac55fa1b6def8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 08:52:28 +00:00
Alexei Nicoara
075571b5e7 Merge "Overriding placeholder version in updatable apks" 2022-08-04 08:28:16 +00:00
Remi NGUYEN VAN
bdad314f97 Make ignorewarnings optional in optimize
This allows targets to opt-in to running R8 without the -ignorewarnings
flag. Ignored warnings can cause code to be optimized incorrectly, so
this makes the build safer for such targets.

Ideally ignore_warnings should default to false, but all targets need to
be fixed for that to happen. As a first step, provide a mechanism for
individual targets to ensure they do not introduce regressions.

Bug: 229727645
Bug: 180878971
Bug: 226127213
Bug: 239990030
Test: m (runs dex_test)
Change-Id: Ic0eef29598c1ee47e958da8a5048d9696165a235
2022-08-04 13:23:47 +09:00
Sam Delmerico
6f510d5397 Merge "add java_import to mixed build" am: c31778ffbc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1999612

Change-Id: Iae2319f0262d20c59ce977e793bf9a6d2556eec2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 17:49:12 +00:00
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