The next CL will need a TestContext parameter in
ContentFromFileRuleForTests in order to retrieve the file rule contents
from the Config. Add it and update all the tests that use it in order
to simply review of the next CL.
Bug: 306029038
Test: go test ./...
Change-Id: Ia4b4c9854017ea3472fa2f8ba42cf7f72720496e
To generate module-info.json in Soong for b/309006256 Soong needs to
know the test data paths. Moving test data installation into Soong will
also help later for test suite packaging.
Add ModuleContext.InstallTestData that installs the files listed in a
[]DataPath alongside the test. The files will also be passed to Make
to allow it to continue packaging them into the test suites for now.
Update the module types that are producing LOCAL_TEST_DATA entries
in their Android.mk files to go through InstallTestData instead.
Bug: 311428265
Test: atest --host toybox-gtests --test-timeout=120000
Change-Id: Ia8b964f86e584ea464667fd86a48d754d118bead
These variables are no longer used. We don't build GKI in the platform
tree anymore. Remove these vars as we are not maintaining these.
Bug: 229701033
Test: presubmit
Change-Id: I7551aa37a049f3bc9252559a18feb0f6bdf0a548
All the necessary license data is already propagated through the license
metadata file, and the entries in Android-${TARGET_PRODUCT}.mk are not
used. Remove them, which should both reduce the size and parsing cost
of the Android-${TARGET_PRODUCT}.mk file and also removes a variable
that changes when dependencies are added or removed, which will
eventually allow running kati less often.
Bug: 309006256
Test: No change to out/Android-aosp_cf_x86_64_phone.ninja
Change-Id: Idfeb6fd10d77497ca274f8e74fe8e994ce1cafe6
Add a method to DataPath that converts it to the relative install path
in preparation for adding additional complexity to DataPath.
Bug: 311428265
Test: builds
Change-Id: I65b06238aafda2db72c6a253744a3087976451cd
Installed files should only depend on other installed files, change
the deps arguments of the ctx.Install* methods from Paths to
InstallPaths.
Bug: 311428265
Test: builds
Change-Id: I1ebef60a943bdbe907744cc43aa985371ac56d32
Merged-In: I1ebef60a943bdbe907744cc43aa985371ac56d32
This change modifies config.BuildFromTextStub() to return false when
deviceConfig.BuildFromSourceStub() is set to true.
This change resubmits https://r.android.com/2832580.
Test: m nothing
Bug: 311203379
Change-Id: I832364c3c42556e2b3aede2316e8927fd7163e91
Move EarlyModuleContext, BaseModuleContext and ModuleContext out of
module.go and into early_module_context, base_module_context and
module_context.go respectively.
Test: builds
Change-Id: I52e6eb1589d1478233c1c55d770b395a16eaa1a3
On top of the soong build flag --build-from-source-stub, the user can
configure build to generate stubs from source Java files by setting the
environment variable BUILD_FROM_SOURCE_STUB=true.
Test: m nothing
Bug: 310279899
Change-Id: I0c5247558455f09b8fc208d988aab3b60bf0ff16
Go 1.21 does a better job using the same empty allocation for empty
slices, check for cap > 0 before requiring slices to have different
backing arrays.
Bug: 309895579
Test: TestReverseSlice
Change-Id: Ic48e9cf2c95ea0b810a11cdc4a794a70c02a0a61
If a java_sdk_library is listed in `contents`, then restrict the source
vs prebuilt selection superseding to only the internal stub libraries.
Defer the source vs prebuilt selection mechanism of the top-level
library to the existing mechanisms for now. This is necessary because
this top-level library acts as a hook for
- hiddenapi: boot jars are deapxed from the prebuilt apex
- dexpreopt: system server jars are deapexed from the prebuilt apex and
installed via required
If `next` uses `framework-foo` and `service-foo` as the top-level
library instead of the prebuilt equivalents, then the bootjars installed
in out/soong/dexpreopt_x86_64/apex_bootjars will come from source. And
the *.odex files of the system server jars will come from source.
Bug: 308174768
Test: Added a java_sdk_library unit test to assert that the new
mechanism supersedes the `prefer` flag
Change-Id: Ib43198a3b547c58b54f1f0966e95584215096d32
This flattened singleton module explicitly lists by module name whether source or
prebuilt version of a module should be used. If a module appears in this
metadata module, it supersedes all other source vs prebuilts selection
mechanism
Implementation details
- Update the module dep chain from <source> --> <prebuilt> to <source>
--> <prebuilt> --> all_apex_contributions
- all_apex_contributions sets a provider which is bubbled up
to the source module. This requires changing `prebuilt_select` to a
bottom up mutator
- Update `usePrebuilt` to consult the new provider before falling back
to existing source vs selection mechanisms. If (foo|prebuilt_foo) is
listed in the selected `apex_contributions` modules, it
will be used superseding any other selection mechanisms.
- Update this depTag to IsMetaDepTag so that bootclasspath_fragment's
validation ignores this new dependency.
Test: Added unit tests to assert that this new mechanism supersedes
`use_source_config_var`
Bug: 308174768
Change-Id: I39a85639642711f3c96b6f18b94d626b55e80c66
This will be a container for the the apex_contributions
selected using build flags. This module will be used to query the state of
selected apex contributions instead of a global that can be mutated by
anyone.
It will set a provider containing metadata for source vs prebuilts
selection. To reduce the overhead of a new mutator, this will be done in
the existing `prebuilt_select` mutator.
It will validate that there are no dups (`foo` and `prebuilt_foo` cannot
be both selected)
Bug: 308174923
Test: go test ./android
Change-Id: Ie42999a71f35d70e0e977f5ab07ce451608d9f35
Revert submission 2775627-revert-2759049-framework-pdf-UAOVGTHHXO
Reason for revert: submit together with the fix to allow this new jar to coexist w/ mainline prebuilts
Reverted changes: /q/submissionid:2775627-revert-2759049-framework-pdf-UAOVGTHHXO
Change-Id: I877af450918647524d7e24371fb3343a8a2900dc
This change defaults Java stubs to be generated from API text files
during build. Using the `--build-from-source-stubs` flag, users can
toggle between the feature.
This change relands aosp/2617457.
Test: m nothing && verify ninja path exists between android_stubs_current and android_stubs_current.from-text, and does not exist between android_stubs_current.from-source, m nothing --build-from-source-stub && verify the opposite
Bug: 301522358
Change-Id: Ic129dafc3231e71470af982374739930947b69cb
This exports a map of build flags used in this release config to Soong.
Bug: 302514918
Test: manual
Change-Id: Id95c03e14cfbb91c0cb9c8c37a065b8387733317
Disabling hiddenapi check entirely can be dangerous and it might change the
accessibility of @hide Api too. We should only disable verify_overlaps
test which is required for module_sdk and apexes mismatch.
Test: atest CtsInlineMockingTestCases
Bug: 308187068
Bug: 307480026
Change-Id: I44f48e85d802b3a8f2711bc2047bdab721369f08
This module type does not any build actions, but provides metadata about
the contributions of the mainline module to other mainline modules/
platform. One immediate use case for this metadata is source vs
prebuilts selection
Each mainline module can have more than 1 metadata modules. Static build
flags will be used to select the right one in trunk.bzl, next.bzl, ...
Bug: 308174923
Test: go build ./android
Change-Id: I5ead0c38fe64b78de08db1736d97a8ab7374d6d9
filepath.Join("foo", "") returns a newly allocated copy of "foo",
while filepath.Join("foo") does not. Strip out any empty path
components before calling filepath.Join.
Test: TestValidatePath
Change-Id: Ib47dbcd9d6463809acfe260dfd9af87ea280b4de
Start a background goroutine at the beginning of soong_build that
captures the CPU usage, heap size, and total system memory every
second. Propagate the values through soong_build_metrics.pb back
to soong_ui, and then into build.trace.gz.
Test: m nothing, examine build.trace.gz
Change-Id: Iad99f8f1f088f4f7f7d5f76566a38c0c4f4d0daa
When aconfig (rust_binary) becomes a transitive dependency of swcodec, mixed build swcodec breaks because the cargo_build_script rust rule declares a directory which is not handled by mixed build yet. See b/307389608 for more context.
A follow-up CL will fix the issue and allow enabling swcodec in mixed build again.
Bug: 307389608
Test: Presubmit
Change-Id: I7ba7b5cd06b231f4867870fe8d0bd53299528fe3
This reverts commit 182b56b870.
Reason for revert: prime suspect for breaking boot tests b/307495247, b/307411752
Bug:307495247
Change-Id: Iea05703b767d2699ca3cf69377eb44b1d21697ad
Provides SdkTestCore/test_core_current sdk_version for non-updatable
modules that have their test scope dependent on test apis from
framework-minus-apex.
Ignore-AOSP-First: Change in topic with internal-first projects
Bug: 289776578
Test: m checkapi | go test ./java
Merged-In: Iba3213e8c34ea75ac9dd8532a95ef62fb5455e6c
Change-Id: Iba3213e8c34ea75ac9dd8532a95ef62fb5455e6c
This change defaults Java stubs to be generated from API text files
during build. Using the `--build-from-source-stubs` flag, users can
toggle between the feature.
Test: m nothing && verify ninja path exists between android_stubs_current and android_stubs_current.from-text, and does not exist between android_stubs_current.from-source, m nothing --build-from-source-stub && verify the opposite
Bug: 274805756
Change-Id: I28834f92c1b1311e3fe0a71a6ea9e8ec2e278d7e
productVariables.Build_from_test_stub is currently being set by the
config.buildFromTextStub value. However, this leads to divergence in the
behaviors between the exported BuildFromTextStub() value and the config
value, as the former depends on other factor (whether is it a coverage
build). This change fixes the divergence by making the product variable
value to be set by the former.
Test: m nothing
Bug: 301522358
Change-Id: Ic4de5a179dd1094eb8788663e4d6afa4bea724ea