This reverts commit eaa475107d.
Reason for revert: This cl broke AOSP build, read more b/333846153
Change-Id: I5538a3c78617d7c2db98a11b60cb61269dcec8d3
This includes
1. the prebuilt javac binary
2. the input .java files
3. the jars that are placed on the classpath during javac
(2) is passed via ${out}.rsp. This rsp file gets populated with the
input java files
For (3), this CL creates a new intermediate file whose content is
comma separated jars available on the classpath (this is the format
expected by rewrapper). This file is then registered in RSPFiles of
javacRE command, so that it gets passed to the rewrapper cmd as
`--input_list_paths`
(rspfiles are necesary for modules like framework-minus-apex to avoid
exceeding cmd line limits)
Bug: 308687455
Test: m framework-minus-apex; # verified that the relevant files are
added as `--inputs` of javac
Change-Id: I2ab9277fc394eb00454ef503c78a9f3451e596ac
There was infrastructure to export ninja variables to bazel. Now that
the bazel migration is cancelled, we don't need it anymore.
Bug: 315353489
Test: m nothing
Change-Id: I298cc2ac7ebd004557be3b30d75f7357cab0b7a0
As part of the process to remove the compilation action in the top level
java sdk library, this change modifies SdkHeaderJars(...) (i.e. the
"magic") to return the header jar of the implementation library instead
of the header jar of the top level java sdk library when the
implementation jar is returned from the "magic".
This change also removes `SdkImplementationJars()` from the
SdkLibraryDependency interface, as it is not currently used anywhere
else.
Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: Icc00af4b1485dc2b1b0981a3e56758d0306dea69
androidx.annotation_annotation is used as a test data file, and
converting it from an android_library to an android_library_import
causes the relative path used in the test data path to change.
Clear the relative path in android_library_import the same way that
android_library and other java based modules do.
Also change the name of classes-combined.jar to the name of the
module so that the output file has the right name if there are no
static dependences that require running the merge_zips step.
Bug: 288358614
Test: TestAndroidLibraryOutputFileRel
Change-Id: I28210aa370a742d789102ff71db3685ca744878f
With this change, the jarjar repackage actions are only on
the local classes of each module instead of the combined jar
that contains the static libs. The static libs don't need
jarjar repackage action on this module level because it has
been repackaged when building itself.
This change also removes the skip_jarjar_repackage property
since it's incompatible with this change. Actually skipping
jarjar repackage on a dep may result in incomplete repackage
on the module output.
Test: CI and observing the build time of SystemUIGoogle
Bug: 328067025
Ignore-AOSP-First: Will cp to aosp
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:78ffdd47a658dec4bf79e63d11a5f0f3b94876a4)
Merged-In: I476d959af025c46d2ba6d3f48ea378a086666a33
Change-Id: I476d959af025c46d2ba6d3f48ea378a086666a33
The API compatibility flags allow the APIs that have moved between API
surfaces to be correctly represented in the stub artifacts by passing
the previously released set of APIs and removed APIs. These information
should be passed to metalava when generating the exportable stubs, so
that the APIs that move between the API surfaces are not blocked in the
hiddenapi flags.
Test: patch to 24Q3-beta-release, lunch sdk-trunk_staging-eng && m sdk
dist and ensure that the expected methods are not blocked in the
hiddenapi flags
Bug: 330753520
Change-Id: I030b0a46b09f0cea026fedc879f10d4edfd38ac3
This pairs with `test_module_config` but also works on the base is a
`java_test_host` module.
e.g.
test_module_config_host {
name: "CtsOsHostTestCases_DERIVED_2566",
base: "CtsOsHostTestCases",
test_suites: ["general-tests"],
include_filters: [ "android.os.cts.StaticSharedLibsHostTests" ],
exclude_annotations: [ "androidx.test.filters.FlakyTest","org.junit.Ignore" ],
}
The new module is composed of the previous and shares much of the same
code.
With respect to build size,
Without this change, if you build CtsAppSecurityHostTestCases, there
will be several copies of the jar (and related apks) :
*) 1 in framework
out/host/linux-x86/framework/CtsAppSecurityHostTestCases.jar
*) 1 in testcases for the test
out/host/linux-x86/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
*) 1 per compatibility suite testcases
out/host/linux-x86/mts-documentsui/android-mts-documentsui/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
out/host/linux-x86/mts-mediaprovider/android-mts-mediaprovider/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
out/host/linux-x86/mts/android-mts/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
out/host/linux-x86/cts/android-cts/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
out/host/linux-x86/mts-mainline-infra/android-mts-mainline-infra/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
A dervived test using CtsAppSecurityHostTestCases as base adds one more
to its testcases dir:
*) derived testcase.
out/host/linux-x86/testcases/CtsAppSecurityHostTestCases_presubmit_ExternalStorageApp/CtsAppSecurityHostTestCases.jar
Fixes: b/327280990
Test: m clean && m CtsOsHostTestCases_DERIVED_2566# as above
Test: atest CtsOsHostTestCases_DERIVED_2566 --collect-tests-only
Test: migrated the 71 TestMapping instances to Android.bp and build them.
Ran tests on some of them.
Ran some original `test_module_config` tests derived from `android_test` as well
TODO: Add actions to validate the given filters are valid for the given
test apks/jars.
Change-Id: I115eedb6ff6ba8e72bb49e71867daf49d25ca0f1
Previously JAVA dependency over partition was checked only when device
VNDK version is not empty. This change updates logic to enforce inter
partition dependency despite of VNDK version based on VNDK deprecation.
Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: I7444ad612aa6c525e61cc5c2a89f5421ab4465b4
Add support for android_library_import to propagate the proguard specs
from its static dependencies.
Bug: 326265727
Test: TestExportedProguardFlagFiles
Change-Id: I174c1d7937a529958f8d240214b279062ef74868
Passing --shared-lib to aapt2 causes it to add an extra
onResourcesLoaded method that rewrites resources IDs to include
the package ID determined at runtime. ResourceProcessorBusyBox
has no equivalent functionality, so disable whenever --shared-lib
is found in aaptflags for now.
Fixes: 330646473
Bug: 331641946
Test: manual
Change-Id: Ibb0c2c7bf7a41ab294f5c84b4b6018cc8a63b0f4
Bug: 324321147
Test: Manual -- trigger factory reset, confirm ISecretKeeper.deleteAll()
is being called in Trusty logs.
Change-Id: If793f784bc1a8c621a721d15da9aeb1ef11e7334
To build system.img in Soong, we need all artifacts including
build.prop. This fully migrates buildinfo.prop file into Soong as a
first step to build build.prop on Soong.
Bug: 322090587
Test: compare build.prop before and after
Test: build multiple times and see build.prop isn't rebuilt
Change-Id: Icaa7e1fdab2a8c169ac00949d3aaf6c8212a1872
Remove the need to wrap java_import modules with a java_library
just to include static dependencies.
Bug: 288358614
Test: TestJavaImport
Change-Id: I888aecc6c0efc696a397fc1dd5d0ef5fd644bebc
If the flag is set we will:
- pass --optimized-resource-shrinking to the r8 invocation
- use non final fields for the generated R classes
- not pass the aapt2 generated proguard rules, R8 will do the tracing of xml files
Bug: 325905703
Test: This is simply passing the flag through to R8, this is off by default
Change-Id: Ib2043f3201578c3bcd39c1de9a524fd78f6d795c
Keep the Src attribute for compatibility. The new attribute (Srcs) is
mutually exclusive with Src.
Keep SourceFilePath and OutputFile for compatibility with other modules.
These can be removed in a follow up change.
Bug: 328313691
Test: presubmit
Test: m blueprint_tests
Test: prebuilts/build-tools/build-prebuilts.sh (on build-tools branch)
Change-Id: I5d5b2657715a7180a829c7ed0f501872d561b662
Fix dependencies of android_library_import modules so that the -nodeps
modules created by pom2bp are no longer necessary. Provide transitive
manifests (b/288358614), combine static dependencies into the output
jars, and propagate uses_libraries and optional_uses_libraries from
dependencies.
Bug: 288358614
Test: TestManifestMerger
Test: TestAndroidResourceProcessor
Change-Id: Ief45169d04217826fbb21ba283602b38ef0dd3f6
This change adds the support that was added to android_app in
https://r.android.com/2854663 for runtime_resource_overlay modules.
Implementation details:
- Add flags_packages as dependencies of runtime_resouce_overlay modules
- Pass the collected aconfig intermediate cache files to the
aconfigBuildActionOptions.
Test: m nothing --no-skip-soong-tests
Bug: 330222981
Change-Id: I3e20f18e58be689ca32852f7bf0b7ea16024856b
build/soong/sdk will use these tags to differentiate the sdk and non-sdk
contents of bootclasspath and systemserverclasspath fragments.
Test: go build ./java
Bug: 326246905
Change-Id: Ia8352c09fcbbca06988eb57153e5986801eb45a5
This change creates a "combined" filegroup module, which will contain
all api files of the subset api scopes in the followup change. In this
change, the "combined" filegroup is identical to the currently existing
last api filegroup module in that it only contains the api file /
removed api file of the specific api scope.
This change also passes the "combined" filegroup to the droidstubs
module generated from the sdk_library modules, but this currently does
not lead to any functional changes as the "combined" filegroup is
identical to the currently existing last api filegroup.
Test: m nothing --no-skip-soong-tests
Bug: 321827591
Change-Id: If73a7229f2f970f7e74cd010a8b4808dc9018344
Currently, the "exportable" stubs and the api files are copied to the
dist directory during SDK builds regardless of the value of the
RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag. This change modifies
such behavior that the "exportable" artifacts are copied to the dist
directory only when the RELEASE_HIDDEN_API_EXPORTABLE_STUBS flag value
is set to true.
Test: lunch aosp_arm-trunk_staging-eng && m sdk dist and inspect ninja graph to verify that the "everything" artifacts are copied to the dist directory
Bug: 330417789
Change-Id: I3b83375610eb172d7b9da7ea831a74cd427b696c
This change adds the support that was added to android_app in
https://r.android.com/2854663 for android_library modules.
Implementation details:
- Move `Flags_packages` to aaptProperties, so that it can be utilized
for both android_app and android_library.
- Wrap `VisitDirectDeps` of aconfig_declarations to a function that
takes a ModuleContext as an input, so that it can be utilized in the
`GenerateAndroidBuildActions` of both android_app and android_library.
Test: m nothing --no-skip-soong-tests
Bug: 330222981
Change-Id: I8a755f5ca615c8a1651afcd2ec441fc9fbd82c61
This change propagates the intermediateCacheFiles generated by the
aconfig_declarations to the static rdeps that are java modules or the
rdeps that are filegroups.
Test: m nothing
Bug: 329284345
Change-Id: I02431336c1aa0378d03248f3bb6edf2f57ec3b7f
Bug: 329762127
Test: cd build/soong/java ; go test -run TestJavaLibHostWithStem
Test: cd build/soong/java ; go test -run TestAppStem
Test: cd build/soong/java ; go test -run TestAndroidAppImport_ArchVariants
Test: cd build/soong/java ; go test -run TestOverrideAndroidAppStem
Test: cd build/soong/java ; go test -run TestOverrideAndroidApp
Test: cd build/soong/java ; go test -run TestPackageNameOverride
Change-Id: I8fbdc82116f9a0c68121fbbeb1ef4f78f2b6fea3