- You can give a .aar as source file to a prebuilt static Java library
module. The build system will set up dependencies and rules to extract
classes.jar and other resource files.
- To build against a prebuilt AAR module, use:
LOCAL_STATIC_JAVA_AAR_LIBRARIES := <module names of aar prebuilt AARs>
The build system will set up rules to merge the library's
AndroidManifest.xml with the main AndroidManifest.xml, add the AAR's
resource dirs and link/merge the AAR's classes.jar.
Bug: 18168693
Change-Id: I478913d5d498f800b322529d7c2c2c0ea78425e5
If a module is explicitly depending on a versioned protolib, we strip
the dependency and log a warning so the unneeded dependency can be
removed.
Change-Id: I949d32fb5126f1c05e2a6ed48f6636a4a9b15a48
By adding 'shrinktests' to LOCAL_PROGUARD_ENABLED, the -dontshrink
flag will be omitted from the resulting proguard config allowing
tests to have unnecessary classes removed before dexxing.
Clockwork is running into 64k method limits on some tests which
depend on GmsCore. On 4.4W (klp-modular-dev) we don't have the
option for multi-dex so proguard is the only solution here.
This change leaves the default behavior unchanged. Shrinking is
still disabled for tests by default unless the 'shrinktests'
flag is set in the Makefile.
Change-Id: Ib586ae9e7f617072b41e95742559bf7c8a6a6ce1
A module can declare "LOCAL_SDK_VERSION := system_current" to build
against the android system stubs generated from source.
For now this is only supported in platform build.
Change-Id: I1e9bbd159886bc0ea3a02b1dc4cbcb1a56e9cb15
Dx is now capable of generating multiple dex file in one run.
This capability is not compatible with --output=*.dex so this CL
changes the --output argument to be a directory. This CL also
includes the packaging of the multiple dex files when dx generates
more than one dex file.
(cherry picked from commit 8ffe9c3e79)
Conflicts:
core/java.mk
Change-Id: I1ddc91b416de5929d4d4b41824c6012b32f94deb
Allow LOCAL_JAR_PACKAGES to work on subpackages. Previously it
only worked on top-level packages due to a bug in how the directories
were recursively deleted.
Add LOCAL_JAR_EXCLUDE_PACKAGES to allow specific subpackages to
be excluded. This rule applies after LOCAL_JAR_PACKAGES has
selected which packages to include. It may also be used independently.
Change-Id: Ibd0e495be1a20c84b59c9da132e92100ef3f8705
This enables the .so libraries to be built for apps using the
RenderScript support library. Traditionally, we trim these .so
files from full platform builds.
Change-Id: I6f8e9b8d2b671338d3d5a5ac0bfcc60fd448688b
This enables the .so libraries to be built for apps using the
RenderScript support library. Traditionally, we trim these .so
files from full platform builds.
Change-Id: I6f8e9b8d2b671338d3d5a5ac0bfcc60fd448688b
Since we have enabled Progaurd for all build variants, we don't need the
different naming scheme along the path to make incremental build work
properly when you switch build variant.
As a result, this fixes the nothing-to-do-do-build-gets-something-build bug
introduced by the multi-dex change.
Change-Id: I907ff13091013d28910b0aa190b9218144385132
Since we have enabled Progaurd for all build variants, we don't need the
different naming scheme along the path to make incremental build work
properly when you switch build variant.
As a result, this fixes the nothing-to-do-do-build-gets-something-build bug
introduced by the multi-dex change.
Change-Id: I907ff13091013d28910b0aa190b9218144385132
With this change, use:
* LOCAL_PROGUARD_ENABLED := obfuscation # to enable obfuscation
* LOCAL_PROGUARD_ENABLED := optimization # to enable optimization
* LOCAL_PROGUARD_ENABLED := obfuscation optimization # to enable both
Now the meaning of the LOCAL_PROGUARD_ENABLED options:
* full:
Use the build system's default configurations:
with shrink but no obfuscation or optimization,
global proguard flags in build/core/proguard.flags
are applied.
* custom:
The same as "full" except no aapt-generated resource-related
proguard flags.
* nosystem:
Don't use any build system's default configurations; but
aapt-generated proguard flags are still applied. You are
responsible for any other flags.
* disabled:
Disable proguard.
* obfuscation:
The same as "full" but with obfuscation enabled.
* optimization:
The same as "full" but with optimization enabled.
* no value (the default):
The build system chooses the proper value: "full" if it's an
app; "disabled" if it's a library.
You can use more than 1 of them in a meaningful combination,
for example:
LOCAL_PROGUARD_ENABLED := obfuscation optimization
Bug: 10307372
Change-Id: Id248caca3048e99547f16559fae74f4afe85c354
Dx is now capable of generating multiple dex file in one run.
This capability is not compatible with --output=*.dex so this CL
changes the --output argument to be a directory. This CL also
includes the packaging of the multiple dex files when dx generates
more than one dex file.
Change-Id: I1ddc91b416de5929d4d4b41824c6012b32f94deb
Changes to the jarjar rules file for a module were not causing
rebuilds; add the missing dependency.
Change-Id: Ib78fa708681cbc414218fe84cc2c4282c619f45f
If we don't do "-lc", we end up missing symbols like "memset" on our non-NEON
builds. It also makes more sense to have bcc_compat as a standard dependency
for now, since it occasionally changes the way we compile/link our source
files.
Change-Id: I4b0ead66caa7c72fb7733db8804a33faa5350930
This change piggybacks Filterscript rules onto the existing Renderscript
rules. There is no real difference other than the file extension (which
llvm-rs-cc uses to apply a more stringent set of warnings/errors).
Bug: 7166741
Change-Id: I27175ff1c16c27129cafa92b4e8caabf2e5f4150
Bug: 6987838
- With this change, use "EMMA_INSTRUMENT=true" to enable emma in full or
unbundled build.
- You don't need to add "LOCAL_STATIC_JAVA_LIBRARIES += emma" any more for
unbundled apps.
- Now a single var LOCAL_EMMA_INSTRUMENT replaces the previous
LOCAL_NO_EMMA_INSTRUMENT and LOCAL_NO_EMMA_COMPILE.
- By default, if EMMA_INSTRUMENT is true, emma is enabled for only
non-test apps.
- A new global var EMMA_INSTRUMENT_STATIC. It enables EMMA_INSTRUMENT
and builds emma into apk/jar as static library, instead of using emma
as part of shared library core.jar.
Change-Id: I0aa219e83074879ececc159b5b07c39eb07ccc00
Based on existing setup, when EMMA_INSTRUMENT is used on a full
build, all Java modules will be processed with emma instrument
unless otherwise marked in their own Makefiles.
For the purpose of collecting code coverage, emma-instrument
all Java modules aren't that useful, instead, instrumenting all
the app packages is more useful. This change adds a new flag
EMMA_FULL_APP_INSTRUMENT, which can be used with a full build
to instrument all app packages.
Change-Id: Ie143fed49c23402b21f6cccac2ef25741726be45
Set "LOCAL_SOURCE_FILES_ALL_GENERATED := true" if you want to build a
Java library from only generated source files, without any static
source files. Previously this is not allowed.
This is needed by building api stub libraries, which have only source
files of generated stub files.
Bug: 6814443
Change-Id: Idb2ae9c71a473b796154a03ef07a3403461c4f3c
- three levels: not defined, sdk, platform
- TARGET_BUILD_PDK_JAVA_PLATFORM gives the original meaning of java platform API
supported for java.mk
- remove libexif from user tag
- libexif_jni is pulled from f/b/media
Bug: 6623618
Change-Id: I5fa085bd10f43963350c57b7f885c700de8963e5
- make platform-java will add necessary Java stuffs from out/target/common/
to platform.zip
- make platform works as before: no Java libraries
- normal fusion build will pick up the file, and define TARGET_BUILD_PDK_JAVA
besides TARGET_BUILD_PDK if Java stuffs are included
- For TARGET_BUILD_PDK_JAVA, java.mk does not touch LOCAL_SDK_VERSION, which will lead into
pulling non-SDK Java APIs
Bug: 6482799
Change-Id: I90b1a0b06dc774150711680a6612f2b97b9eab3f
Bug: 6465084
With this change and prebuilt current SDK checked in, you can build
unbundled apps with LOCAL_SDK_VERSION current in an unbundled branch.
Change-Id: I4efcee611d08a3a903bd6bf5a80de11500564206
This is part of the multi-project commit to move the filter-framework
from system/media/mca to frameworks/base/media/mca.
Note that the filter-framework will soon be replaced with a refactored
version currently under API review (also to go under frameworks/base).
This move is done now to unblock the PDK efforts.
Change-Id: I3d12882239e0bb66e11d3fb5ec952cc474be4f0a
Bug: 5448433
Instead of deferring the removal to building the app.
In that case any R/Manifest classes in any static Java libraries will be
deleted, no matter if they are generated from Android resource, or just
source R.java/Manifest.java in the source tree by accident.
Change-Id: I656f45e3cbc3796c5d4832363231480b3f1dc5b8
BUG=5206223
This allows us to set the RS API level independent of the other SDK
versions that a developer might choose.
Change-Id: Id8b476abcbbbdaa86e04ba0ea16414cb2fa5bd15
Since classes from this jar are part of the public API, it should be
included by default.
Also add the jar into the dex_preopt list.
Bug: 5098987
Change-Id: Ib39deffea43714eb56630ad1d65411cfde5878fd