Device overlays are passed to Soong in highest priority to lowest
priority order, but aapt2 keeps the last value provided on the
command line. Reverse the order that overlayGlobResults are
collected.
Bug: 71595164
Test: app_test.go
Change-Id: Ibc6b8297f1548766c5c92f3be969b89736dc8dff
Add jacocoagent when instrumenting with EMMA_INSTRUMENT_STATIC.
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true
Change-Id: I451bb9d16b7f0a66fd06c2da576062b28830e470
jacoco_cli --dest takes a directory, not a jar name, and assumes
an output file with the same name as the input jar in that
directory. Rename jacoco-report-classes.jar to
jacoco-report-classes/modulename.jar, and generate to
jacoco/tmp/modulename.jar before combining to the final output file
at jacoco/modulename.jar.
Bug: 69669951
Test: m EMMA_INSTRUMENT=true
Change-Id: Ia7dd881d2819ae09dfb60a00b4c1b8396629cd9a
Move dexing support into java/dex.go, including the rules and logic
from builder.go and the function from java.go.
Test: no change to build.ninja
Change-Id: I098d2a9774e28079ba44791679a0db6f876fe3e6
R8 will replace desugar+proguard+dx, which will mean jacoco has to
run before desugar. In preparation, move jacoco before desugar now.
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false tests
Change-Id: I5d98d2300ce83496f9b82c9b973f679701448474
Follow the Make change in I9b6081edfdd2c3e9a450ae8a39c4e32c3d2cda92
to explicitly pass the OpenJDK 8 bootclasspath when targeting <= 1.8.
Bug: 70862583
Test: java_test.go
Test: javap -c -p out/soong/.intermediates/external/guava/guava/linux_glibc_common/javac/classes/com/google/common/hash/AbstractStreamingHashFunction\$AbstractStreamingHasher.class | grep ByteBuffer.flip
shows java/nio/Buffer return type in signature.
Change-Id: Ief66bbf6e3a4220b3afb2e02009bd0157d4c7fae
Add a method on ModuleContext and TopDownMutatorContext to visit
direct dependencies that have a given dependency tag.
Test: m checkbuild
Change-Id: Ib875563091dcae6b7282b3e3427d0eb07d8c8af5
Combining static jars from dependencies may bring in module-info.class
files, which don't make sense once multiple modules have been combined,
and sometimes confuse downstream tools like desugar. Strip them out
like make does when combining jars.
Test: m checkbuild
Change-Id: I560c5acfcc6e1be9adf604c22cf200581f92f702
Add space after -x argument for jacoco excludes.
Add .class to end of file name for jacoco includes.
Bug: 64836607
Test: jacoco_test.go
Change-Id: I4c1024755882c976f7326f7382c4f2e99a20233d
Add tests for converting jacoco filters to command line arguments
to soong_zip.
Bug: 64836607
Test: jacoco_test.go
Change-Id: I969fa877e4be19bb92dcab5a796a4e4ec3fc166a
For now, only a whitelisted set of packages are whitelisted (see
libcore/JavaLibrary.bp) but this works as a proof-of-concept.
Bug: 64836607
Test: `cts-tradefed run cts-dev -m CtsLibcoreTestCases --test-arg com.android.compatibility.testtype.LibcoreTest:coverage:true` on a build with EMMA_INSTRUMENT=true and EMMA_INSTRUMENT_FRAMEWORK=true
Change-Id: If7c62665257f0ff9466030680ff1f56a053a023e
The kotlinc build rules were missing dependencies on the jars in
the classpath.
Test: TestKotlin in java_test.go
Change-Id: I56681785289f942b1070751b7dc5944e7a995b7f
Allow java modules using proto to specify output params to be
passed to the proto generator.
Test: m checkbuild
Change-Id: I8a06f07218073236f4f85996ea5f09fb3702ed1a
App implementation and header jars are necessary for tests to
run against apps.
Test: m checkbuild
Change-Id: Ia54ebf41f17346d3c59f3ec9512e68f195cdb67f
Allow apps to specify that they should be installed in priv-app,
and export the value to Make which normally handles installation.
Test: m checkbuild
Change-Id: I79a05e7bb6ec0df5c31429e2f4592c6fd57dab70
All of the properties for Make were inside an incorrect
export_package_resources check, which only worked because
the only app so far was framework-res, which had the
property set.
Test: m checkbuild
Change-Id: Idd9be1f497c31b2bd38fee0a83bb4756c6e94305
Add an option to use D8's desugar instead of the standalone version.
USE_D8_DESUGAR=true m would trigger DCHECK in dex2oat unless
https://android-review.googlesource.com/c/platform/art/+/562595 is
patched in as well.
Bug: 69329508
Test: m && USE_D8_DESUGAR=false m
Change-Id: I864d88e257a2ba0b7f19aa5cced537301950e963
Also allow commands with no tools for the case when standard
shell utilities are used to munge an input file.
Test: m checkbuild
Change-Id: Ie061e90cafe1a0a0db004a89e9a17fb48709cb03
These variables are published by config.go for use inside
.mk scripts. They are suitable for rules that need to be
pinned to a particular java/javac version because they do
not (yet) support the other.
Bug: 70286093
Test: Treehugger
Change-Id: Id407fca187fdf6c1947fc9d1ed7cd634fe089384
Merged-In: Id407fca187fdf6c1947fc9d1ed7cd634fe089384
Logtags files in cc and java are treated fundamentally differently.
In cc, they are not used for compiling at all, but need to be passed
to Make to be combined into the global logtags list, and logtag files
are listed in a logtags property. In java they are listed in srcs
and produce generated code that is compiled in, and so shouldn't
also need to be listed in a logtags property.
Move the logtags property to cc and export it to Make from there,
and have java extract logtags files from srcs to be exported to
Make.
Test: m checkbuild
Change-Id: I31d49289efe72db60d2f33566df771b4a3ebc8a0
Move dex_preopt to dex_preopt.enabled, and add dex_preopt.app_image,
dex_preopt.profile_guided, and dex_preopt.profile. These values will
be passed back to Make if provided to control dex preopting.
Test: m checkbuild
Change-Id: I54a4b1de697a08be20ab65d2a5dc43ce0046692d
Add a common_first multilib type and use it for java.Binary
so that the java part is compiled as a "common" arch type
but the wrapper script is installed as a "linux_glibc" arch
type. This allows java_binary to be used as a tool dependency
for a genrule.
Bug: 68397812
Test: TestJavaBinary
Change-Id: I809060839ce8878300da3fb76426ceb1ea6b0e8e
Add a java_genrule that has the right multilib flags to be a
dependency of a java rule. Make java libraries implement
SourceFileProducer so that their classes jar can be used as an
input to a java_genrule. Allow libs and static_libs dependencies
to be a java_genrule.
Test: TestJarGenrules
Change-Id: Ib1b31ef9c0b7e72eeed2c9ecc4ce8a1088e0b1c9
Fix two problems with Soong's aapt2 rules that occur when
TARGET_BUILD_APPS is set. Fix escaping the values passed to
--min-sdk-version, they are sometimes P-$$(cat out/build_number.txt).
Also use the correct path to the aapt2 prebuilt.
Bug: 69917341
Test: m TARGET_PRODUCT=full TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_APPS=Camera2
Change-Id: I8660a62c4a87a74e0ac1b9d03d67103af93a0cbe
Soong was keeping the compiled resources in the same order as the
input resources, which are sorted lexicographically. Converting the
path names in pathsToAapt2Paths results in a list that is no longer
lexicographically sorted.
Make sorts the inputs to aapt2 link by compiled resource name, so
do the same in Soong.
Bug: 69917341
Test: no change to framework-res.apk when converting to Soong
Change-Id: I29e8339b9969b0d323d469dac140c7e172b7ebfa