Commit Graph

9 Commits

Author SHA1 Message Date
Jiyong Park 618922e510 jacoco correctly gathers info from APK-in-APEX
This change fixes a bug that jacoco-report-classes-all.jar does not
include info for APK-in-APEX such as the MediaProvider apk in
com.android.mediaprovider APEX.

Firstly, LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR is correctly set also for
the APKs included in APEXes. Secondly, the Make modules for the embedded
APKs are now built with soong_app_prebuilt.mk to correctly import the
jacoco file into the Make world.

Bug: 147296855
Test: execute the following command in internal master.
$ choosecombo cf_x86_phone userdebug
$ NINJA_ARGS="-t path out/target/product/vsoc_x86/jacoco-report-classes-all.jar out/target/common/obj/ETC/MediaProvider.com.android.mediaprovider_intermediates/jacoco-report-classes.jar" EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true m
The result shows that there is a path as follows:
out/target/product/vsoc_x86/jacoco-report-classes-all.jar
out/target/product/vsoc_x86/apex/com.android.mediaprovider/priv-app/MediaProvider/MediaProvider.apk
out/target/product/vsoc_x86/obj/ETC/MediaProvider.com.android.mediaprovider_intermediates/package.apk
out/target/common/obj/ETC/MediaProvider.com.android.mediaprovider_intermediates/jacoco-report-classes.jar

Change-Id: I52d11534a34eb35219bfafca4453e75a1b701c0e
2020-01-08 14:49:31 +09:00
Artur Satayev 9cf4669bc4 Add exported_plugins to java.Library.
The behaviour is similar to go/be#java_library.exported_plugins. Plugins added to exported_plugins of library X are not applied to the library itself, but rather to libraries that directly depend on the library X.

Test: m checkbuild
Bug: 139740873
Change-Id: I4042bd482ad9cb12d6fbaac51f039d38b1b7a428
2019-11-26 19:05:26 +00:00
Colin Cross 0f7d2ef3ac Add method to determine variations from a Target
The arch variants are hardcoded in every module type.  Refactor
them out into a Target.Variations() method in preparation for
splitting the arch mutator into two, which will require using
different variations.

Test: m checkbuild
Change-Id: I28ef7cd5168095ac888fe77f04e27f9ad81978c0
2019-10-16 14:52:30 -07:00
Treehugger Robot bc975e8b89 Merge "Fixes typos in device_host_converter.go comments." 2019-05-14 01:16:27 +00:00
Jaewoong Jung 707d788ea2 Fixes typos in device_host_converter.go comments.
Test: TreeHugger
Change-Id: Ie786e8fc950c3e9913c9d51f2b88bc036bb17462
2019-05-13 15:11:23 -07:00
Colin Cross 6c6e6cd64d Don't hide *.kotlin_module in turbine dependencies
The jars containing the merged header classes from transitive
static dependencies were stripping all of META-INF/.  Kotlin
puts metadata in META-INF that is used to map the package to
the static class that contains the package-level functions.

This also exposed that the metadata in META-INF is always
called "name.kotlin_module", so a library that contains
kotlin files with a dependency that also contains kotlin files
would shade the metadata file.  Use a unique name instead.

Fixes: 131709692
Test: m checkbuild
Change-Id: I5cd276e563206e37c4c0d90fe9f346e9396f88c0
2019-05-08 14:30:12 -07:00
Colin Cross 0c4ce21615 Track sources for srcjars across modules
Robolectric coverage needs a srcjar that sometimes needs to
include sources of dependencies.  Track the arguments and
dependencies necessary to jar the sources.

Test: TestIncludeSrcs
Change-Id: I9979d2b8350923a2237e743c232e6e548f54ba3b
2019-05-06 14:22:26 -07:00
Colin Cross 28c3eb6829 Export java_host_for_device and java_device_for_host modules to Make
Robolectric needs to reference some modules declared with
java_host_for_device and java_device_for_host from Make for now.

Bug: 122331577
Test: m checkbuild
Change-Id: I09b3848edb120f2c3ee16b449b937b650f59811b
2019-04-24 05:17:22 +00:00
Colin Cross 3d7c9827d5 Add modules for converting java modules between host and device
java_device_for_host and java_host_for_device allow treating a
device module as a host module and vice versa.  They will be useful
for converting layoutlib and robolectric to Soong, as these modules
run device java code on the host.

Bug: 117920228
Test: device_host_converter_test.go
Change-Id: Ia9a371fb41a97bc16338097f3ce8b40099744167
2019-03-05 23:09:45 +00:00