Add support for installing extra files from a zip file when installing
a primary file, and use it to support installing android_app_set modules,
which install a primary APK and then an unknown set of additional splits
APKs.
Test: app_set_test.go
Test: install test android_app_set
Bug: 204136549
Change-Id: Ia92f7e5c427adcef3bcf59c82a2f83450905c01d
Extract and install the primary apk normally, and then unzip the rest
of them as a post install command.
Bug: 204136549
Test: app_set_test.go
Change-Id: I17437ff27f49df6bc91bdbbea6173b46c7d3ec4e
The updated error message is more descriptive about the incompatibility
between platform_apis and sdk_version. Implemented as per the discussion
in b/204447559#17
Test: In build/soong, run go test ./java
Bug: 204447559
Change-Id: I826f0ce47313b337f1754a1b6bc11ce65c837a41
Native coverage builds create a second variant of APKs and set
PreventInstall on the non-coverage variant. Skip calling
ctx.InstallFile for APKs and in dexpreopt when PreventInstall
is set.
Fixes: 205865567
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*" NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device external/compiler-rt external/clang external/llvm external/swiftshader/third_party/llvm-10.0"
Change-Id: I9e38ac737315db12475e8f9bfb3e0e7c0327fc06
The art tests rely on a dependency existing from
out/host/linux-x86/framework/core-oj-hostdex.jar to
out/host/common/obj/JAVA_LIBRARIES/core-oj-hostdex_intermediates/classes.jar,
override LOCAL_SOONG_INSTALLED_MODULE for the hostdex modules so that
soong_java_prebuilt.mk adds the dependency.
Test: art/tools/buildbot-build.sh --host && art/tools/run-libcore-tests.sh '--mode=host' '--variant=X64' --debug
Change-Id: I9412147fc66d5e5f0dae52d522868a37251f781e
* changes:
Revert "Temporarily add method to get java binary tool"
Move java module installation into Soong
Fix ctx.InstallFile calls for java modules
Make HostJavaToolPath use pathForInstall
cc/java modules can have .aidl files as srcs. Pass min_sdk_version to
the aidl compiler so that it can check some features against it.
For example, ParcelableHolder AIDL type is available since 31.
Bug: 205338951
Test: soong test && m
Change-Id: I7ecab913e00c9b6a3ce870dacbe9773d2ddb7e93
Java binaries and cc binaries are in the same directory again, the
separate method can be removed.
Bug: 204136549
Test: m checkbuild
Change-Id: I2e7ca82448aba5c7e54d3c3c376fe14a953ef4af
Move java module installation rules into Soong by overriding
InstallBypassMake. Update the locations that find host java tools
to look in the Make installation directory instead of the Soong
installation directory, which will no longer be used.
Bug: 204136549
Test: m checkbuild
Change-Id: I5af6d764c97e7ddb5ee121fc9830166c25d831b1
Call ctx.InstallFile on the primary install file last so that the
primary install file can depend on the extra install files, and so that
the primary install file can be inferred from the last installed file.
Add missing ctx.InstallFile calls for the dexpreopt and hostdex outputs.
Fix the install subdirectory for modules installing to the testcases
directory.
Bug: 204136549
Test: m checkbuild
Change-Id: I7edd7647be27439d3ca0ecc589ca5e89d4ba8474
Use pathForInstall instead of PathForOutput for HostJavaToolPath
so that it internally produces an InstallPath that can later support
being converted to Make installpath.
Bug: 204136549
Test: m checkbuild
Change-Id: If4f5d3552b27ffe6b9bc709c4a08d9513c49ef7d
Abandon the use of SOONG_COLLECT_CC_DEPS and SOONG_COLLECT_JAVA_DEPS,
soong can generate module_bp_cc_deps.json and module_bp_java_deps.json
without passing any variables.
BUG: 204397180
Test: rm out/soong/module_bp*json
"m nothing" should see both json files were generated.
Change-Id: If30ad5dbabb6709f834134cbc9a513a9bdc9d9de
cc binaries are moving from out/soong/host/linux-x86/bin to
out/host/linux-86/bin first, to be followed by java binaries.
Temporarily add a method that gets the java binary path while
it is different from the cc binary path.
Bug: 204136549
Test: m checkbuild
Change-Id: I04a7e741436da6be68078f23d074870413a5bb5e
We're not sure what formatting is applied to this but it sure
isn't markdown.
Fixes: 204572072
Test: Build and compare docs
Change-Id: Ib023f0cb490a7c7c5605d426ce5e70a7130d5162
Previously, the selection of system modules was duplicated, once for
source and once for prebuilts. This change dedups that by switching the
source code to use the same mechanism as the prebuilts which will ensure
consistent behavior in future.
Bug: 204189791
Test: m nothing
Change-Id: Ia1729017ae332181c95f7b205dab87fb47d43fb8
Renames to core-public-stubs-system-modules so that it is of the format
core-<sdk-kind>-stubs-system-modules.
Bug: 204189791
Test: m nothing
Change-Id: Iac565c940c2ef92be9cc64c0c6b8102a26afe0dd
Initially prebuilt stub sources only supported directories as input, but
support has been added for packaging them up in srcjar as well. However
the build action was not updated accordingly.
Add support to determine if our input is a srcjar, and if so just use
it directly.
Bug: 204978699
Test: m sdk (with prebuilts)
Change-Id: I302cd34ebd55414d35c4f936cd563a4af89b22c6
When building from source the build uses the java system modules for
the public or module APIs as needed. However, previously when building
from prebuilts it would always use the public API. That difference lead
to build failures when building from prebuilts.
This change makes the selection of java system modules when building
from prebuilts consistent with the selection when building from
sources.
As API levels 30 and 31 (which are the only previous releases to
provide system modules) did not provide separate java system modules
for the module-lib API those levels always use the public APIs.
Bug: 204189791
Test: - before applying these change
m TARGET_BUILD_APPS=framework-connectivity
- build fails with compilation error due to missing module APIs
m sdk dist
cp out/dist/system-modules/module-lib/core-for-system-modules.jar prebuilts/sdk/current/module-lib/core-for-system-modules.jar
- apply these changes
m TARGET_BUILD_APPS=framework-connectivity
- build passes as expected
Change-Id: Id113ff014e7892b1009fbcaad89b1ae23a7c3b79
Previously, system modules were only created for the public API scope.
This change creates them for any API scope as long as its directory has
a core-for-system-modules.jar.
It does that by hooking into the existing logic for creating a
java_import for all jars in the API directories and creating a
java_system_modules for every core-for-system-modules.jar file. That
avoids the need for extra path globs.
Test: m droid
m sdk_public_current_system_modules
- works as expected.
m sdk_module-lib_current_system_modules
- fails with missing target as expected.
touch prebuilts/sdk/current/module-lib/core-for-system-modules.jar
m sdk_module-lib_current_system_modules
- fails with invalid jar file as expected.
Bug: 204189791
Change-Id: I27a264941009e03439d5d847dab14a7b4f6f119f
Previously, the fixture preparer for prebuilt_apis would add a
core-for-system-modules.jar file in every API directory even though
currently they only exist in the public API directories.
This change makes the test environment more realistic by only creating
them for the public API. Rather than hard code that into the test code
(which would duplicate the hard coding in the decodeSdkDep func) this
extracts a function that is used by both. That ensures that any changes
to that func will be reflected in both the test and runtime behavior.
Bug: 204189791
Test: m nothing
Change-Id: I346ac9c0dcf407c61de16b6027663a05821bcf62
Previously, there were no tests for this (outside uses in other tests).
This change adds a test that uses the fixture preparers that create a
prebuilt_api in order to make prebuilt APIs available. That ensures
that both the prebuilt_api is working as expected and the preparer
creates a realistic test environment.
Bug: 204189791
Test: m nothing
Change-Id: I57352aa00f7b268e5286be92f177764dd63ba7e8
Previously, the dist only contained a core-for-system-modules.jar for
the public API. This change adds API specific directories containing a
core-for-system-modules.jar file for each of the following APIs:
* public
* module-lib
Bug: 204189791
Test: rm -fr out/dist
m sdk dist
find out/dist -name core-for-system-modules.jar
- outputted the following:
out/dist/core-for-system-modules.jar
out/dist/system-modules/module-lib/core-for-system-modules.jar
out/dist/system-modules/public/core-for-system-modules.jar
Change-Id: Id1845926e2085f70d58e9fc22e9c11cb3d62b919
Previously Soong's install rules have been disabled when embedded
in Make (ctx.Config().KatiEnabled() == true). The primary blocker
for moving installation into Soong has been the `required` proeprty,
which is too vague to be easily handled in Soong. Keeping
installation in Make has resulted in two host bin directories,
the Make-owned directory (e.g. out/host/linux-x86/bin), and the
Soong-owned directory (e.g. out/soong/host/linux-x86/bin). The
lack of knowledge in Soong about the final, Make-owned installation
location makes it hard to support NOTICE files entirely in Soong.
This patch begins to solve this problem by supporting the creation of
the installation rules into Soong, but rather than writing the rules
to the ninja file it writes them to a Makefile and lets Kati convert
them to ninja. This allows Kati to inject extra dependencies to
handle the `required` property.
Converting all modules to create their installation rules in Soong
would be too complex, so only modules that return true from
InstallBypassMake will use the Soong installation rules. This
is currently only set for robolectric tests.
Bug: 204136549
Test: m checkbuild
Change-Id: I28af9fa7fadece8ea1f98f5efd140c823751cae7
* changes:
Use toModule for all "standard" API surfaces
Run TestClasspath test cases with Always_use_prebuilt_sdks=true/false
Refactor TestClasspath to simplify follow up change
Add tests for prebuilts of all API surfaces
For the purposes of this change a standard API surface is one of the
following:
* public
* system
* test
* module-lib
* system-server
Test: m droid
Bug: 204189791
Change-Id: I88ee9709430ca455dd6c7d1523ae22f8c22b0b7e
Previously, the TestClasspath test cases were only run with the default
setting of Always_use_prebuilt_sdks=false. That meant that some of the
code under test that depended on the setting of that variable was not
tested properly.
This change runs the test cases m with Always_use_prebuilt_sdks=true as
well. Those test cases whose behavior depends on the setting of that
variable are split into two separate test cases, each of which only
runs with the appropriate setting of that variable. All other test
cases are run for both settings of the variable.
That revealed a slight issue with the test setup (a missing
prebuilts/sdk/public/core/android.jar file) which broke the
core_current test when run with Always_use_prebuilt_sdks=true which has
also been fixed.
Bug: 204189791
Test: m nothing
Change-Id: If2ea3fde40c7573262e93691af0b5a57e4d54469
Extracts classpathTestCase and extracts the logic for creating the test
into a separate testClasspathTestCases func.
Bug: 204189791
Test: m nothing
Change-Id: I657fbcde23a18f7f5651c174fbf17a9b7b7f1a9a
Previously, the tests only covered checking the sdk dependencies added
when using a prebuilt current (public) and system SDKs, i.e. with
sdk_version set to "current_30" or "system_30". This change adds tests
to cover other APIs, e.g. "test_30", "module_30" and
"system_server_30". It adds tests for "module" and "system-server" up
to API level 32 as following changes will give them different behavior
as API levels less than or equal to 31 do not have a separate
core-for-system-modules.jar file for the module-lib API.
Bug: 204189791
Test: m nothing
Change-Id: I585a88615439a24abf75250114a86113b5f5da57
This change adds a Soong module that stores the paths to the compilation
artifacts of system server jars in a variable, which will then be
consumed by Make to check if the artifacts are installed. When the check
fails, it means that dexpreopting is not working for some system server
jars and needs to be fixed.
Bug: 201371822
Test: m nothing
Test: manual -
1. Add "service-permission" to DEXPREOPT_DISABLED_MODULES (https://cs.android.com/android/platform/superproject/+/master:build/make/core/product_config.mk?q=DEXPREOPT_DISABLED_MODULES)
2. m nothing
3. See the error:
Missing compilation artifacts. Dexpreopting is not working for some system server jars
Offending entries:
system/framework/oat/x86_64/apex@com.android.permission@javalib@service-permission.jar@classes.odex
system/framework/oat/x86_64/apex@com.android.permission@javalib@service-permission.jar@classes.vdex
Change-Id: I4816f19668f1dae180a34adafdbfa448c97aa0db
For testing purpose, we need to add java libraries to bootclasspath and
systemserverclasspath that are not present in PRODUCT_APEX_BOOT_JARS and
PRODUCT_APEX_SYSTEM_SERVER_JARS.
Currently, we can't unconditionally add all the contents to the config
for test APEXs. Until a formal way is introduced, hardcoding the
artifact in the build system like how it's done for
test_framework-sdkextensions.
Bug: 187444679
Test: atest ApexTestCases
Test: atest StagedInstallInternalTest
Change-Id: I1f7b01a57bc9c46163e025de2ab00e671a42b202
- car-frameworks-service-module is added from com.android.car.framework
apex which only exisits in car products.
Bug: 203233647
Bug: 203201931
Test: build, bootup
Change-Id: I5f13b0505c1ac4fd2fd7b6559e080c8a6fb526e0
Merged-In: I5f13b0505c1ac4fd2fd7b6559e080c8a6fb526e0
(cherry picked from commit 6e3ba9ac3b)
`m platformprotos` with a long OUT_DIR can trigger E2BIG errors in
posixspawn, reduce the commands per shard.
Test: OUT_DIR=$PWD/really-long-out-directory m platformprotos
Change-Id: Ifa4594eac7ba0e1091df0ef75e4dfc3ff366939b