summaryrefslogtreecommitdiff
path: root/java
AgeCommit message (Collapse)Author
2022-02-22Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Ia2198b401a3a907c785316e0ef4c00bf27fa59b1
2022-01-11[automerge] Revert "Time out and dump stacks from R8 processes after 30 ↵Colin Cross
minutes" 2p: b18a037fc6 am: 44c522badf Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/16426550 Change-Id: Icf53dbe05f00dad699ea1f8ce968f2afa3b78235
2021-12-08Revert "Time out and dump stacks from R8 processes after 30 minutes"Colin Cross
This reverts commit 29c294b2cfb778b77a1556511ba53414254ddbab. The deadlock in R8 was fixed, and the timeout causes problems when RBE is enabled and the R8 action gets stuck in a queue for 30 minutes. Bug: 207767452 Test: checkbuild Change-Id: Ia0c3826aea3288e9db3bdbd4955e1e16c0a38fe3 Merged-In: Ia0c3826aea3288e9db3bdbd4955e1e16c0a38fe3 (cherry picked from commit a832a04db24683228ab60c86fa17cf343168cb70)
2021-11-02Skip dexbootjar check using AllowMissingDependencies flagTaiyab Haque
Skip dexbootjar check using AllowMissingDependencies flag Change-Id: I969d0b4bdcd7fd7adfd1a536d0657f0b8484ccbf CRs-Fixed: 3050499
2021-10-05Add {.aar} support for android_librarySaeid Farivar Asanjan
Bug: 199548380 Test: manually Change-Id: I2c392d3dfc545c23495b03d0f236680fd59e1401
2021-09-01Revert "Skip dexbootjar check using AllowMissingDependencies flag"Jose "Pepe" Galmes
Revert "init: Separate the required modules of core and recovery..." Revert "[automerger] cc/cc.go: Support per-image-variation "requ..." Revert submission 579058-b/196306898 Reason for revert: Devices not booting in Keystone lab Reverted Changes: I53f309b36:[automerger] init: Separate the required modules o... I68be9ad4c:[automerger] Skip dexbootjar check using AllowMiss... I068fefdef:[automerger] cc/cc.go: Support per-image-variation... I40ae1fe6b:Remove unused VSDK projects I78b062afd:Skip dexbootjar check using AllowMissingDependenci... I03f0cf6af:init: Separate the required modules of core and re... Iebab29ed5:cc/cc.go: Support per-image-variation "required" Change-Id: I17dbc0e078746f8c8c7ae9b840bac1d1d3df3b21
2021-08-31Merge "Skip dexbootjar check using AllowMissingDependencies flag" into ↵Spandan Das
s-keystone-qcom-dev
2021-08-30Skip dexbootjar check using AllowMissingDependencies flagSpandan Das
Soong checks that every module part of a bootclass_fragment provides a dex boot jar file, even if the module is not a dependency of vendor.img Using AllowMissingDepdencies() to skip this check allows vendors to be more aggressive in removing projects from their source tree Test: In build/soong, run go test ./... Test: m nothing Bug: 196306898 Bug: 192616764 Change-Id: I78b062afdc19a6a3251aa8552230f3fcf334b6fb (cherry picked from commit 10ea4bf9d43455d2eafdc8c6d726517a11b99af7)
2021-08-13Merge SP1A.210812.003Scott Lobdell
Change-Id: I6a38f8840aef960b55e84a9ba239ccff313cdf35
2021-08-11Collect lint reports from apps in apexesColin Cross
Lint reports were only being collected from jars in apexes, not apps. Bug: 188772607 Test: mainline_modules_arm64 build Change-Id: Ie84819343f8b8ab3f43496bbc9b7876d0d0d8e70 Merged-In: Ie84819343f8b8ab3f43496bbc9b7876d0d0d8e70 (cherry picked from commit 8355c1524fbb1d6b7b7a25a13f66feffb1aa7214)
2021-08-04Merge SP1A.210803.001Scott Lobdell
Change-Id: Ia3abf30c22f1b40f53fb4ffba670c8015413b1c0
2021-07-27Merge SP1A.210723.002Scott Lobdell
Change-Id: Ia2488cb5d7919def03c366d3009fbf2ddc2e26c3
2021-07-23Merge SP1A.210715.002Scott Lobdell
Change-Id: Ia181a44eac8483258ec9c0ec84b3eb5f3c3b255d
2021-07-23Build updatable-bcp-packages.txt from prebuilts in sdk snapshotPaul Duffin
Previously, the java_import and java_sdk_library_import modules did not make their permitted_packages available to the rule that generates the updatable-bcp-packages.txt file. This change corrects that. Bug: 193095050 Test: m nothing - Added unit tests, which all failed and then fixed the tests. Merged-In: If0706e4551a331b48d383123088e63924dded48b Change-Id: If0706e4551a331b48d383123088e63924dded48b (cherry picked from commit 630b11e9d4d63e5fabaa20adf5d1b1c81ede6681)
2021-07-19Fix handling of "prebuilt_" prefix in classLoaderContextForUsesLibDeps.Jeongik Cha
Changes: - Cut off "prebuilt_" prefix from `dep`, not `libName`, because `dep` is used to replace library name in `usesLibraryProperties`, and these properties are specified without "prebuilt_" prefix. - Do not remove "prebuilt_" prefix on the return value of `ProvidesUsesLib()`: this boils down to `provides_uses_lib` property which is specified without the prefix. Bug: 193425964 Test: $ lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd $ adb wait-for-device && \ adb root && \ adb logcat | \ grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C1 # empty output, no errors (cherry-picked from aosp/1768131) Change-Id: I6cb65040027023d12ca0bc132d60c2c245174c40
2021-07-16Merge "Merge SP1A.210709.002" into s-keystone-qcom-devHaamed Gheibi
2021-07-15Propagate permitted packages to sdk snapshotPaul Duffin
Previously, permitted_packages were not copied to the sdk snapshot. This change corrects that. Bug: 193763688 Test: m nothing - Added unit tests, which all failed and then fixed the tests. Merged-In: I4560987f746f78c0ae706058195b6db4bea438aa Change-Id: I4560987f746f78c0ae706058195b6db4bea438aa (cherry picked from commit 869de147abdb2c86a91cced4fda7d27746c52af4)
2021-07-15dexpreopt.config should be created even though unbundled image is builtJeongik Cha
Bug: 188179858 Test: compare dexpreopt_config.zip files from 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip 2. m dexpreopt_config_zip (note that m clean should run between steps) Change-Id: I36a6e8b10b9922cc5522accaf90af1aa05049a86 (cherry picked from commit 4b073cd0835555597c2b05320f1b36f60adbf63a)
2021-07-15SdkLibraryImport's DexJarInstallPath uses installPath from source moduleJeongik Cha
Even though actual installed module path is the same as source module, it uses impl's one. Bug: 188179858 Bug: 193082464 Test: compare dexpreopt_config.zip files from 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip 2. m dexpreopt_config_zip (note that m clean should run between steps) Test: build aosp_cf_x86_64_phone, launch_cvd, and then adb wait-for-device \ && adb root \ && adb logcat \ | grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C 1 and then check if there is no message. Change-Id: I34ffd9a2d214a6614c2befc35b2beec003cfcd25 (cherry picked from commit d5fe8782e089ec1539a133f270aa62f5d3ead61a)
2021-07-15Port module_partition logic for RRO from Make to SoongSpandan Das
The default partition for RRO is "product/" in Make, but it was "system/" in Soong. This CL ports the logic from Make to Soong To implement this, a new function PathForModuleInPartitionInstall is created that enables callers to provide the relevant partition Bug: 158407753 Test: from build/soong, ran go test ./java Change-Id: I05b02eae7fe57189aaad5109c26cccc5823518ef (cherry picked from commit 5d1b929f216513fa2c6b96d7d157289019018086)
2021-07-12Merge SP1A.210709.002Haamed Gheibi
Change-Id: I875d10af6b1546ee1b90ad5880874f8ef01f7ed3
2021-07-12Merge "Do not allow duplicate deapexer dependencies." into sc-devMartin Stjernholm
2021-07-07Merge SP1A.210624.001Scott Lobdell
Change-Id: I8507f8b65c47a5b425464bbbc8d932a6ca359fd3
2021-07-06Generate boot images for host from prebuiltsPaul Duffin
Previously, when building from prebuilts boot no rules were created to produce the boot image files for the host, i.e. the OS on which the build was running. That caused problems with checkbuilds. No rules were produced as there was no host variant of a prebuilt apex to provide them. This change restructures the code to allow the prebuilt bootclasspath fragment to build the host variants of the files from the dex files provided by the prebuilt APEX. The generated files will not be the same as they would be if built from source as there is no boot image profile to use but it should be sufficient to satisfy the checkbuild target and allow for host side testing. Bug: 192575099 Test: m SOONG_CONFIG_art_module_source_build=false droid dist checkbuild Merged-In: I6af00f19bb71aa18dd462f5eac6aa38e3e721023 Change-Id: I6af00f19bb71aa18dd462f5eac6aa38e3e721023 (cherry picked from commit a56be7d7815ad164cdd854f8fc6b1cbc3bbf1918)
2021-07-06Switch boot image generation to use GetGlobalSoongConfig(ctx)Paul Duffin
Previously, boot image generation used GetCachedGlobalSoongConfig(ctx) in order to get access to the GlobalSoongConfig. That required that some other part of the code had called GetGlobalSoongConfig(ctx) to initialize the cached value. That was left over from when the boot image generation was done in a singleton which could not call GetGlobalSoongConfig(ctx) directly. That is no longer true. This change switches the uses of GetCachedGlobalSoongConfig(ctx) to GetGlobalSoongConfig(ctx) and removes the now unnecessary call to GetGlobalSoongConfig(ctx) from outside the functions. Bug: 192575099 Test: m nothing Merged-In: I34b7b1526d072d8b09fda7caa96e381695888e16 Change-Id: I34b7b1526d072d8b09fda7caa96e381695888e16 (cherry picked from commit 8fc51a8eb6ca20dbb4b65822123201568bb297f1)
2021-07-06Generate boot zip file from prebuilt_bootclasspath_fragmentPaul Duffin
Previously, the boot zip file, containing all the boot image files for all the supported architectures, was only created from source. It was not created when building from a prebuilt_bootclasspath_fragment. That lead to build failures when building from ART prebuilts. This change pulls the boot zip file creation out so that it can be done for both source and prebuilt bootclasspath_fragment modules as well as for the platform_bootclasspath module. Bug: 192575099 Test: m out/target/product/generic_arm64/boot.zip m SOONG_CONFIG_art_module_source_build=false out/target/product/generic_arm64/boot.zip - Compare the output of the first command from before the change with the output from them both after and confirm that when the ART prebuilts are up to date with the source that there are no differences. Merged-In: Ie7dd5e2ca4a865d06fd9ebf87320cf68c4d05bc3 Change-Id: Ie7dd5e2ca4a865d06fd9ebf87320cf68c4d05bc3 (cherry picked from commit 56afb27fb099cb79c1537c661628db1776f1fcc3)
2021-07-06Use both module name and stem name to filter updatable boot jarsPaul Duffin
Sometimes the stem property is set to change both the installed file name and the name use to filter the configured module list, e.g. when adding a test library to replace the standard library, e.g. test_foo instead of foo. Sometimes it is used just to change the installed file name. This change uses both to filter the updatable boot jars and not just the stem. Bug: 180105615 Test: m nothing Merged-In: I6c459fc3597b1e4f062bc9a4e52843305b538c5f Change-Id: I6c459fc3597b1e4f062bc9a4e52843305b538c5f (cherry picked from commit 56c93e899a355311463d41e988c9ba511af14278)
2021-07-05make system server modules use filtered lint databasePedro Loureiro
Bug: 188851704 Test: m Change-Id: Ie8f63286aeeb4cdbec5b9320c2ba41c8e37c7345
2021-07-02Revert "Allow partner NQNfcNci module to use legacy APIs"Bill Peckham
This reverts commit bc878d447b7039e17651b4dfeb493bed7201da93. Reason for revert: Issue resolved, so remove workaround. Bug: 168259330 Change-Id: Iabe292dc2c78249465f77409369dbf46e1b7900e
2021-07-02Do not allow duplicate deapexer dependencies.Martin Stjernholm
Without these errors, the last encountered deapexer would silently be used, and we wouldn't know if it was taken from the prebuilt APEX that actually get installed in the system image. With this error check there may be only one enabled prebuilt_apex or apex_set for each apex_name (which defaults to the module name). E.g. if there are both prebuilt com.android.foo and com.google.android.foo, it is necessary to disable one of them in the .bp file. Merged-In is set from https://r.android.com/1745454, a change that has gone into AOSP and internal master, as well as sc-dev-plus-aosp, but specifically not sc-dev. This change cannot merge into sc-dev-plus-aosp and others, because they may or may not have the com.google.android.art prebuilt APEX present depending on manifest, and with this check exactly one of com.android.art and com.google.android.art prebuilts has to be present and enabled. It'll be cherry-picked to AOSP along with a full fix for b/192006406, when it can be safely enabled everywhere. Test: m nothing SOONG_CONFIG_art_module_source_build=false Test: m nothing SOONG_CONFIG_art_module_source_build=true Test: m nothing with enabled:true for the com.android.art prebuilt APEX - check that it fails with an "ambiguous duplicate deapexer" error Bug: 192006406 Bug: 192542393 Change-Id: I44566fd26b12f82a8a67fe4a69e56303460756d0 Merged-In: Id2410b4e38a78ec2146a42298840954381a7c472
2021-07-01Retry: Make bootclasspath_fragments always perform hidden API processingPaul Duffin
Previously, bootclasspath_fragment modules would only perform hidden API processing if they provided some stub libraries and fragments. That was needed because the bootclasspath_fragment modules were added before Soong supported hidden API processing on all the different modules and before they all provided the necessary information that hidden API processing required. This change stops hidden API being conditional as it is no longer required as it has been enabled on all existing bootclasspath_fragment modules. Bug: 179354495 Test: m nothing Change-Id: Ibf81a7de63b888a3ebf445528326fa6101fdb1ba
2021-07-01Defer error reporting of missing prebuilt dex jar filesPaul Duffin
Unless the prebuilt dex jar files are explicitly required to build system images or dex preopting defer reporting of any missing dex boot jars from Soong to Ninja. This will prevent builds that contain prebuilt sdks, containing prebuilt bootclasspath_fragment modules but without a corresponding apex_set or prebuilt_apex module from failing even when it is not building against the prebuilt sdk. Bug: 179354495 Test: m nothing Merged-In: Ibde3bf840a7413785cd32bd6cea1c322f90c59af Change-Id: Ibde3bf840a7413785cd32bd6cea1c322f90c59af (cherry picked from commit ef083c9556c53738e5d7a3ab791c49ef00501f73)
2021-07-01Merge "Support using java_sdk_library components in stub_libs" into sc-devOrion Hodson
2021-07-01Merge "Revert "Make bootclasspath_fragments always perform hidden API ↵Paul Duffin
processing"" into sc-dev
2021-07-01Revert "Make bootclasspath_fragments always perform hidden API processing"Paul Duffin
This reverts commit 2b255d7f6b1e50bc92a12e0b8e757c0eda64b173. Reason for revert: build breakage http://b/192554546 Bug: 179354495 Change-Id: Id758af3f59bc83b02d8af4b1b83b3f279a208595
2021-07-01Merge "Make bootclasspath_fragments always perform hidden API processing" ↵Paul Duffin
into sc-dev
2021-07-01Merge ""module_current" and "system_server_current" should contain ART's ↵Orion Hodson
@SystemApi(MODULE_LIBRARIES)" into sc-dev
2021-07-01Support using java_sdk_library components in stub_libsPaul Duffin
Previously, if a bootclasspath_fragment had both a java_sdk_library module and one of its components in stub_libs properties they would be treated as separate modules instead of simply different APIs from the same module. That would result in them both providing stub dex jars to "hiddenapi list" which would fail because it found duplicate definitions of the same class. e.g. Specifying something like this: api: { stub_libs: [ "art.module.public.api", ], }, core_platform_api: { stub_libs: [ "art.module.public.api.stubs.module_lib", ], }, would cause "hiddenapi list" to fail because it would have been passed paths to two dex jars (actually the same dex jar but that does not matter) each of which defined the same class, e.g. java.lang.Object. This change treats the "art.module.public.api.stubs.module_lib" and "art.module.public.api" modules as being the same for the purposes of hidden API processing. (cherry picked from commit 3f0290ef7940c70a491dcbd4b57cabd8b2e753ef) Bug: 192446466 Test: m nothing Merged-In: I9de96337f64f26e24cff040d4bbed9eecc67b1ed Change-Id: I9e1cb82bea96022faaec98edc0c9ea7eac6204b0
2021-07-01Ensure that systemserverclasspath_fragment does not depend on prebuiltsPaul Duffin
Bug: 190037398 Test: m nothing Change-Id: I85671613c70bbfe8adde1d24d7f59ed7b53a8120
2021-07-01Make bootclasspath_fragments always perform hidden API processingPaul Duffin
Previously, bootclasspath_fragment modules would only perform hidden API processing if they provided some stub libraries and fragments. That was needed because the bootclasspath_fragment modules were added before Soong supported hidden API processing on all the different modules and before they all provided the necessary information that hidden API processing required. This change stops hidden API being conditional as it is no longer required as it has been enabled on all existing bootclasspath_fragment modules. Bug: 179354495 Test: m nothing Change-Id: I0cbf11986adff1f2f967b96f86e6bfe0e9b8b1ef
2021-07-01"module_current" and "system_server_current" should contain ART's ↵Victor Chang
@SystemApi(MODULE_LIBRARIES) Before this fix, compiling a java_library against sdk_version: "module_current" can't use the @SystemApi(MODULE_LIBRARIES) provided by the ART module because the system module "core-current-stubs-system-modules" contains only the public APIs. Use the new system module with module lib APIs. (cherry picked from commit b54f5aa3599196cfed8c32d3e52e1c35b51b8473) Bug: 183097033 Test: m droid Merged-In: I274e2710d1ff34e896aa620bfafb4481180c53b5 Change-Id: I374bc4899ef8f60344e37a94ad3cb8492f47fb4d
2021-06-28Calculate widest stub dex jars per modulePaul Duffin
Previously, the stub dex jars for each HiddenAPIScope was created by merging the stub dex jars provided by each module for that scope. Then the widest stub dex jars were chosen. So, if module A provided public, system and test stub dex jars and module B provided only public then the stub dex jars for each scope would be: * public -> A,B * system -> A * test -> A So, the widest API scope for which there are stub dex jars is "test" and so the widest stub dex jars would just come from module A and not module B. So, when "hiddenapi list" is run for module C which depends on modules A and B it only gets given stub dex jars for module A which means that it cannot resolve all the types that C may use which can lead to incorrect flags being generated. This change does not merge the stub dex jars from each module together and instead keeps them separate by module. The widest stub dex jars list is constructed by asking each module in turn for their widest stub dex jars. e.g. Given the above example we would have: Module A: * public * system * test <- widest Module B: * public <- widest So, the widest stub dex jars will be A's test and B's public stub dex jars. Bug: 179354495 Test: m out/soong/hiddenapi-flags.csv - make sure that this does not change the file. Merged-In: Ib137825ebffe94b2bf220732bae6077f7b7ac6db Change-Id: Ib137825ebffe94b2bf220732bae6077f7b7ac6db (cherry picked from commit 280a31aac39697a069f2f2f2ee471ffafb52d2a3)
2021-06-28Add test to show issues with widest stub dex jarsPaul Duffin
The widest stub dex jars should include the widest stub dex jars provided by each module. So, if module A has public, system and test and module B has only public then the widest stub dex jars should include module A's test and module B's public stub dex jars. Instead, they just include module A's test. That behaviour is needed so that when the "hiddenapi list" tool is run against a module C that it is passed stub dex jars from both module A and module B so that any references to the types provided by those APIs can be resolved. A follow up change will fix this issue. Bug: 179354495 Test: m nothing Merged-In: Ibd31964e8d2a33fa92fbd0b800c9fe054ee359c7 Change-Id: Ibd31964e8d2a33fa92fbd0b800c9fe054ee359c7 (cherry picked from commit d2b1e0ca92cb3f2c4b98efffd5968057af4e4320)
2021-06-28Allow hiddenapi list to ignore missing classes/membersPaul Duffin
When generating the stub-flags.csv for a bootclasspath_fragment the hiddenapi list tool is not given a complete set of all classes and members. This change causes it to ignore them by passing the new --fragment option to it. This does not risk changing the flags as the stub-flags.csv files created with the --fragment option are compared with the monolithic out/soong/hiddenapi/hiddenapi-stub-flags.txt file which is not run with this option to ensure that they match. Bug: 179354495 Test: m out/soong/hiddenapi-stub-flags.csv - make sure that this does not change the file. Merged-In: I890c7374c445759cade4d685f51e81261b7ccea2 Change-Id: I890c7374c445759cade4d685f51e81261b7ccea2 (cherry picked from commit 156b5d3b61848fc7d41c1e94f92e532ae5142d2e)
2021-06-28Merge "Use trimmed lint database for mainline modules" into sc-devMathew Inwood
2021-06-25Support hidden API processing for modules that use platform APIsPaul Duffin
Previously, hidden API processing could only be done by those bootclasspath_fragment modules that either did not depend on any other fragments (e.g. art-bootclasspath-fragment) or only depended on APIs provided by other fragments (e.g. i18n-bootclasspath-fragment). That meant that modules like com.android.os.statsd-bootclasspath-fragment that depended on APIs provided by parts of the platform which are not yet part of another bootclasspath_fragment could not perform hidden API processing. This change adds support for a bootclasspath_fragment to specify the additional stubs needed to perform hidden API processing. It adds a new additional_stubs property that can be used to specify the additional stub libraries. Most bootclasspath_fragments that need to use the property will need access to the APIs provided by the android-non-updatable.* libraries. Rather than have each fragment explicitly specify the correct module for each scope it treats "android-non-updatable" as if it was a java_sdk_library that can provide different jars for each scope. Soong will handle mapping that to the correct android-non-updatable.* module. Bug: 179354495 Test: m out/soong/hiddenapi/hiddenapi-flags.csv \ out/soong/hiddenapi/hiddenapi-index.csv \ out/soong/hiddenapi/hiddenapi-stub-flags.txt \ out/soong/hiddenapi/hiddenapi-unsupported.csv - make sure that this change does not change the contents. m TARGET_BUILD_APPS=Calendar nothing Merged-In: Ia8b79830ed0e6d42100de03d76b0c51b7f6c8ade Change-Id: Ia8b79830ed0e6d42100de03d76b0c51b7f6c8ade (cherry picked from commit 5cca7c44e51d0d08a5ea842d0f9870a772529dec)
2021-06-25Verify the modular stub flags are subsets of the monolithic stub flagsPaul Duffin
Bug: 179354495 Test: m out/soong/hiddenapi/hiddenapi-stub-flags.txt - check that an error is reported if a modular stub-flags.csv file, i.e. one created by a fragment is not a subset of the monolithic file, e.g. because a signature in the modular file has different flags than it does in the monolithic or is not present there. Merged-In: I46ebb495cb093a5e3abe7571c49933c845318549 Change-Id: I46ebb495cb093a5e3abe7571c49933c845318549 (cherry picked from commit 2e880971528cd4a2d93062072c7d8e9ff7998ade)
2021-06-25Make ruleToGenerateHiddenAPIStubFlagsFile build rulePaul Duffin
Previously, the func created a rule and returned it for the caller to create with the appropriate name and description. This change passes the name and description into the func and causes it to create the rule itself. The func is also renamed to make it more consistent with the other similar rules. Bug: 179354495 Test: m nothing Merged-In: I2a4455daa8a6090ed5568994b255848d063e1ab2 Change-Id: I2a4455daa8a6090ed5568994b255848d063e1ab2 (cherry picked from commit 4539a37a617ecfd5abc11697ed0d15370db6492b)
2021-06-25Merge "Add ModuleLibHiddenAPIScope for hidden API processing" into sc-devPaul Duffin
2021-06-25Merge "Add HiddenAPIScope to replace use of SdkKind" into sc-devPaul Duffin