Revert submission 2982300-java_api_library_non_sdk
Reason for revert: DroidMonitor: Potential culprit for b/357648959 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted changes: /q/submissionid:2982300-java_api_library_non_sdk
Change-Id: I5ef7afd9ec3e10ea99f82d02172843ad9b2cfda9
Partner worksapces contain two versions of mainline prebuilts - BigAndroid
and Go. These two prebuilts export dexpreopt'd system server artifacts
to be installed in system image. Since the install paths are same, we
run into duplicate installation rules issue unless one of them is
hidden.
This hiding was previously done by creating a dependendency between
source aosp apex to BA and Go google prebuilts. However, this
implementaion had the unfortunate side effect on the packaging name of
the Google mainline prebuilts - the name becomes the aosp apex name.
Instead of creating the dependency to aosp apex, this CL hides all
mainline apex_set(s) if it has not been flagged using
RELEASE_APEX_CONTRIBUTIONS_*. Since there are some non mainline apex
prebuilts, apex_name will be used to determine whether the prebuilt is a
mainline module.
Test: m nothing --no-skip-soong-tests
Test: In partner workspaces, downloaded the CLs in b/355682304#comment7
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp apexes are not installed, but mainline prebuilts are
installed
Test: unset RELEASE_APEX_CONTRIBUTIONS_ADSERVICES to build from source
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp adservices is installed, and adservices prebuilt is
**not* installed.
Bug: 355682304
Change-Id: Idacb65313553bdea5c0593976694de478034229e
If a prebuilt APEX is compressed, it's installed without decompression
even when PRODUCT_COMPRESSED_APEX is false.
This change decompresses the prebuilt/compressed APEX.
Bug: 356533488
Test: OVERRIDE_PRODUCT_COMPRESSED_APEX=false m
Change-Id: Ifdde074e383837df92d172bc483bfca9a97cb6f8
This change allows from-text stubs to be generated for all
java_sdk_library modules, unlike how it is currently limited to the
modules that contribute to the api surfaces (i.e. the SDK).
This change accomplish this by modifying the dependency of the
from-text stubs generation, so that the sdk_library generated from-text
stubs generating java_api_library modules no longer depend on the full
api surface stubs, but generate the stubs in the module level, and
combined later to generate the full api surface stubs.
This change also removes the java_api_library modules defined in
core-libraries/Android.bp, which are passed to generate the system
modules. Given that the from-text vs from-source toggle is done within
the java_sdk_library stubs level, these modules no longer need to exist.
Implementation details:
- Allow sdk_version to be specified in java_api_library modules. For
java_sdk_library-generated java_api_library modules, they inherit that
of the sdk_library module. Some java_sdk_library modules that do not
contribute to the api surface are allowed to set sdk_version to
something other than "none" or "core".
- Implement java_api_library to implement `SdkContext`. This allows
java_api_library to collect required deps from sdk_version (classpath,
bootclasspath, system modules), and pass the collected jars when
generating the stubs srcjar in metalava and compiling the stubs srcjar
in javac.
- Remove hardcoded list of sdk_library modules that are allowed to
genereate stubs from the api signature files, and allow from-text
stubs generation by default. Modules that are not able to generate
stubs from the api signature files are specified by setting the newly
introduced `Build_from_text_stubs` property to `false`.
Test: ENABLE_HIDDENAPI_FLAGS=true m
Bug: 327507877
Change-Id: Ia35d2f3cf9fae48fc8c4bd99a84ae18d7c0e7bee
You don't have to call module.ConfigurableEvaluator(ctx) if ctx is
already a ModuleContext, you only need to do that for more restricted
contexts like SingletonContext.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I7612290d43dae7decfae283a341882d9016c98a3
https://r.android.com/2901309 added support for handling installation
rules for multiple prebuilts. One of the implementation details there
was to change LOCAL_MODULE name to the source apex name in the generated
.mk files.
This causes issues in partner builds where the google singed apex
com.google.android.foo gets renamed to com.android.foo in
out/soong/Android-$PRODUCT.mk. If the partner builds does not include
the aosp apex in its PRODUCT_PACAKGES, then the google signed apex gets
elided from packaging.
This CL undoes that change. After this CL, the name of the module as it
appears in Android.bp will match the LOCAL_MODULE name emitted for
product packaging.
Test: in build/soong, go test ./apex
Bug: 355682304
Change-Id: Icadbb75609174cff5326f52baf7d53e901f9f1c0
* changes:
Make more apex properties configurable
Make genrule's srcs property configurable
Make some apex properties configurable
Make the vintf_fragments property configurable
Make the defaults property configurable
This allows using select statements with these.
* apps
* binaries
* prebuilts
Bug: 354824866
Test: m --no-skip-soong-tests
Change-Id: I8e28937d2fa6514b41bd189f56f9f584a60d2c80
This allows using select statements with these.
* androidManifest
* canned_fs_config
* systemserverclasspath_fragments
Bug: 354824866
Test: m
Change-Id: I4c2182944ec14d99332f437c39a19ba0dc6b7731
Platform variants of module sdk libraries were marked as uninstallable
originally in https://r.android.com/1974259. This special case is no
longer necesssary - android.MutateApexTransition will call
MakeUninstallable on the platform variant on both the source and
prebuilt soong modules when the following conditions are met
- //apex_available:platform is not listed in apex_available (explicitly
or via the default implicit)
- the soong module is included in an apex that exists in the tree
(listed in native_shared_libs)
Since MakeUninstallable is set by apex specific mutators, the relevant
unit test has been moved to the apex package. The Android.bp of the test
has also been extended with an apex that includes the shared library.
Test: m nothing --no-skip-soong-tests
Test: no diff in out/soong/Android-$product.mk
Test: added prebuilt_libdexfile to art's apex_contributions locally, no
diff in out/soong/Android-$product.mk
Bug: 220898484
Change-Id: I43a324882d486451bb921028853508d7ec3d76bf
* changes:
Convert sdk mutator to TransitionMutator
Convert link mutator to TransitionMutator
Convert version mutator to TransitionMutator
Convert python_version mutator to TransitionMutator
Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
Replace rust.LibraryMutator and rust.LibstdMutator with
TransitionMutators.
Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Test: no change to build.ninja
Change-Id: Ia24a582119d39889279d7b93bac9259685153619
This change enables the container information to be collected for Java
modules.
Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I01bf99fa274275a608601ad6248d577ae8f6dffc
Add an IsAddingDependency method to IncomingTransitionContext that
returns true if IncomingTransition is called after the transition
has already won while adding a new dependency. This will be used
as part of the transition mutators to support an apex use case where
incoming dependencies during the initial apex mutator need to be
rewritten onto the platform variant for modules that don't support
the apex, but a later call to OtherModuleDependencyVariantExists
must not rewrite the requested apex variation onto the platform
variant.
This should be used sparingly, all uses will have to be removed in
order to support creating variants on demand.
Bug: 319288033
Test: TestIsAddingDependency
Flag: EXEMPT refactor
Change-Id: Ib8e419d35ff8f7cbff9667c1cd40d05ccfacab8b
Since VNDK is gone now, the property has no meaning. Will remove the
property after removing all the references(there're no-op for now).
Bug: 350644693
Test: m
Change-Id: I85637ede5534a3b993ac12656e4aba8d945fec14
Updatable apexes should not min_sdk_version to `current`, since
`current` can have different meanings based on when plaform finalization
happens.
Test: m nothing --no-skip-soong-tests
Bug: 221087384
Change-Id: I04aaa4a331027b7afbf6ccdb9cbf3ae670827c9f
Remove test_per_src, it never worked well and is incompatible
with all of the test infrastructure. Uses in the platform have
been removed, generally by replacing them with individual cc_test
modules.
Test: builds
Flag: TEST_ONLY
Change-Id: I257c035da35ca8358ae9423b46453878f54efeb1
This change adds a unit test for https://r.android.com/3146677
Test: m nothing --no-skip-soong-tests
Bug: 339267677
Change-Id: I48e1c2681aaa153b32b209f05a93c501af5d1bac
Although image variation generation logic has moved out of cc package to
the android package, the vendor and product partition variants
generation logic is still specific to cc package. Therefore, in order to
create a product or vendor variant, they have to specified in
`ExtraImageVariants`. In order to avoid such confusing behaviors and
enforce modules to specify product and vendor installation rules, this
change moves the vendor and product variant generation logic to
android.ImageInterface.
Test: m nothing --no-skip-soong-tests && diff contents of out/soong/Android-{product}.mk
Change-Id: I9e14f3739d9dea94167ee6a91e92b2f942055aba
Followup to the fix in https://r.android.com/3137737. This adds a unit
test to check the permission xml file contents of sdk library. This file
contains the on-device location of the sdk implementation library.
override/overridden apexes are installed in the same location, so the
on-device sdklibrary path should remain consistent in the xml files of
the override and overridden apexes.
Test: go test ./apex
Bug: 346486531
Change-Id: I61adbf94bdfce8aa89de89cc90b6f564f2f7417f
multitree.ExportableModule no longer implements
android.OutputFileProducer
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.
ApiSurface and apexBundle are included in this change.
Test: CI
Bug: 339477385
Change-Id: I9247bb2dfed270a879f8bc96c6aa06803fde0150
Permissions of apex variants of shared java sdk libraries should use the
base apex name (com.android.foo) and not the override apex name
(com.mycompany.android.foo). The override apex name started being used
when separate variants were created for override apex transitive deps
(https://r.android.com/3083813)
Bug: 346486531
Test: m com.google.android.ipsec
Test: verified that
out/target/product/<product>/apex/com.google.android.ipsec/etc/permissions/android.net.ipsec.ike.xml
contains /apex/com.androiqd.ipsec/javalib/android.net.ipsec.ike.jar #
previously it contained com.google.android.ipsec
Test: https://android-build.corp.google.com/builds/abtd/run/L59900030004679761
Change-Id: I863170d78efa017bef5e4ece3b1471f74ba84b0c
So that users can use select statements with it.
Fixes: 347605145
Bug: 342006386
Test: m nothing --no-skip-soong-tests
Change-Id: Ica0ca6d1725b000b3748c0293e5a9f9b38ed87f9
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.
Test: CI
Bug: 339477385
Change-Id: I5cb79a2e39f7fdd791762bcde5a5bfb325985274
Soong generates AndroidMk modules and Make installs the required
dexpreopt files for APEX bundles. This dependency is not tracked by
the soong and missing from the soong filesystem.
Call PackageFile for the dexpreopt files of APEX bundles to install
the files in the soong-built system image.
Bug: 346439786
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug \
&& m aosp_cf_system_x86_64
Change-Id: I6af4afe5b3183c89bf687ac779007b87e1d7e948
The unit test is useful for verifying that
min_sdk_version/max_sdk_version information is populated correctly.
Followup to https://r.android.com/3128893
Bug: 345621958
Test: go test ./apex
Change-Id: Id7696a8cefaab6d0b7f38b65a33e326152ac12d3
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.
These module types are included in this change:
linker_config
llndk_libraries_txt
sanitizer_libraries_txt
java_sdk_library_xml
vndksp_libraries_txt
vndkcore_libraries_txt
vndkprivate_libraries_txt
vndkpublic_libraries_txt
Test: CI
Bug: 339477385
Change-Id: I35575bbad137df5ff8001db9a61ba5b3d13eaa6d