`min_sdk_version` is used to represent the api_level of the device and
its type will eventually become android.ApiLevel. OTOH,
`sdk_version` property represents the API surface a module builds against
_and_ the version of that API surface. For
R8/D8, the additional `--android-platform-build` should be determined
using the sdk_version of the soong module and not min_sdk_version, since
min_sdk_version will not contain information about the api surface used
for compilation.
The unit test for `core_platform_app` in TestR8 were passing since
min_sdk_version was not set, and therefore it implicitly defaulted to
sdk_version.
Also created a custom struct to propagate params to the helper dex
functions
Test: In build/soong, go test ./java
Test: TH
Bug: 208456999
Change-Id: I08ac6f496444d603557e498c8a1794af665abc7a
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.
Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.
Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I50d4ad139322e9e207202f1e1a50f5bbb424aa6f
- The converter runs for api_bp2build, not bp2build workspace
- Since droidstubs is an internal module created by java_sdk_library,
the conversion encompasses the latter as well
- Since droidstubs do not have an api_surface attribute, this conversion
uses naming convention to infer the api_surface represented by the api
file e.g. *stubs.source -> publicapi, *stubs.source.system -> systemapi)
- Also adds an SdkIntraCore enum to represent the API surface provided
by one core module to another
There is also ongoing work to check in java_api_contribution modules in
Soong. Once we have that, we can update this converter to operate on
that module type instead
Test: go test ./bp2build
Change-Id: Ia85828e04c738d9ffcc524856d7c3034ee29bbf9
Currently, stubs are compiled with Java version 1.8.
To align with this, set the java version passed to javac invocation as
1.8 for java_api_library module. Helper function is used to sync the
java version of droiddoc module and java_api_library module.
Test: m
Change-Id: I103b94aed9747a2f2dd65d13de0ae9c0f33db5c0
android_library modules are only dexpreopted when built into an app,
and the app will already get the dexpreopt compat dependencies itself.
Adding the compat dependencies to android_library modules causes
circular dependencies when the android_library is used to build
part of the framework, which is then used to build the compat libraries,
which is added as a dependency to the andorid_library.
Test: TestUsesLibraries
Change-Id: I3aca780858c7e5f19d270bcbbe18e6cff8616b43
This reverts commit 8ec823cba1.
Reason for revert: DroidMonitor: Potential culprit for Bug b/262965953 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I236cc36981d8b30527ca286632727f8ca267e969
Ensure proguard flag files specified by java_library targets propagate
to downstream targets. This matches bazel behavior, as well as
behavior for transitive android_library deps.
Bug: 212623640
Test: m + presubmit
Change-Id: I61abaf1fd43d6f06bb610383751bb26e9a1bafd6
Add AndroidMkEmitAssignList to emit a line to assign the items from
the given list of string arrays.
Test: treehugger
Change-Id: Id5acbef38ea4e91349bd2461f226db352d4b8123
Add a test that verifies that that missing certificate path inserted
when AllowMissingDependencies is set uses a well formed extension
that won't trip up sign_target_files_apks.
Fixes: 259861670
Test: TestCertificates
Change-Id: I00656809698aed5f9d3aaadaecda9848d2882223
AndroidGlobalLintChecker.jar provides a set of lint checks
that should be run across the entire tree.
Bug: 236558918
Test: manually tested, treehugger
Change-Id: I2a868f1d78c969eefa2c29477fc8ecab1043df39
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.
Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.
Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I75f7eb002c8325ce7cdc76e12e76e16195320620
java_api_contribution is useful to java_api_library when the api files
are not colocated.
If they are colocated (e.g. in Multi-tree assembled api_surfaces
directory), it is useful to refer to them directly without nedding to
create a java_api_contribution module.
Test: In build/soong, go test ./java
Change-Id: I5b4e557068a1e5c71a80c76452030e72ec83a696
Mark Robolectric tests as belonging to the `robolectric-tests` suite
since tools expect test modules to belong to at least one suite.
Note that tests not marked with a suite implicitly get annotated with
the `null-suite`.
This is also required for Atest Bazel mode which only includes files of
test modules with a non-empty suite attribute in the Tradefed test
directory.
See aosp/2181295 for more details.
Test: m out/target/product/vsoc_x86_64/module-info.json
Bug: 222437352
Bug: 228799625
Change-Id: I9dedaf1661a351c32d2affbaf1f9b89d672acc3a
The first line of each section will be
```
include $(CLEAR_VARS) # <module type>
...
```
Bug: 257037252
Test: treehugger
Change-Id: Iba586155b682fe4e1e5817d8397eda8f9d9c8789
Context
- Create phony rule for java_api_library module with its artifact
(*.jar) as dependency
- Fix source directory base mislinkage issue for input text files passed
from java_api_contributions modules
Test: m
Change-Id: I055332fd5bc7ef0d03e7b311b0efa93f4454102f
This leads to an arm64 apex being used on a device that is mixed
x86_64 with nativebridge=arm64. A device like that doesn't appear
to work with arm64 binaries. For example, the boringssl-self-check
binary crashes on boot.
Bug: 260115309
Test: unit test
Test: boot emulator with this combination
Change-Id: Ic4a91974290a05b1799f755fcf52ef226d68f4c2
This change stops the build system from dexpreopting system server jars
for the secondary arch. System server jars are only loaded by the system
server, so the artifacts for the the secondary arch are not used.
Bug: 260577273
Test: Build a system image and no longer see artifacts for the
secondary arch.
Change-Id: I0b131a02e996ed50e7aec3bb0a221f8ceed9ce57
The min_sdk_version was added to the java_import in Tiramisu. This
change will propagate the min_sdk_version set on a java_library to the
java_import snapshot. If possible the min_sdk_version will be resolved
into a numerical version to ensure consistent behavior across build
releases.
Bug: 260560424
Test: m nothing
BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh
# Ran above before and after this change and made sure that only
# Tiramisu, UpsideDownCake and latest were changed and those changes
# were the addition of a min_sdk_version property.
#
# Ran the following command in tm-mainline-prod:
# lunch cf_x86_64_phone-userdebug
# m ART_MODULE_BUILD_FROM_SOURCE=false nothing`.
#
# It failed with:
# module "prebuilt_okhttp-norepackage" variant "android_common": should support min_sdk_version(33) for "AdServicesApk": min_sdk_version is not specified.
#
# Unpacked the Tiramisu art snapshot generated with this change into
# tm-mainline-prod and reran the previous command and it succeeded.
Change-Id: I9d9d730845554fc175d17f38c038e4e3c7d39e07
JavaDoc's implementation of `aidlFlags` omits `min_sdk_version`, and
therefore aidl compiler would default it to a default version.
To fix this, pass the min_sdk_version explicitly
Bug: 253122520
Test: TH
Test: go test ./java
Change-Id: Ia8f639174f8361136596d0e7b3286606f84705cd
In some cases the java_sdk_library needs to compile against hidden
platform APIs, in order to do so it needs to add impl_only_libs
dependency on the framework library, and set the sdk_version property to
the "core_*" one (e.g. core_platform).
However, if this java_sdk_library depends on the Android SDK in it's
stable API surface, then the setup above will break the stubs srcs
generation, as it uses the sdk_version of the java_sdk_library (e.g.
core_platform), which doesn't have symbols from the Android SDK.
This chage solves the problem by propagating the stub_only_libs to the
invocation that generates the stub sources. It allows the
java_sdk_libraries to add a stub_only_libs dependency on the
android_module_lib_stubs_current stubs library to fix their stubs build.
For more context see another change in this topic:
https://android-review.git.corp.google.com/c/platform/packages/modules/Virtualization/+/2310569
Bug: 243512044
Test: builds
Test: m nothing
Change-Id: Id745cfb2789901672561050c1c3f8bb163922379