Commit Graph

6807 Commits

Author SHA1 Message Date
Colin Cross
2150160d8f Copy imported APKs to output filename
android_app_import and android_test_import modules with processed: true
and skip_preprocessed_apk_checks are used directly from the source tree.
If the source file name doesn t match the module name and the file is
used as test data it can result in the wrong filename being used.  Copy
the source file to an output file with the correct name first.

Bug: 290376750
Test: m CtsAppSecurityHostTestCases
(cherry picked from https://android-review.googlesource.com/q/commit:5780d57a7116643c6d9eac735982ac44bd6b0189)
Merged-In: I4a6dd1c5e48db7085ea41035def31f0844948a46
Change-Id: I4a6dd1c5e48db7085ea41035def31f0844948a46
2024-02-29 04:15:27 +00:00
Colin Cross
955f87b65a Implement OutputFileProducer for android_app_import and android_test_import
Fixes: 290376750
Test: builds
(cherry picked from https://android-review.googlesource.com/q/commit:5368d0b44a7124072ada43ae7f21fa6ded7e0606)
Merged-In: I5fc3a759462cfd4342b9330ac8978368feee26ca
Change-Id: I5fc3a759462cfd4342b9330ac8978368feee26ca
2024-02-27 05:56:12 +00:00
Colin Cross
9bc4228f88 Strip META-INF/services from implementation jars when using as header jars
If a header jar couldn't be built (for example when an API generating
annoation processor is in use) the implementation jar is reused as the
header jar.  If the implementation jar contains an annotation processor
listed in META-INF/services/javax.annotation.processing.Processor then
later javac executions with the implementation jar in the classpath
could attempt to run the annotation processors unexpectedly.  Remove
the META-INF/services directory when using an implementation jar as
a header jar.

Bug: 290933559
Test: builds
(cherry picked from commit f06d8dc8e3)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d3b1b77184b1c002136039e70074899a35b1ed77)
Merged-In: I40d48644bc5a09a9564dc2c4b38f627edd00fcf8
Change-Id: I40d48644bc5a09a9564dc2c4b38f627edd00fcf8
2024-02-19 13:01:23 +00:00
Dan Shi
361b6e28ae Support test runnner option in auto generated test configs am: 5bde2e2ca9
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/26053802

Change-Id: Id8b68d57d95bb72df1e1ff6bf40ec6d35e3bed70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30 00:49:29 +00:00
Dan Shi
5bde2e2ca9 Support test runnner option in auto generated test configs
Bug: 284179405
Bug: 236980335
Test: unittest
Change-Id: Ifae3d556ff79153ca6c3067347fc259b665fb2e1
Merged-In: Ifae3d556ff79153ca6c3067347fc259b665fb2e1
2024-01-29 23:19:39 +00:00
Jihoon Kang
74965459c7 Introduce aconfig_declarations property in udc-mainline-prod
Currently, Soong changes in aosp are not merged to udc-mainline-prod,
while the mainline projects changes from aosp are merged. This leads to
a conflicting build configuration issue for aosp-first projects, which
want to maintain consistent bp module definition between aosp and main.

In order to support specifying `aconfig_declaration` property in aosp
for mainline projects, this change adds the property to the module
definition while not performing any build actions, in order to resolve
presubmit failures in udc-mainline-prod when specifying the property in
aosp changes.

Cherry-picking the aosp changes that introduces the property is not an
option, as the flagging infra is not expected to be imported to
udc-mainline-prod.

Test: m nothing --no-skip-soong-tests
Bug: 315027929
Merged-In: I37becd1b9dd9069d7ac4abed130906df30b3fdf4
Change-Id: Ie467c1dd4a36774f6268452fae8c054b9b3ad7d9
2024-01-23 22:07:09 +00:00
Aditya Choudhary
95e2a3cbcd Add source file provider for genrule/srcs, python libraries and rust libraries.
Ignore-AOSP-First: CPing test_spec rule to udc-mainline-prod to support migration of test targets. Cherry pick of:aosp/2786121

Change-Id: I2d7d4684a10c15aeecc27b8db800ab27a807d2e2
Merged-In: I2d7d4684a10c15aeecc27b8db800ab27a807d2e2
2024-01-09 16:25:12 +00:00
Aditya Choudhary
40c8da1d39 Add Code Metadata rule to soong/testing.
This Cl adds a new rule to Soong to generate code ownership metadata. Also, this CL adds a provider in the Java SDK library to provide generated source files to the Code_metadata rule. Will add providers to other libraries in the future changes.

Ignore-AOSP-First: CPing test_spec rule to udc-mainline-prod to support migration of test targets. Cherry pick of:aosp/2786121

Bug: 296873595
Change-Id: Ic2e43aa9b161231fea4416d1f0d36b778361d7c5
Merged-In: Ic2e43aa9b161231fea4416d1f0d36b778361d7c5
2024-01-09 15:57:14 +00:00
Aditya Choudhary
5202fc918e Use result.Config.PrebuiltOS() to get prebuiltHost in test_spec_test
Bug: 312536783
Bug: 312536905
Test: m nothing --no-skip-soong-tests -j96

Ignore-AOSP-First: CPing test_spec rule to udc-mainline-prod to support migration of test targets. Cherry pick of:aosp/2836072

Change-Id: I1e12281927269d42ae796348b223030acfd6ecfa
Merged-In: I1e12281927269d42ae796348b223030acfd6ecfa
2024-01-03 19:55:00 +00:00
Aditya Choudhary
d860dd1b31 Add test for soong/testing/test_spec.
This CL adds test for test_spec.go and all_test_specs.go (singleton).

Bug: 296873595
Test: m nothing --no-skip-soong-tests -j96

Ignore-AOSP-First: CPing test_spec rule to udc-mainline-prod to support migration of test targets. Cherry pick of:aosp/2836072


Change-Id: I5010c68512e75d1b9a337c02da86faac15e376fe
Merged-In: I5010c68512e75d1b9a337c02da86faac15e376fe
2024-01-03 19:54:51 +00:00
Aditya Choudhary
57011173b3 Add proto for Test ownership metadata.
This Cl adds a new rule to Soong to generate test spec metadata. Also, this CL adds a provider in various test module to provide test spec related data to the Soong rule.
Will add providers and test code to other Module in the future changes.
Provider added for the following test modules in this change: android_robolectric_test, android_test, bootclasspath_fragment_test, java_test, java_test_host, python_test, python_test_host, sh_test,and sh_test_host.

Bug: 296873595

Change-Id: I5f89f72d5874bb7838ae357efdb8c6ca208e18a7

Ignore-AOSP-First: CPing test_spec rule to udc-mainline-prod to support migration of test targets. Cherry pick of:aosp/2774872

Change-Id: I23c09ed262915a5f68d6e7a4f21683e0389cd5f6
Merged-In: I5f89f72d5874bb7838ae357efdb8c6ca208e18a7
2024-01-03 12:40:50 +00:00
Paul Duffin
640380699f Move special next handling of hidden APIs to java_sdk_library
Previously, the logic to add the Metalava command line option
`--hide-annotation android.annotation.FlaggedApi` when
`SOONG_SDK_SNAPSHOT_HIDE_FLAGGED_APIS=true` was done in
`droidstubs.go`. It worked but it turns out that we need to pass more
options to Metalava in that situation because while we need to hide
most flagged APIs we need to release some flagged APIs whose features
are ready. They cannot have the `@FlaggedApi` annotation removed
because that would cause the APIs to be released in the next QPR which
is not what we want.

So, in addition to the above option we will need to pass additional
options to Metalava to tell it to keep some flagged APIs. Rather than
hard code that in the build, requiring build changes for every new
SDK extension release this change uses the argument expansion mechanism
in Metalava (treating `@<file>` as if the contents of `<file>` were
passed as command line options) to delegate that to
":sdkext-released-flagged-apis".

The easiest way to do that was to move the logic to `sdk_library.go`
as `droidstub` would do the work of tracking the file dependencies
correctly. It also reduces the affect modules to `java_sdk_library`
modules rather than all `droidstubs` modules.

Bug: 313398274
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true vendor/google/build/mainline_modules_sdks.sh --build-release=next
Change-Id: Ib1cf22f8ef74abc135215537e9311936372eaac7
Merged-In: I4967376c0236bad729398af80fa59b48dbab5f21
2023-11-28 16:26:06 +00:00
Paul Duffin
8d6ba4367d Allow module SDK snapshot build to hide flagged APIs
Temporary workaround to allow module SDK snapshot builds to hide
flagged APIs until such time as development moves to `main` and
the build in `main` can handle that properly.

Bug: 299570421
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true vendor/google/build/mainline_modules_sdks.sh
      # Check that flagged APIs are excluded from everything but
      # for-latest-build.
Change-Id: I5b133b98aab91b2ad5ba717dd663c60a5ed90c9d
Merged-In: I4967376c0236bad729398af80fa59b48dbab5f21
2023-11-27 08:23:24 +00:00
Sam Delmerico
df97bbfcc2 android_app APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE
Currently the product variable that is controlled by
APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE only overrides apexes, but it
doesn't apply to android_apps. This commit allows android_apps which set
updatable: true in their Android.bp to have their min_sdk_version be
overriden by this product variable.

Bug: 295311875
Test: go test
(cherry picked from https://android-review.googlesource.com/q/commit:0e0d96efa71e7146f2d43ec9c2fbe66226426811)
Merged-In: If3cb82a17cae4553b577dd1a4637ee13c3c95302
Change-Id: If3cb82a17cae4553b577dd1a4637ee13c3c95302
2023-11-03 10:02:10 +00:00
Yu Liu
61aedb8be3 Change java_test_host to support cov variant.
Bug: 279960392
Test: CI and m --skip-soong-tests TARGET_PRODUCT=aosp_x86_64 EMMA_INSTRUMENT=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="external/cronet" mts
(cherry picked from https://android-review.googlesource.com/q/commit:d8aa20062aad83b170b0945b71db79e48daa9fe8)
Merged-In: I4489ed725aee6097e6e340f5f6d06ecaf1c64222
Change-Id: I4489ed725aee6097e6e340f5f6d06ecaf1c64222
2023-10-30 16:40:39 +00:00
Paul Duffin
97bcce7695 Retain concrete overrides of abstract methods by default
Bug: 299366704
Test: m checkapi
(cherry picked from https://android-review.googlesource.com/q/commit:629b9d287d61b44a587629c7c1176fcc2197590d)
Merged-In: I3d9fafefe90a98568c16d80c30e4d1d88a22c350
Change-Id: I3d9fafefe90a98568c16d80c30e4d1d88a22c350
2023-10-12 08:54:07 +00:00
Paul Duffin
3337dc79b9 Merge "Pass the current API file to the metalava --use-same-format-as option" into udc-mainline-prod 2023-09-15 08:32:33 +00:00
Paul Duffin
3704158c70 Replace --api-overloaded-method--order with --format-defaults
Bug: 300052204
Test: m checkapi
(cherry picked from https://android-review.googlesource.com/q/commit:504d3565790b0dc5220f9c9c7ae230fad758fed7)
Merged-In: I8952a828437872ceebf7f9da4dc297173ed2a90b
Change-Id: I8952a828437872ceebf7f9da4dc297173ed2a90b
2023-09-13 12:03:10 +00:00
Paul Duffin
8fa1eb0e16 Pass the current API file to the metalava --use-same-format-as option
That will allow the format of a file to be changed by simply modifying
the signature format in the current API file (e.g. from `2.0` to `3.0`)
and then running `m update-api` and it will just update the current API
file (and the corresponding removed API file).

Bug: 295577788
Test: m checkapi && m update-api
      # Also did as described above and modified the
      # `libcore/api/current.txt` file from `2.0` to `3.0` and ran
      # `m update-api` and checked that only that file and the
      # corresponding `removed.text` file was changed.
(cherry picked from https://android-review.googlesource.com/q/commit:10a23c29e279ebfef4869cea72a65207e8de0cab)
Merged-In: I20c9bc151677502cf09b0c06fb442fd385caccdd
Change-Id: I20c9bc151677502cf09b0c06fb442fd385caccdd
2023-09-13 12:03:02 +00:00
Paul Duffin
a6d2ecd2ff Replace -bootclasspath and -classpath metalava options with --classpath
Metalava has not differentiated between bootclasspath and classpath for
years so this change replaces the use of the two deprecated single
hyphen options with `--classpath`.

Bug: 295136054
Test: m checkapi
(cherry picked from https://android-review.googlesource.com/q/commit:f8aaaa13f4fb87cc0f7bd5231f2334499d174109)
Merged-In: I3ab20b76a60cab66a27784b7d87a069813d19835
Change-Id: I3ab20b76a60cab66a27784b7d87a069813d19835
2023-09-07 13:50:05 +00:00
Paul Duffin
bff6432d7c Stop using single-hyphen metalava options
`-encoding` and `-source` have been deprecated in metalava.

`-encoding` actually does nothing apart from check to make sure that
the value is `utf-8` (in some case). Metalava always uses `utf-8`.

`-source` has been deprecated in favor of `--java-source` as metalava
also can consume kotlin and it has its own `--kotlin-source` option.

Bug: 295136054
Test: ./gradlew
(cherry picked from https://android-review.googlesource.com/q/commit:808211e519ae43517ae7d6ed5348ffb1e3b63c45)
Merged-In: I08e6931958f40022d65d417360e32b72a1d70444
Change-Id: I08e6931958f40022d65d417360e32b72a1d70444
2023-09-07 13:49:44 +00:00
Paul Duffin
2ba521e408 Explicitly specify --api-overloaded-method-order source for metalava
Previously, `--api-overloaded-method-order source` was the default if
that option was not specified but the other change in this topic is
switching it to `--api-overloaded-method-order signature` to match the
behavior in AndroidX. This change explicitly specifies the option
needed by Soong's use of metalava.

Bug: 294300564
Bug: 285140653
Test: m checkapi
Merged-In: I00e049e0d991e650ab9940a3d495ed2b6e7480f8
Change-Id: I00e049e0d991e650ab9940a3d495ed2b6e7480f8
(cherry picked from commit 7202ffebf9)
2023-08-05 22:16:44 +01:00
Paul Duffin
d7d52fa7cc Explicitly specify --api-class-resolution api for metalava
Previously, `--api-class-resolution api` was the default if that option
was not specified but the other change in this topic is switching it to
`--api-class-resolution api:classpath` to match the behavior in
AndroidX. This change explicitly specifies the option needed by Soong's
use of metalava.

Bug: 294300564
Bug: 285140653
Test: m checkapi
Merged-In: Ief3c7f9dfdfa946f21cb048a579ec90309fb350f
Change-Id: Ief3c7f9dfdfa946f21cb048a579ec90309fb350f
(cherry picked from commit 5b7035f850)
2023-08-05 22:16:44 +01:00
Paul Duffin
8fcc99cc09 Remove reference to the deprecated and disabled Typo issue
Metalava no longer looks for common typos. It relies on the code
analyzers that run on Gerrit to detect them.

Bug: 294300564
Bug: 288072162
Test: m checkapi
Change-Id: I08eca8008af39ebe69442db419ebd3d3378aa0de
Merged-In: I08eca8008af39ebe69442db419ebd3d3378aa0de
(cherry picked from commit c0036491cd)
2023-08-05 22:16:37 +01:00
Spandan Das
deaba3de51 Ignore test apexes from bp2build generated tags
Soong does not enforce apex_available on the contents of test apex. To
prevent special-casing test apexes in the apex validation aspect in
Bazel, drop the test apexes from the tags altogether.

( The core problem I am trying to solve is making sure that stub
libraries in Bazel have a single apex available. apex validation happens
to be a nice side benefit)

Bug: 277651159
Test: go test ./bp2build
(cherry picked from https://android-review.googlesource.com/q/commit:39b6cc53369a6ec132b58d99514cd7a2ea499efd)
Merged-In: Ibb3cfedb5c0f2cda0464bf3758c70b67cb5885d1
Change-Id: Ibb3cfedb5c0f2cda0464bf3758c70b67cb5885d1
2023-06-06 14:09:24 +00:00
Anton Hansson
b878fac67a Merge "Allow Bluetooth to use privapp_allowlist" into udc-mainline-prod 2023-06-03 07:58:22 +00:00
Anton Hansson
a91268a690 Allow Bluetooth to use privapp_allowlist
Apparently there's some special case-code in package manager that
scans apps as privileged regardless of their location. BT is one
such app -- so allow it to specify a privapp allowlist even though
it isn't in priv-app.

Bug: 284500052
Test: use privapp_allowlist in Bluetooth and its overriddes
Change-Id: Ib9ac86ebc45087a176100fe8df07db7bf81a85a7
2023-06-02 09:30:08 +00:00
Anton Hansson
0a3bb7dc5e Change install name of privapp allowlists
Use the APK's filename as the on-device filename for the allowlist.
Previously the filename of the source xml file was used, which leads to
a problem when the same source file is used for different apps (even
if only one of those modules ends up being installed).

Bug: 284500052
Test: app_test.go & presubmit boot tests
(cherry picked from https://android-review.googlesource.com/q/commit:92d1f52790e83952bf305464f0083d8c05f4c557)
Merged-In: I0b43a35e3a310464d79d7f37e0900d639f4a479c
Change-Id: I0b43a35e3a310464d79d7f37e0900d639f4a479c
2023-06-02 08:25:33 +00:00
Sam Delmerico
022adb0b8c ensure that privapp_allowlist is installed before android_app
AndroidMk assumes that the app is the last file installed, and it uses
this assumption to populate the LOCAL_SOONG_INSTALLED_MODULE entry. This
CL moves the privapp_allowlist installation to before the app
installation to respect this assumption.

Bug: 242509786
Test: go test
Test: OUT_DIR=out.ref m nothing &&
  cp aosp/2562351 && OUT_DIR=out.change m nothing &&
  GOWORK=$PWD/build/bazel/mkcompare/go.work \
  go run android/bazel/mkcompare/cmd -json \
  <(sed -e "s/out\.ref/out/g" out.ref/soong/Android-aosp_cheetah.mk) \
  <(sed -e "s/out\.change/out/g" out.change/soong/Android-aosp_cheetah.mk)
  && verify manually that the only diffs are related to the removal of
  the prebuilt_etc module.
(cherry picked from https://android-review.googlesource.com/q/commit:b1daccdc97ae08603b0e2f5eafe97bd11238ee58)
Merged-In: I95ec27070f575e79fb976de68493a219717ed89a
Change-Id: I95ec27070f575e79fb976de68493a219717ed89a
2023-05-26 07:48:53 +00:00
Anton Hansson
ee475b4426 Merge "don't require package_name for non-override android_apps" into udc-mainline-prod 2023-05-25 08:58:35 +00:00
Treehugger Robot
ae636386d6 Merge "Enable referencing of aapt-generated proguard flags" into udc-mainline-prod 2023-05-24 21:43:23 +00:00
Sam Delmerico
502d807ae9 don't require package_name for non-override android_apps
For a non-override android_app, we can assume that the privapp_allowlist
already contains the correct package_name, and so we don't need to
overwrite it in this case.

Bug: 242509786
Test: go test
Ignore-AOSP-First: need to submit here to update PermissionController in sync with internal version
Merged-In: I0f137e34cae3478dc8b9178d138121ff1d936f07
Change-Id: I0f137e34cae3478dc8b9178d138121ff1d936f07
2023-05-24 14:37:40 +00:00
Andrei Onea
c53cfd54d9 add privapp_allowlist property to android_app
This change allows override_android_app to use the same
privapp_allowlist as the non-override module so that they will always
remain in sync.

Test: go test ./java -v -run TestPrivappAllowlist
Test: go test ./apex -v -run TestApexWithApps
Test: m com.android.permission com.google.android.permission and verify
  manually that apex_payload.img contains correct privapp_allowlist
Test: m com.android.permission before and after change &&
  `diffoscope apex_payload_reference.img apex_payload_with_change.img`
  && verify that there are no semantic changes
Bug: 242509786
(cherry picked from https://android-review.googlesource.com/q/commit:580636bdd23171f31bfedd773c065e0861dd5c4a)
Merged-In: Ifdcb28af40763aed7a4aac9a7f681153554bc256
Change-Id: Ifdcb28af40763aed7a4aac9a7f681153554bc256
2023-05-24 13:58:09 +00:00
Jared Duke
4c5da94fa4 Enable referencing of aapt-generated proguard flags
Some targets may implement classes declared elsewhere, e.g., system
server implements services defined in framework-res.apk's manifest.
Allow depending on the aapt-generated proguard flags for a given
target to support this.

Bug: 272495195
Test: m + reference ":framework-res{.aapt.proguardOptionsFile}"
(cherry picked from https://android-review.googlesource.com/q/commit:34b080ddcf7757bba3dcb938df46aa660b2564a0)
Merged-In: I2a16632ed6e5a9bddbe326bdb7ab0dd79b45e587
Change-Id: I2a16632ed6e5a9bddbe326bdb7ab0dd79b45e587
2023-05-23 21:06:18 +00:00
Treehugger Robot
38bd9c1a63 Merge "Don't panic if no certificates found" into udc-dev am: 16ef197d6a
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/23297153

Change-Id: I1afc85f7293183bd955511f9c26788c8d2ab31c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 17:00:42 +00:00
Zyan Wu
d1f548a19d Don't panic if no certificates found
Getting the first certificate will panic if there are no certificates,
which can happen when AllowMissingDependencies is set and the
certificate property is a module reference to a missing module.
Only get the first certificate if the list is not nil.

Use mainCertificate since it handles the logic already.

Test: TestAppMissingCertificateAllowMissingDependencies
Bug: 283102635
Merged-In: : I8b27f65aa7d071041171ad45ac52bf47fa31bf2b
Change-Id: Icaaa45d48ca4edb876687c0813165d107d28ef8a
2023-05-18 15:58:20 +08:00
Gurpreet Singh
16f72e84be Merge "Add genrule to build *.latest.version build target." into udc-mainline-prod 2023-05-15 16:31:40 +00:00
Gurpreet Singh
ed885bb7dd Add genrule to build *.latest.version build target.
Build a new target *.latest.version which will contain a text file
containing the last finalized version.

Bug: 242316893, 282140551
Test: atest prebuilt_apis_test
(cherry picked from https://android-review.googlesource.com/q/commit:daa314ac97d5ab8076113ee7f269b4e4cc3cf620)
Merged-In: I41fa91c9ec273f342b7807c66c4d65ba13260124
Change-Id: I41fa91c9ec273f342b7807c66c4d65ba13260124
2023-05-13 06:02:59 +00:00
Jiakai Zhang
5f5a17fd6b Dexpreopt ART jars and framework jars together.
Bug: 280776428
Test: atest art_standalone_dexpreopt_tests
Test: -
  1. m
  2. Check .invocation file (http://gpaste/6498044089466880)
  3. Check files in $ANDROID_PRODUCT_OUT/system/framework/x86_64
Test: -
  1. m dist
  2. Check files in out/dist/boot.zip
Test: -
  1. art/tools/buildbot-build.sh --host
  2. m test-art-host-gtest
  3. art/test/testrunner/testrunner.py --host
Test: m build-art-target-golem
(cherry picked from https://android-review.googlesource.com/q/commit:c08c162b5a82ddfc44e9944d798636b2241308de)
Merged-In: I89490252e56a05edab03fdddc6539fa4d7f79756
Change-Id: I89490252e56a05edab03fdddc6539fa4d7f79756
2023-05-12 11:16:31 +00:00
Jiakai Zhang
7ba1ca0ac3 Unify installDirOnHost and installDirOnDevice.
These two fields never do what they are described to do. This CL unifies
them to avoid the confusion.

Bug: 280440941
Test: m
(cherry picked from https://android-review.googlesource.com/q/commit:09d88df0407263e846b01c226184b262f2e36678)
Merged-In: I3652d73a50832a2e494d9f5cae750f5fc38293b4
Change-Id: I3652d73a50832a2e494d9f5cae750f5fc38293b4
2023-05-12 11:16:22 +00:00
Jiakai Zhang
4e9eb1ae46 Remove the ability to install boot images by bootclasspath_fragments.
We don't need this anymore because we are going to compile ART jars and
framework jars together.

Bug: 280776428
Test: m
(cherry picked from https://android-review.googlesource.com/q/commit:b47caccbc037b65462f757c462a99732ad6dd51c)
Merged-In: I070157530449a1bb5779e25984c367df3dde7b36
Change-Id: I070157530449a1bb5779e25984c367df3dde7b36
2023-05-12 11:16:10 +00:00
Jiakai Zhang
c67528bf7e Prepare tests for dexpreopt changes.
After this change, there is a clear separation between tests that are
related to dexpreopt and tests that are not. The former uses
PrepareForTestWithDexpreopt, while the latter uses
PrepareForTestWithJavaDefaultModules. The benefit is that the latter
will no longer affected by any dexpreopt changes.

Bug: 280776428
Test: m nothing
(cherry picked from https://android-review.googlesource.com/q/commit:b95998be731406209f18fab764b96421a17ab4c9)
Merged-In: Ib957765b9287d51c082e0a33cee17a6bb56daeef
Change-Id: Ib957765b9287d51c082e0a33cee17a6bb56daeef
2023-05-12 11:16:01 +00:00
Jeongik Cha
bc9256b531 Get rid of DeviceName() from path related to dexpreopt
As-is, dexpreopt config and bootjar is in the dir including
DeviceName(). It causes unnecessary dexpreopt invocation when target is
changed repeatly. To avoid it, rename dir to common name.

Bug: 278833696
Test: m
(cherry picked from https://android-review.googlesource.com/q/commit:4753b39ccaaf573910e6b7a4200e9ca03ec8d96d)
Merged-In: I2818d9ae09e6c22ca6989cc8efdb70b470ec502c
Change-Id: I2818d9ae09e6c22ca6989cc8efdb70b470ec502c
2023-05-12 11:15:51 +00:00
Jiakai Zhang
1b2f306db8 Generate app profiles even if dexpreopt is disabled.
Bug: 280440941
Test: -
  1. Patch ag/22302622 to disable dexpreopt.
  2. lunch aosp_cf_x86_64_phone-userdebug && m
  3. See app profiles still generated.
Test: -
  1. Patch ag/20592051 to enable profile for service-art.
  2. banchan com.android.art x86_64 && m
  3. See the profile for service-art generated.
(cherry picked from https://android-review.googlesource.com/q/commit:cf61e3c59133227894ac7d72091b48451a3e6761)
Merged-In: I6090b4b74cedb6d129fcbeef58d075c8ccdcc4e2

Change-Id: I4e721b475b84a2f667bbccc030a8947078f26bb0
2023-05-09 21:47:33 +01:00
Jiakai Zhang
1d99986d30 Generate boot image profiles even if dexpreopt is disabled.
Bug: 280440941
Test: -
  1. Patch ag/22302622 to disable dexpreopt.
  2. See boot image profiles still generated.
(cherry picked from https://android-review.googlesource.com/q/commit:bc698cd28aa2ee17af208bfd56f003347116ddb0)
Merged-In: I5f7f746ca1d4da660fe0c40115e6c71750dfdccc

Change-Id: I1bf05ade53fa83f3dba46f28a8f9246ba1fdf664
2023-05-09 21:47:31 +01:00
Spandan Das
f902b8af82 target_sdk_version replacement should respect REL branches
Currently, target_sdk_version of MTS tests were being set to 10000 even
in release branches. This should only happen in active branches.

Test: Unit test
Test: aapt2 on CtsContentTestCases in udc-dev and verified
targetSdkVersion is 34
Bug: 279507428

Change-Id: Ib79318febc0f6e771b3679c0281a97357930ec56
Merged-In: Ib79318febc0f6e771b3679c0281a97357930ec56
(cherry picked from commit fb6a1ee68b)
2023-04-29 03:50:01 +00:00
Alex Buynytskyy
e9184d757e UpsideDownCake/34 is now REL
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: Iaa3054f3449a5bf6887c24937646d22c79c4af1e
Merged-In: Iaa3054f3449a5bf6887c24937646d22c79c4af1e
2023-04-21 19:36:27 +00:00
Jihoon Kang
26b0dff329 Merge "Add additional java_api_library module to java testing" am: d1a038c183 am: 8ce85df02b am: 115dae4d1c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2541410

Change-Id: Ib53077770b1d8ea6014b4128f1d52986590da2f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 04:43:54 +00:00
Jihoon Kang
fb502593cd Add additional java_api_library module to java testing
Module lib surface is comprised of contributions from art, conscrypt,
and i18n api domains. On top of this, the module lib api surface generates an additional stub library containing the contributions of the non-updatable api domains. Adding this additional module to the testing module enables more thorough testing of module lib api scope java_api_library modules.

Test: m
Change-Id: Ia648651fb9e6cba2642de7e8d39047d888bf49ce
2023-04-17 21:28:47 +00:00
Cole Faust
3cec6f3609 Merge "Remove special handling of prebuilt_framework-res" am: 35dcf77fb6 am: 76093aad8d am: 4d76485722
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2536611

Change-Id: I194b57c9dd723a058f14f354b539da9407dc2128
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-14 20:08:50 +00:00