'$' cannot be included in the genrule source file name as it is an
invalid character.
One workaround to include a file with '$' in the filename is to use
glob(*) and match pattern.
However, shell currently evaluates the '$' sign and leads to unexpected behavior.
This change fixes the issue by shell-escaping the filepath in generating
build actions.
Test: m
Bug: b/194980152
Change-Id: I6fd919c568b5b6526e4de5155104a08ecadab307
Some protobuf modules like perfetto_trace-full take a long time
to analyze with errorprone, in that case it took over 10 minutes.
Skip errorprone on protobuf or aidl-only modules because having
warnings on generated source code isn't useful anyways.
Bug: 242630963
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I5e73accd0b56a0a71e75927778c5c04a0d358e67
Per aosp/2183398, out/soong/soong.variables provide some useful information for debugging purpose.
This change enables copying out/soong/soong.variables to out/dist/soong_ui/soong/soong.variables in dist mode, similar to build.ninja.gz in the same directory.
Test confirmed that the content of the out/soong/soong.variables is
equal to that of out/dist/soong_ui/soong/soong.variables.
Test: m dist $target &&
diff out/soong/soong.variables out/dist/soong_ui/soong/soong.variables
Change-Id: I1bfa53a8e116c49fda2cc9a7252f4da0c59ce5b5
These Kotlin JARs contain class files under the META-INF directory that
are incorrectly parsed in gen_jarjar.py causing the Jarjar tool to error.
Bug: 243098369
Bug: 217750501
Test: build/bazel/ci/mixed_droid.sh
Change-Id: I62aaf086dc91d868a8d653f7fdb2c111bdc96097
This refactoring prepares for introduction of bazel prod mode, an
alternative mechanism for mixed builds allowlist handling.
* Decide bazel-mode as close to soong_build main as possible
* BazelContext itself decides whether a module is allowlisted
* Separate bp2build and mixed build allowlist
Test: m nothing, manually verified all modules are mixed build disabled
(via metrics)
Test: USE_BAZEL_ANALYSIS=1 m nothing, manually verified that mixed build
disabled/enabled modules are identical before and after change.
Change-Id: I0f55d8b85000cb4a871a099edc6d7d868d7df509
Use Target.Os and Target.HostCross as the key in FirstTarget so that
it returns a separate target for host and host cross architectures.
This is useful when host and host cross are both linux_musl, but
host cross is an independenct architecture like arm64.
Also filter the targets returned by ctx.MultiTargets() to match
the HostCross value of ctx.Target() to prevent the newly created
HostCross variants from colliding with Host variants in JNI or
test data attached to Java targets using a common arch.
This relands If75790001afe9d0f9d4d8166f207847851812297 with the
addition of the ctx.MultiTargets() filtering.
Bug: 236052820
Test: TestArchMutator
Change-Id: Ia6fe1185915d174d0ad6b401c227e0e57bee5c24
This reverts commit b90ff82772.
All the breakages are now fixed or mitigated.
Bug: 169004486
Change-Id: Ibec4b1f0a50c5ef6769bc6916a81721a4ce03c60
Test: presubmit
The `test_options.tags` attribute provides additional metadata to
customize test execution by downstream test runners. The tags have no
special meaning to Soong.
Bug: 240928948
Test: manually add `test_options.tags` attribute and run:
$ refreshmod && \
cat out/target/product/generic/module-info.json |\
grep <tags>
Change-Id: I35267f6608e48c6184e56530ef128d93b2f97522
Previously, the build releases only included named releases so did not
have a way to represent the latest build release. This adds the current
build release (named after the current API level) to represent that.
Bug: 240406019
Test: m nothing
Change-Id: Ib8336da716b447448b23bc9684ce3be1ab78648a
Previously, hidden API properties were only allowed on
bootclasspath_fragment and platform_bootclasspath module types. This
change allows them to be specified on java_sdk_library modules too. It
involves the following changes:
1. Add the properties to the java.Module.
2. Populate and provide a HiddenAPIPropertyInfo struct from
java_sdk_library modules.
3. Modify bootclasspath_fragment to merge information gathered from its
content libraries as if it was specified on the fragment itself.
Bug: 240406019
Test: m nothing
packages/modules/common/build/mainline_modules_sdks.sh
# Ran the previous command with and without this change to make
# sure that this change does not change the sdk snapshot
# contents.
Change-Id: I64eb71c2039ddc14cf380689d0cec7ec221f5b88
All usages of HiddenAPIFlagFileProperties use it as the type of a
Hidden_api field. This change pushes the field inside the struct and
just embeds the struct inside the structs that need it making it
simpler and more consistent with how the HiddenApiPackageProperties
struct is used.
This is extracted as a separate change as while the change is simple
it does affect a lot of lines. Keeping it separate makes it easier to
review the changes.
Bug: 240406019
Test: packages/modules/common/build/mainline_modules_sdks.sh
# Ran the previous command with and without this change to make
# sure that this change does not change the sdk snapshot
# contents.
Change-Id: I664453029574ef68dc5712f7bf137a1a6e78e864
In preparation for adding hidden API properties to individual
java_sdk_library modules this change refactors the handling of that
information.
1. Renames HiddenApiPackageProperties to HiddenAPIPackageProperties
to be consistent with other similar structs.
2. Creates a new HiddenAPIPropertyInfo struct to be used to provide
property derived information from one module to another. It includes
both flag files as well as the information about which packages are
used.
3. The HiddenAPIPropertyInfo is embedded within the existing
HiddenAPIFlagInput in place of the existing flag files field.
4. The fields in the HiddenAPIPropertyInfo struct are populated from
the HiddenAPI*Properties structs.
5. Access to package information is retrieved from the info struct
instead of directly from the properties. That means that no changes
will be needed to this code when info from other modules is merged
into the struct in a follow up change.
Bug: 240406019
Test: packages/modules/common/build/mainline_modules_sdks.sh
# Ran the previous command with and without this change to make
# sure that this change does not change the sdk snapshot
# contents.
Change-Id: I773279a4b621bcc3c40e3bfe193f2c7b0caeccd6
The first hack has been introduced to facilitate the creation of the
com.android.btservices apex without the need to upload 100+ cl close to
the release date.
We now want to delete com.android.bluetooth apex and replace all the
apex_available rules to target the new apex name
It will be way much easier to do this in separate CL and without forcing
us into a single topic.
Bug: 243054261
Test: Build
Change-Id: Ia03698db839db4684871eb38c088f88d6bdcba4b