Make common.Glob take an interface that is the intersection of
blueprint.ModuleContext and blueprint.SingletonContext used by
Glob and GlobRule, allowing it to be called on either. Also
move ExpandSources and Glob into AndroidModuleContext.
Change-Id: I8d1a3160c5dd201033afdb37210e82d8065b137d
Various build rule changes to match AOSP:
Add libunwind_llvm and libdl as dependencies for libc++ on device
Always add libcompiler_rt-extras as a dependency
Add libm, libc, and libdl as depnendencies for libc++ static binaries
Disable some clang warnings, and add some clang filtered cflags
Add -fstack-protector to host linux builds
Add jack_flags property to java modules (currently ignored)
Change-Id: Ic0da617bdeaf25f58cb8298dd9ea91b7d6509151
Handle java resource globbing in two passes, the first on the
list of resource dirs to produce a list of directories, and the
second to glob for files inside those directories using **/*.
Fixes incorrect jarSpec dir errors when the resource directories
list contains globs.
Change-Id: Icea5d8178336eb7de4ad91a9acba4822423d9f60
Delete package-export.apk before rebuilding to avoid aapt warnings
about using -f on existing packages.
Change-Id: I189486c4b3bd5fa46eff2e3b6a244d28329e7f02
Now that we use extractPrebuilts to extract compiled classes from
jars after jarjar, it needs to extract to a different directory
than used when compiling. Extract them to extracted/classes. Also
move the classes.list and resources.list file out of the classes
directory so they don't find themselves and end up in downstream
jars.
Change-Id: I070323466858edc7e33e14207c98f77d540882f3
Add support for running aapt to generate R.java and Manifest.java,
compiling java into jar, adding resources to the jar to convert it
into an apk, signing the apk, and zipaligning the apk.
Change-Id: I7a73fef590d07f35b3d0b56a8571780c09bb10ae
Store the jar output file for the app build to use.
Allow module types built on top of javaBase to provide filelist files
containing source files.
Allow module types built on top of javaBase to insert dependencies through
JavaDynamicDependencies.
Allow any java module to depend on framework-res.apk.
Move the install rule from javaBase to JavaLibrary.
Change-Id: I46e7e80139845ef7cc89daf180bddbdf77125555
framework.jar needs to compile against R.java and Manifest.java from
framework-res.apk. Rather than complicating the Blueprints properties
with values that will only be used once, add one-off logic to
collectDeps to extract the rJarSpec out of the framework-res module.
Change-Id: I1195b1b5e07badc583703479382ceba35300b8fd
Java vs. Android resource directories are already confusing enough,
rename resource_dirs to java_resource_dirs to make room for
android_resource_dirs.
Change-Id: Iffd087860b98df29e81d8d2f823be87c8227e614
aidlFlags gets specified for every aidl file. Use a module scoped
ninja variable to hold the aidl flags, and while we're at it do the
same for javacFlags.
Change-Id: I980f0006c41918154ab0479d56387630a7e1d677
SDK prebuilts need to be treated differently than other prebuilts.
They are used like a normal Java prebuilts when compiling java files,
but they are also used as aapt includes when compiling apps, and they
provide prebuilt aidl files when compiling aidl sources. Create a
new module type so dependers can determine what kind of dependency
they are.
Change-Id: If426da63cfadcb4b14abda58c7b346554912a07a
Add support for converting logtags files to source files. Each
.logtags file is converted to a .java file, but only after all
.logtags files have been combined into a merged text file by
the logtagsSingleton.
Change-Id: I375d82874029bd26a7c528e46add2a638ba123f9
jarjar modifies the .class files in a jar, when using static java
library dependencies we need to use the modified class files and
not the ones that javac produced. If jarjar is enabled, use
the prebuilt jar extractor to get the classes out of classes-jarjar.jar
and export them through j.classJarSpecs.
Change-Id: Ia2854f1c26d630da12cab7c421007aad4f793ecd
Remove java out directory before compiling to avoid incremental compile
issues. Move the rspfile out of the out directory so it doesn't get
deleted. cc->javac in the javac rule. Don't call javac if there
are no source files.
Change-Id: I0bb06c214da54a587bd9e7c9d17caaf0ed1e595e
Add support for aidl files listed in srcs for java builds, and
an aidl_preprocess module type for framework and sdk aidls.
Change-Id: I3aa537f4483822e5b534c74d0b35f13a938f8947
If a java library only links against the same jar as bootclasspath,
the jar was being added to classpath and not bootclasspath, leaving
bootclasspath blank and using the default bootclasspath. Reverse
the order so that bootclasspath takes effect.
Change-Id: Ib9fbf01897314a57228013d4aef52606390b0aca
Support -file or -path/glob in file lists that contain globs to
subtract files from the resulting glob. Also move source file
prefixing and handling into a common function.
Change-Id: Ib6d74ce22f53cae7348c4ba35b779976d90359a6
Using ctx.Config().(Config) everywhere is a mouthful, and it is
inefficient to do the type assertion. Put the Config interface into
the context, and provide an AConfig() to return the Config already
converted to the right type.
Change-Id: I301a1fd7d2a005580aabca7866a37c5d42ad8c69
Extract files out of prebuilt libraries and create list files
for classes and resources in order to allow including them in
other jars.
Change-Id: I9269d1fd6e0f570811a00bf319098ac1f7cdc816
Add support for compiling java libraries (.jar files with
or without .dex), java binaries (.jar files with a wrapper
script to run them), and java prebuilts (for the SDK .jars)
Change-Id: Id624da64c92cf20c6d9577c6bb06e5b212af0d1b