Change https://r.android.com/1959021 introduced a regression in the
handling of the `targetSdkVersion` when using the API fingerprint.
Prior to that change, when `UseApiFingerprint(ctx)` returned true that
would cause all APKs (apart from `framework-res`) that were built to
use a `targetSdkVersion` that included the API fingerprint SHA. After
that change the `UseApiFingerprint(ctx)` had no effect on the setting
of `targetSdkVersion`.
This change corrects that.
Bug: 266899206
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true TARGET_BUILD_APPS="NetworkStack" m
aapt2 dump badging out/target/product/generic/system/priv-app/NetworkStack/NetworkStack.apk
# Run above before and after this change and see that the targetSdkVersion
# has changed to `UpsideDownCake.<SHA>`.
Change-Id: Ic6e1da552c565cc4bd75cc734b3acb7faec67981
These include
- Drop the synonym sentence. With the enforcement introduced in
aosp/2153678, they can no longer be used interchangeably
- Add information that a single .map.txt file cannot contain both these
two annotations.
- Link a bug that provides additional context on why this granularity
is necessary.
Test: N/A
Bug: 266824291
Change-Id: I31b49d492ec56f2f6f0b88de6e608e4ec6fe7011
This classpath includes compile-time-only jars that may conflict with program/library jars referenced by R8 and used by the target.
Test: go test ./java
Test: m && inspect output for r8 warnings
Bug: 242088131
Change-Id: Id4db3c9482e78cdcc0c9d37b9a77eaf94ac95cb3
Instead, move them to R8Wrapper. Having all of these R8-specific flags
in a single location, bundled within the R8 repo, is easier to maintain.
This should be a no-op for generated code.
Test: m + validate identical dex output
Change-Id: Ibdeecef8ca5d311d353dd623c73fab608ccd2681
It makes sense to make min_sdk overridable because the override_apex is
a variant of the original apex, and this variant might be
created/introduced in the newer Android release compared with the base
apex. Despite the fact that the source of the variant apex is the same
as the original one, the variant may not support the older version, like
Go modules, trimmed modules. If we consider the variant as a "new"
module, then it makes sense to have a new min_sdk to make it only
available for the newer Android released version only.
Bug: 266945903
Test: Build locally, and check if the override works
Change-Id: I7f4c7169e15b7e57f44a4abafe012151dbc226a0
API export currently uses a naming convention to determine the api
surface of a droidstubs module. Add platform.api to this naming
convetion for CorePlatformApi surface
Test: N/A
Bug: 262014796
Change-Id: I1255e7e54d4a1dfb9e040184b90d6e8b7146c028
This fixes two main sources of nondeterminism:
1. Fix a bug in the ConfigurationAxis comparator (which caused
ConfigurationAxis sorting to be nondeterministic)
2. Process C++ dependencies using the sorted ConfigurationAxis order. In
theory, the order in which dependencies are processed shouldn't
matter (as they should end up in different select stanzas). However,
in the case of InApex stubs, this is not the case; we now ensure
that lists are concatenated in a predictable order.
Added bonus: Some cleanup with SortConfigurationAxes which
makes use of go generics (this made it easier to debug this issue).
Will follow-up with regression tests.
Test: Manually verified that build.ninja checksum and BUILD.bazel checksums do not change after running `m nothing` 6 times in AOSP (with comment-only Android.bp changes in between each run)
Change-Id: I81168e45bdbbcd61ea95ff665cf6c4bc180aa4e0
Instead of using a sentinel file that was created under bazel_workspace
prune them out. The sentinel file was being created under bazel_workspace,
which would be deleted and thus rendered useless from the perspective of
not retriggering a build.
Test: `touch Android.bp` then `NINJA_ARGS="-d explain" m --bazel-mode-staging adbd_test`
Bug: 265155778
Change-Id: If5d8f0ea7f3b8828fda0646faafd1a621f0cb27c
This signifigantly improves the startup time of soong-built
python binaries. For example, running
`m apexer && time out/host/linux-x86/bin/apexer` gives
0.734s before this cl, and 0.094s after.
Fixes: 259718110
Test: Presubmits
Change-Id: Ib19e83e2c60c39a849525be117279c318de3afa7
Disable VNDK apexes when their version is below the minimum
supported API level for the primary architecture.
Test: TestVndkApexCurrent
Change-Id: Ie72a5beb9da432660d3fec5c520402224326f961
While this does increase dex size for optimized targets by limiting the
scope of class merging, it also
1) improves actionability of unretraced stack frames
2) improves accountability for size increases
3) tends to decrease compiled code sizes for impacted targets
4) marginally (~1%) decreases RSS
Improvements in tooling should mitigate (1) and (2), and more targeted
use of @NeverInline can mitigate (3). Until such time, the pros seem to
outweigh the cons, so we enable the policy as a temporary measure.
Bug: 264916934
Test: m
Change-Id: Id63a17955692b75b16c42d9c85b55bae409c0da4
This piggybacks onto the ApexInfo cquery handler, so we're issuing a
single bazel query call that reads two providers in the starlark expr.
Also rename requiredDeps to makeModulesToInstall to differentiate it from
APEX's required/provided libs in the apex manifest.
Test: unit test
Test: mkdiff
Fixes: 263123189
Change-Id: Ib7e43f1586f29864eee8627dba3631bfaff27afa
This reverts commit eb8cd3122a.
Reason for revert: mainline module jacoco jar do not contain JAVA_LIBRARIES needed for coverage, see: b/266679012
Change-Id: If756f7aaf40c6bcfed170c59c494bcc426620039