If we're not obfuscating, proguard doesn't generate the mapping file,
and ninja will consider the edge dirty, since one of the output files
does not exist.
Also disable it for jack, since jack writes to a different file.
Bug: 66929996
Test: m cts; m cts
Test: m ahat-test with a clean build
Change-Id: Iff6707c44cbd86cd9328bbad8322398bc9d960fd
The bootclasspath libraries have direct dependencies now, so
remove them from LOCAL_JAVA_LIBRARIES so they don't also end
up in the classpath.
Test: m -j checkbuild
Test: m -j ANDROID_COMPILE_WITH_JACK=true java
Test: manually inspection of build-${TARGET_PRODUCT}.ninja
only has expected changes
Test: no changes to system.img
Change-Id: Icbc8987468f237aa351708b33c3abe5ea3d1816e
The libraries in the bootclasspath were getting their dependencies
because they were also in the default libraries list. Make the
dependencies explicit in preparation for rearranging the default
libraries.
Test: m -j checkbuild
Change-Id: I3ea004714a31cd648ec2ef57ed3099bce70bc6b9
- ndk/r10 is removed, we need to use SOONG ndk stubs instead.
- Use MIN_SUPPORTED_SDK_VERSION instead of hard coded version 9 for
32 bit compilation.
Bug: 38342163
Test: mm
Test: make -j40 FORCE_BUILD_RS_COMPAT=true RSTest_Compat
Change-Id: I9549446cb7f8faee8842b06f096d035535dc7f3d
Use .KATI_IMPLICIT_OUTPUTS to convey as such.
This is to support a use case for building platform/art/tools/ahat,
which depends on the generated proguard_dictionary for running tests.
Test: m
Test: m ahat-test with relevant changes from clean build.
Change-Id: Ic8f3b6819cfd4cd18620a2eaafd80d672fde8f5c
By doing this, the change of private_manifest file won't trigger
Javac to re-run during re-build.
Bug: b/65455145
Test: m clean && m -j32
Change-Id: Ib90d56daf0be5f31b51e07b7714a933bc5cf4496
1. Use merge_zips to merge jars without unzipping/rezipping static Java
libraries. And seperate merging process as a independent Make target so
that Javac can only depend on Turbine.
2. Remove duplicate vars: "full_java_lib_deps" in droiddoc.mk
3. Also use classes-header.jar for link_apk & link_instr
Bug: b/65455145
Test: m clean && m -j32
Change-Id: I7b0307664a6b86075c983284fce099bd3946318c
By doing this, we don't need run desugar/Jacoco/proguard twice for
static java libraries(one for their self build, another for downstream
dependents).
Test: m clean && m java
Bug: b/65455145
Change-Id: I87aee34940937dbde33a977f55d1faf2c8054561
This reverts commit 33dcd0c5eb.
Reason for revert: <stub.jar.toc needs classes.jar.toc which is no longer existed after Turbine was introduced. So use classes.jar to represent stub.jar.toc>
Bug: b/64308460
Test: m clean && time m -j32 ANDROID_COMPILE_WITH_JACK=true
Change-Id: If618993f1e0c789d93cc15664212603f994fd460
GLOBAL_JAVAC_DEBUG_FLAGS is no longer set, -g is already included
in the javac command line. Jack is on its way out, just use -g
directly there for now.
Test: m -j checkbuild
Change-Id: Ib99c248bbb8b65fa2cd2b55449a502fc20deffa8
This reverts commit 0739155c86.
Reason for revert: <sdk_google_aw_x86-sdk (linux) build 4310016 in git_master is broken>
Change-Id: I525d48557bd0425917e61a85f596663ccc63c887
1. Bundle static_java_header_libs during turbine-classes.jar if
necessary. This can be improved if we have the ability to merge jars on
the fly.
2. Copy sdk/stubs-classes.jar to sdk/stubs-classes-header.jar, and Use
.KATI_RESTAT to cut un-necessary targets rebuilt.
3. Copy prebuilt-classes.jar to prebuilt-classes-header.jar since
Turbine doesn't apply to prebuilt.
4. Run jarjar after Turbine compilation, otherwise downstream targets
won't find corresponding symbols.
5. Change classes.jar in -classpath used in Desugar to
classes-header.jar.
6. Change legacy-libs in Proguard from classes.jar to
classes-header.jar.
7. Add .KATI_RESTAT for turbine-classes.jar, and remove IJAR.
8.boot.art is re-generated during the incremental rebuild since
javalib.jar got re-generated. Then boot.art re-triggered lots of
downstream targets to be rebuilt. So we add .KATI_RESTAT for javalib.jar
to prevent downstream to be rebuilt. The ziptime & commit-change-to-toc
operation for javalib.jar(small) didn't bring too much overhead when we build
from clean state.
Next step: specify static_java_header_libs in -classpath, and merge jars
at the end.
touch frameworks/base/core/java/com/google/android/util/Procedure.java &&
time m
time: 1m58s (794 -> 49 targets)
m clean && time m java
time: 9m34s
Bug: b/64308460
Test: m clean && m checkbuild
Change-Id: Iefcc234405b9f461b6882c06bba15e21fa783d28
Move the java source list generation step into its own rule. This
has a couple of advantages. It consolidates the source list
generation so that it only has to run once for javac, jack, and
jack-check. It also massively reduces the length of the javac
command line, so that error messages are significantly shorter,
and allows easily rerunning the failing build command because
the file list is still on disk.
The primary disadvantage is that javac error messages no longer
include the list of files passed to javac, but the list is
available earlier in the build long when the file list was written,
and is still available on disk.
Test: m -j javac-check
Change-Id: I9730b352b33a060e08221b61c11c617d23320d67
We were previously using LOCAL_BUILT_MODULE, which wouldn't work in the
case that "nostripping" wasn't specified (i.e when we stripped).
The issue is that the built module has its classes.dex entry stripped,
which means that profman can't do anything meaningful with it.
In this change, we use the right set of files for JAVA_LIBRARIES as well
as prebuilt PACKAGES. Fixing apps built from source is a larger task and
has been left for a future change. Depending on ART changes, we might
need to disable stripping for all apps and/or align userdebug and user
builds with each other. This will be tackled separately.
Test: make
Bug: 64896089
Change-Id: I4fd256d187b66763f354cc6001953469c2cd8fbb
jar -C <dir> . produces a jar containing files in filesystem order,
which can vary between builds. Manually find and sort the list of
files, and convert them into a list of -C <dir> <file> pairs.
Fixes: 64634025
Test: m -j checkbuild
Test: m -j out/target/product/sailfish/system/framework/ext.jar, check
that entries are sorted
Test: m -j out/target/product/generic_arm64/system/framework/ext.jar on mac
Change-Id: I7dced6acbe621a60cd49daf17872941485602732
The LOCAL_JAR_PROCESSOR rule should depend on the path to the
processor jar and not the module name.
Test: m -j && m -j
Change-Id: I5ebd4cd3ad4429918edfd0a8cb5cb9a4e7e86ca7
Use $(JAVA) to invoke dx.jar instead of the dx wrapper script.
Also allow the dx command line or the dx jar to be specified on
the command line. Allows better dependencies on dx.jar, and
doesn't rely on having java on the path.
Bug: 62956999
Test: m -j checkbuild
Change-Id: I5f265132690ad28b3139954fea44eb0c4a43393a
We're removing LocalVariableType / LocalVariableType in order to
save space. Enabling stripping reduces AOSP image size save
by ~12MB.
Bug: 38224820
Test: CtsLibcoreTestCases
Change-Id: I3168d73ec6825aa5879db7e1135d7ed61d488d72
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.
Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
Fixes build breakage caused by having duplicate versions of
a class in the application and in the API. This workaround will
be removed once junit classes have been removed from the API.
Bug: 30188076
Test: make Browser2 ANDROID_FORCE_JACK_ENABLED=disabled
Change-Id: I9a9031d3ef6d82f35413b229d588a605f9ed39dc
Allow using a host java library as an intermediate processor step
after javac but before desugar, proguard, or dx.
Test: manual
Change-Id: I7fb843e10d96c0167f6e4371582fabcc1454521f
Previous change that moved com.android.internal.util.Predicate
to the legacy-android-test JAR caused a proguard build breakage
due to duplicate classes in the application and library. This
fixes it in the same way as previous issues with junit and
android.test classes were resolved by excluding those classes
from the application JAR.
Bug: 30188076
Test: make checkbuild and make -j ANDROID_FORCE_JACK_ENABLED=disabled checkbuild
Change-Id: Ica0089607187f970251ddba339a1f71d4cad80cc
Building all java to dex is very slow. Make javac checkbuilds act
like jack checkbuilds and only build to class files for unused
modules, and add a java-dex target that can be used to build
everything to dex.
Test: m -j checkbuild
Change-Id: Idcf9c9e0223b9dd88aaa53beb0cb50a230034b0f
Allow working around Jack bugs by using javac to compile *.java
to class files, and then pass through Jack for desugaring,
proguarding, and dexing.
Also make ANDROID_COMPILE_WITH_JACK=false override LOCAL_JACK_ENABLED.
Bug: 37483961
Test: m -j checkbuild
Test: Add LOCAL_JACK_ENABLED := javac_frontend to a target
Change-Id: I2189055aac9deccc36b8eab8e949796dddadf7a1
Add soong_javac_wrapper to all javac commands. soong_javac_wrapper
colorizes javac output, and hides noisy messages.
Previously attempted in I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
and I449a61ed2c95b3e1afd51a31a11baab15d97e2f2.
Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I9d7a20d766fadab323a4cf95e5734741b3f578bb
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS. Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.
For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).
Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
(cherry picked from commit cde14987ba)
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS. Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.
For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).
Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
This will allow individual modules to enable error prone checks
as needed so that the change to treat an error prone check as a
compiler error can be done atomically with the changes to fix
the issues that check reveals.
Tested with the following steps, cleaning up the targets in
between to ensure that it was rebuilt everytime.
Set LOCAL_ERROR_PRONE_FLAGS := -Xep:ClassCanBeStatic:WARN
compiler error in junit-params-test target. Built
javac-check-junit-params-test with RUN_ERROR_PRONE=true to make
sure that compilation failed.
Built the javac-check-junit-params-test without RUN_ERROR_PRONE
set to make sure that the flag is not included unless explicitly
requested.
Built the junit-params-test as normal to make sure it still
worked properly.
Bug: 31507496
Test: See above
Change-Id: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
Merged-In: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
(cherry picked from commit 3ca9298d99)
I6730e2d3ec38004874265b2a690442dec57b33f4 introduced duplicate rules
to build classes.jar for static java library prebuilts, and left rules
to copy $(built_dex_intermediates) to $(built_dex) for modules that
don't build dex files.
Move prebuilts LOCAL_BUILT_MODULE back to javalib.jar to match
non-prebuilt modules, and remove the manual building of javalib.jar.
Add a check around $(built_dex_intermediates) for static java libraries.
Bug: 36901093
Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I291510b56162f0d35553e3c7ccd59b1382224d62
Jack can silently handle using a java library as a static java
library by merging in the java library dex file. This causes
problems when switching to javac, because dex doesn't support
dex merging with multidex enabled?
Make the output files consistent between java libraries and static
java libraries. Java libraries will now produce:
classes-pre-proguard.jar: the classes before proguard processing
classes.jar: the final jar file containing classes before dexing
javalib.jar: a jar containing classes.dex
Static java libraries will eventually only produce
classes-pre-proguard.jar and classes.jar. All inter-library
linking is done with classes.jar, so a java library can be
used as a static java library.
There are too many dependencies outside the build system that
expect javalib.jar to exist for static and host java libraries,
so for now continue to build a javalib.jar that is a copy of
classes.jar.
Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Test: m -j java
Bug: 36901093
Change-Id: I6730e2d3ec38004874265b2a690442dec57b33f4
Downstream users of a library always link against javalib.jar, which
is either the dex jar for java libraries or a copy of
proguard.classes.jar for static java libraries. In preparation for
making java libraries a superset of static java libraries, make
classes.jar always be the final class-containing jar for use
downstream, and always create a classes-pre-proguard.jar for
users that need a jar without shrinking or obfuscation.
Also rename the intermediates to be consitent: classes-<tool>.jar
Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
Merged-In: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
(cherry picked from commit 6fabefa88e)
Don't copy jar files for disabled stages. Instead, set the name of
the output to the name of the input so the next stage will directly
pick up the output of the previous stage.
Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: Ib7268cbff7ea7ff2ad2caf994aa145e1b7a12b83
This reverts commit 440079b84b.
Adding the pipe interferes with error codes, which results
in an empty classes-full-debug.jar output file being left
after the failure. The next build sees the output file with
an up-to-date timestamp and doesn't rerun the failing rule.
Bug: 36666657
Change-Id: I6658edb766d8ba3120f88e3d8d6eda6ea6c691da
Modules compiled with javac 1.7 may have LOCAL_STATIC_JAVA_LIBRARIES
pointing to jars that contain code compiled with javac 1.8, and may
need desugaring.
Test: m -j ANDROID_COMPILE_WITH_JACK=false checkbuild
Change-Id: I470fc0a2fba51179a3ef95986cb3030194cd8f1c
Static java libraires are designed to be included in another
java library. If desugar runs on the static java library,
the resulting jar will contain the desugared lambda classes.
When the static jar is included into another java library
and desugar runs again, it desugars the static java library
classes again, producing the same desugared lambda classes
and colliding in the final jar.
Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I0508b2cc9c56dbbd4ac0aba44fb99ea2a27715e0
The new javac/desugar/proguard/dx based toolchain can fail if
there are duplicate classes in the -injars and -libraryjars
passed to proguard. That causes problems for b/30188076 which
is attempting to remove various junit and android.test classes
from the API because it requires the changes to add those
classes statically to applications are submitted simultaneously
with the change to remove the classes from the API which is not
feasible.
This change simply causes Proguard to ignore the classes from
the application JAR so it will always use them from the library.
That allows the changes to be done separately and only requires
that this change is reverted simultaneously with the change to
update the API.
Bug: 30188076
Test: make checkbuild and make -j ANDROID_FORCE_JACK_ENABLED=disabled checkbuild
Change-Id: I6ed6c45a159d6261d90245551aa2913cc82d2e8b
Emma is unable to process framework.jar, and making framework
classes.jar depend on the emma output causes builds to fail when
emma is enabled. Make classes.jar depend on the jarjar output
instead, bypassing emma for now.
Test: m -j EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true check-public-api
Change-Id: I861282292816e29ca27b67a3eef978d951c1a4dc
This enables support for lambdas by passing class files through the
desugar tool.
Test: m -j checkbuild tests cts
Change-Id: I14ec152355243fd67fe2f107ccbe67a1b4e7e262
This reverts commit a341bf0f86.
Breaks grok builds that replace javac with another tool:
reading standard input: bufio.Scanner: token too long
Change-Id: I825587c465b05c1fbddb7794dc1c84f5f2c883d1
This is a partial revert of commits:
858657366f Remove support of disabling Jack.
3ae7861252 Remove javac support in host dex rules.
22313f2b2a Remove rules for building dex with dx
Test: builds
Change-Id: Ie12d743cbe978bdeb030910848b67f5945a4fec8
Just move the proto and renderscript sources into their own directories
-- the entire directory is wiped if the file list changes since the
command line will change. So we can just enable/disable pulling sources
from those directories based on whether there were files in the list or
not.
Bug: 30947985
Test: m -j java
Test: Remove a proto file from a java lib, ensure the generated source
is not included.
Change-Id: If7529979de6fa62a651933a3a974f47b033851d6
This will allow individual modules to enable error prone checks
as needed so that the change to treat an error prone check as a
compiler error can be done atomically with the changes to fix
the issues that check reveals.
Tested with the following steps, cleaning up the targets in
between to ensure that it was rebuilt everytime.
Set LOCAL_ERROR_PRONE_FLAGS := -Xep:ClassCanBeStatic:WARN
compiler error in junit-params-test target. Built
javac-check-junit-params-test with RUN_ERROR_PRONE=true to make
sure that compilation failed.
Built the javac-check-junit-params-test without RUN_ERROR_PRONE
set to make sure that the flag is not included unless explicitly
requested.
Built the junit-params-test as normal to make sure it still
worked properly.
Bug: 31507496
Test: See above
Change-Id: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
Changed to LOCAL_JACK_PLUGIN.
(cherry picked from commit 17924b136cb5bfc60d138e8c7e5c18a90b5965c3)
Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I1be4aaa502103fc308d35a5672dc4fe5900c4ebe
And ensure compatibility with coverage plugin.
(cherry picked from commit 862bb84d37e3e6ca61080de58f206e512e09d4e0)
Bug: 28876950
Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I804558a501825357bf0812de626d2957eedbdc13
This is needed in order to be able to run error prone (which is
a plugin replacement for javac) on a subset of the java code.
Bug: 31507496
Test: Build javac-check-core-tests and check the resulting JAR
Change-Id: I5a556920572fcdad7b39d67e3f00fe0e0f1f8f46
am: bd65cc3
* commit 'bd65cc387b1becad1b9c5179f7932bd339b8cf9f':
Allow to force min sdk given to Jack
Change-Id: I55b673b0bb52e4f6f3d4265279528e353a157550
Allows setting the min sdk version for target Jack commands,
overriding the default value obtained from LOCAL_SDK_CURRENT.
Bug: 28188420
(cherry picked from commit 109141ccc9)
Change-Id: Id9c5275bc71b8d9042173bf1e40aa3199e9508e6
Allows setting the min sdk version for target Jack commands,
overriding the default value obtained from LOCAL_SDK_CURRENT.
Bug: 28188420
Change-Id: I1b84ad8a7b6ae30639f8ade455c1e542af5692e4
Replaces old LOCAL_EMMA_COVERAGE_FILTER by new variables:
- LOCAL_JACK_COVERAGE_INCLUDE_FILTER for included classes
- LOCAL_JACK_COVERAGE_EXCLUDE_FILTER for excluded classes
Both variables can contain a comma-separated list of class names,
where * and ? are accepted wildcard (like foo.?ar.*).
When code coverage is enabled, we will use these variables to
pass code coverage filters on the Jack command-line.
Bug: 28014424
(cherry picked from commit 74ec3f49d1)
Change-Id: Ie4253981c0e6a62422ab84dfd67ef5eebc0b0284
Replaces old LOCAL_EMMA_COVERAGE_FILTER by new variables:
- LOCAL_JACK_COVERAGE_INCLUDE_FILTER for included classes
- LOCAL_JACK_COVERAGE_EXCLUDE_FILTER for excluded classes
Both variables can contain a comma-separated list of class names,
where * and ? are accepted wildcard (like foo.?ar.*).
When code coverage is enabled, we will use these variables to
pass code coverage filters on the Jack command-line.
Bug: 28014424
Change-Id: Ic29c99b6feb7ea2251c29d659e7ea1f1c46d1ed1
We removed code and variables related to running dx on classes.jar in
this change. Also removed target emma rules (but kept the emma rules for
host java libraries), for it's now done by Jack.
We still support to build classes.jar (and javalib.jar for static Java
libraries) using javac, because tools like javadoc need class files as
input.
Removed the obsolete install-dex-debug.
Bug: 27400061
Change-Id: If0bcdfe62cb181a98754fb0dbe1c12c92e38d3e8
We no longer use emma with Jack. However, during the process of a
full build, we may run the emma task and overwrite the coverage file
generated by Jack with the one from emma because they use the same
filename.
This CL renames coverage files generated by emma so they no longer
break those created by Jack.
Keep coverage.em file name for host rules where Jack is not called.
Bug: 27822188
(cherry picked from commit 491c9ce48a
&& commit 8f0e52c3a6)
Change-Id: I26beee5a8d42a2ef1d476661e4b591fb09f1276f
We no longer use emma with Jack. However, during the process of a
full build, we may run the emma task and overwrite the coverage file
generated by Jack with the one from emma because they use the same
filename.
This CL renames coverage files generated by emma so they no longer
break those created by Jack.
Bug: 27822188
Change-Id: Ie3fdc2b8f53deafbefbd6973e39f29d8c46f371e
We don't need to run rmtypedefs in javac compilation now, because the
runtime libraries are compiled by only jack, which takes care of
rmtypedefs by itself.
Bug: 27828139
Change-Id: Ie480ae5aead8f3f58f956978fc4a05c28a35dec6
javac-check covers all classes.jars that are compiled with javac
instead of jack. This target is required by tools that still need java
class files as input.
Bug: 26705771
Change-Id: I6896b9a6026a2a0dae6145d1ef5a839756aa3458
This is just to ensure no dex file is built with dx any more, cleaning
of the build rules from Jack optionality is still to be done.
Bug: 27218410
(cherry picked from commit 22313f2b2a)
Change-Id: I1e7f2f5dcc7f95a44f5ebf2e4ba99931ff3ba014
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.
Bug: 27371864
(cherry picked from commit c6383d6ec6)
Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.
Bug: 27371864
Change-Id: I5db233fe09aed0fae37fe9a92658bc8f24b86cdf
This is just to ensure no dex file is built with dx any more, cleaning
of the build rules from Jack optionality is still to be done.
Bug: 27218410
Change-Id: Iea2c66802b6c64c52690ad9d6d487bdce5f50b79
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.
Bug: 27371864
Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.
Bug: 19069325
(cherry picked from commit 43084d9f49)
Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.
Bug: 19069325
(cherry picked from commit 43084d9f49)
Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
And everything special-cased on that. Add a warning if USE_NINJA is
set to let users know that it no longer changes anything.
Change-Id: Ib8739151fe26ea6bf8f76b7ac2b8f4097dab0b47
- Switch to static library's package-res.apk as the link artifact.
- For prebuilt AAR file, build package-res.apk using aapt2's "--dir"
option.
- New LOCAL variables:
LOCAL_USE_AAPT2: a module can opt-in with "LOCAL_USE_AAPT2 := true".
LOCAL_STATIC_ANDROID_LIBRARIES: static Java libraries with compiled
resources.
LOCAL_SHARED_ANDROID_LIBRARIES: shared Java libraries with compiled
resources.
Bug: 25958912
Change-Id: I4be2d1e8137555986338c2583cb39b0c97391751
This is a reland of 4c474617d4
This time, we use awk instead of sed, and the script works
on Mac.
For C++ code llvm-rs-cc defines two targets but it defines
three targets for Java. The sed script was updated to handle
both cases appropriately.
Bug: 26839129
Change-Id: I1bca7d253764554d552950e03deedabaa9b7f17e
This is similar to 2e45fd036a
but this CL is for generated java code.
For C++ code llvm-rs-cc defines two targets but it defines
three targets for Java. The sed script was updated to handle
both cases appropriately.
Bug: 26839129
Change-Id: I5c7705c67f3c65c4c14f74558e603f8ec9f35879
Building an app with Jack and with the environment variable
EMMA_INSTRUMENT_STATIC set to true will apply code coverage
onto the app targeting Jacoco.
Bug: 20115492
Change-Id: Ief3640fa3faa466f7f6aaa9739e06d3db24110a0
To build with AAPT2, set "USE_AAPT2=true".
TODO: Support split apks and generated resources from other than renderscript.
Bug: 25958912
Change-Id: I19b1a038824ce5b2a3d3ffadbce3173c845193fc
The .dex.toc files are created by dexdump, which outputs all
information in a .dex file which may affect compilation of
other modules.
For prebuilt java libraries and static java libraries, we'll
output empty .toc files and don't set restat=1. .dex.toc files
are necessary even for static java libraries because they can
be referenced by LOCAL_JAVA_LIBRARIES (instead of
LOCAL_STATIC_JAVA_LIBRARIES).
We don't use this optimization for apps build. We cannot build
dexdump for apps build due to lack of libc++.
Performance:
$ m && touch \
frameworks/base/core/java/com/google/android/util/Procedure.java \
&& time m
Before: 3m48s
After: 1m46s
Bug: 24597504
Change-Id: Id1665923b414dee705dc60af4c021390a19ea26f
Also install and update the server if necessary.
The target start-jack-server produces no file so it's always built.
Since the dependency is "order only", it doesn't cause force rebuilt of
jack targets after start-jack-server execution.
Bug: 25443108
Change-Id: I1608d87d186694d47307e00337b1905f0b8079c4
am: dbeab8de65
* commit 'dbeab8de6543db1d0393789cb18ee7fd7ed8fedd':
Use libstdc++ for ijar
Build ijar for apps build
Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
The same optimization was done for binaries in
https://android-review.googlesource.com/#/c/175250/
To create a TOC file from .jar files, this change introduces
ijar, which is designed for this purpose. Only #include lines
were modified from the original version.
https://github.com/bazelbuild/bazel/tree/master/third_party/ijar
Performance:
$ m && touch
frameworks/base/core/java/com/google/android/util/Procedure.java && time
m
Before: 4m30s (1580 targets)
After: 3m57s (772 targets)
Unfortunately, the improvement is small yet, but local
experiments showed we can cut ~2 more minutes if the similar
optimization is done for .dex files.
(cherry picked from commit c1f5d9c203)
Bug: 24597504
Change-Id: Iec3b2b0b0e674bee5d80cce3c300dc8fad6e7c13
The same optimization was done for binaries in
https://android-review.googlesource.com/#/c/175250/
To create a TOC file from .jar files, this change introduces
ijar, which is designed for this purpose. Only #include lines
were modified from the original version.
https://github.com/bazelbuild/bazel/tree/master/third_party/ijar
Performance:
$ m && touch
frameworks/base/core/java/com/google/android/util/Procedure.java && time
m
Before: 4m30s (1580 targets)
After: 3m57s (772 targets)
Unfortunately, the improvement is small yet, but local
experiments showed we can cut ~2 more minutes if the similar
optimization is done for .dex files.
Bug: 24597504
Change-Id: Id54953aea25e497c8ebbe783b03f13b488577c6a
Use LOCAL_FINDBUGS_FLAGS to specify findbugs command line flags.
To use findbugs filters:
LOCAL_FINDBUGS_FLAGS := -exclude $(LOCAL_PATH)/exclude.xml -include \
$(LOCAL_PATH)/include.xml
where exclude.xml and include.xml are filter files.
The build system automatically adds the filter files as dependency of
findbugs' output xml.
Bug: 24948760
Change-Id: I82502c0ade910c5255001fa5f390316137ce0be6
Version of Jack used to compile a module can now be control from
a dedicated mk located in prebuilts/sdk/tools
Bug: 24564814
(cherry picked from commit b68c9a498d)
Change-Id: I7809dc966026ff94b5cb2daa7e2c63762ca4768d
This is possible now that we have the new Jack server.
Also fix dependency from dex/jack target to jack script
instead of jack.jar.
(cherry picked from commit 5e50b34221)
Change-Id: I8e7aa5087ba8d73cc93140ddfca8f4ab2f505175
Version of Jack used to compile a module can now be control from
a dedicated mk located in prebuilts/sdk/tools
Bug: 24564814
Change-Id: Ie8120c97e0fa10953d4d015afd27aacfac80e5b6