Skip combining jars into turbine-combined, combined, and withres jars
and instead collect transitive jars to use in the classpath and to
produce the final dexed jar.
This reduces the size of a `m checkbuild` in git_main by 11%, from
1300 KiB to 1154 KiB. It may also improve caching and reduce uplink
network bandwidth when building with RBE, as now the classpath inputs
to rules are themselves outputs of previous rules and so already in
the RBE CAS.
The downside is that the classpath inputs to each rule are now much
longer, increasing the Soong ninja file size 11%, from 4.6 GiB to
5.1 GiB. This could be mitigated in the future by supporting something
like depsets in the generated ninja file to reduce duplication.
Bug: 308016794
Test: TestSimple, TestKotlin, TestClasspath
Flag: build.RELEASE_USE_TRANSITIVE_JARS_IN_CLASSPATH
Change-Id: I2b7b4261375494370da70f98597c8719f1d561cf
* changes:
ndk_library: limit exports
Reland "Truely re-export export_header_libs from ndk_library"
ndk_library depends on the correct arch variant of cc_library_headers
So that the build can't access extra information unintentionally.
Particuarly ANDROID_BUILD_TOP is dangerous.
In the future PATH should be locked down as well.
Bug: 307824623
Test: Added a all_genrules target and built that
Change-Id: I88bb0efb0a82529a1c85875a53cf20c8384d07fe
The NDK should stand alone, and the libbinder_ndk case
is created because libbinder_ndk in the NDK used to
contain extra C++ headers, but these were moved into
the SDK to be next to AIDL. Since many modules depend
on these headers, exports are only allowed for this case.
Bug: 357711733
Test: build with neverallow breaking, for instance:
error: frameworks/wilhelm/Android.bp:56:1: module "libOpenSLES.ndk" variant "android_x86_64_silvermont_sdk_shared_21": violates neverallow requirements. Not allowed:
module types: ["ndk_library"]
properties matching: "Export_header_libs" matches: .is-set
EXCEPT in dirs: ["frameworks/native/libs/binder/ndk/"]
Change-Id: I9a32d3cb7f644fb5dbc1e8072894f2f585b2cd6d
Pass the name of Soong's checkbuild target for each module to
Make so that it can depend on it from the main checkbuild rule.
This will give better control over which files get built, allowing
checkbuild to skip the jar combining step when transitive classpath
jars are enabled. The per-module checkbuild targets are passed to
make instead of added directly as a dependency of checkbuild in order
to maintain the existing behavior of only building modules exposed
to make in checkbuild.
Also tweak the existing calls to CheckbuildFile and add
InstallFileWithoutCheckbuild to match the files that are
in the Make-based checkbuild.
Bug: 308016794
Test: m checkbuild
Change-Id: Ic5140819381d58f4d00f23a7a12447950c4cf268
This change adds `overrides` property to all module types. It is used
to prevent another module (or modules) from being installed or packaged.
Bug: 330141242
Test: go test ./...
Change-Id: I4f05c603f0c5dbb699d00327882c7498472b59de
At ToT, platform variants of modules are hidden from make, unless the module
has `//apex_available:platform` in its Android.bp file. However, there
are special cases which always require the platform variant to be
visible to make - e.g. bootstrap bionic libraries.
`markPlatformAvailability` handles these special cases. This CL updates
the subsequent apexTransitionMutator to hide the platform variant when
module.NotAvailableForPlatform is true in addition to the existing
module type specific `AvailableFor` check
Test: no diff in file_list.txt
Bug: 281077552
Change-Id: Ie9d7341e206276ff96d3d64fec21b8f5dcfd6ceb
These internal only violations are non-vendor. Without these allowlist
entries, branches without vendor will emit container violation errors
given that the internal allowlist is included in vendor/google/release
project.
Ignore-AOSP-First: Intended internal only change
Test: m nothing
Bug: 338660802
Change-Id: I417880c1689390ebdc9caabef705bce739bb0baf
The module is implicitly added as a dependency for all
java_aconfig_library modules, but does not generate the stubs.
Test: CI
Bug: 338660802
Change-Id: I6ef0f5f5f445e6f70debc3f79e3fd81ed2331366
This change introduces a method to detect violating inter-container
dependencies between modules. The method is run in
`ModuleBase.GenerateBuildActions`, after the container info provider is
set. Given that the provider of the direct dependencies would have been
set at this time, the method utilizes this information to determine
the violations, which are introduced in https://r.android.com/3141104.
Note that this enforcement does not turn all inter-container
dependencies as errors. Instead, it will only turn dependencies that
matches the pre-defined violations into errors. Even if the dependency
matches the violation, an error will not be thrown if the dependency
satisfies any of the exception functions (e.g. the dependent module is
stubs, or the two modules belong to the same apexes).
Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: Ib9ddc0761fa46f1309b1a1a4f759d9a4e04fd70e
Currently modules-info.json misses modules from vintf_fragment_modules
because it was not handled from Soong. This change adds
vintf_fragment_modules as part of required modules of modules-info.json
so it can be handled from any other logic handles build information with
the json file.
Bug: 322089980
Test: An artifact depends on the modules-info.json handles
vintf_fragments modules properly.
Change-Id: I09a61b2ed201099a9d3b05dbed061d0366bb9255
These entries are proprietary, which are defined in vendor/google/build
in git_main, but vendor projects do not exist in
aosp-main-future-without-vendor branch. This change adds entries that
are supposed to be included in the future aosp release.
Ignore-AOSP-First: Intended aosp-main-future only change
Test: m nothing
Bug: 338660802
Change-Id: If48f56757e069a467a8ae0466820f27f97b011a8