- This is in preparation for split apks, where we'll need to call
apkbuilder multiple times.
- This also makes including a classes.dex file optional
BUG=484797
Review URL: https://codereview.chromium.org/1138953003
Cr-Original-Commit-Position: refs/heads/master@{#330159}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8dabdfa9a758f7a7ac73fa4f5bbc657183b1a3e2
This ant script is basically a simple wrapper around an aapt call (the
only thing the large AaptExecTask custom ant task adds is a bunch of
dependency checking that we don't actually want anyway). This
makes it use python instead.
BUG=359249,375324,375431
NOTRY=true
Review URL: https://codereview.chromium.org/291963002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@273326 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Reason for revert:
Suspected for android compile failure on waterfall starting
http://build.chromium.org/p/chromium/builders/Android/builds/24321
Errors are pretty obscure. Things like
BUILD FAILED
/b/build/slave/Android/build/src/build/android/ant/apk-obfuscate.xml:161: /b/build/slave/Android/build/src/out/Release/multiple_proguards_test_apk/proguard.txt (No such file or directory)
at proguard.ant.ConfigurationTask.addText(ConfigurationTask.java:315)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
FAILED: cd ../../build/android/tests/multiple_proguards; /*snip*/ build/android/ant/apk-obfuscate.xml
Traceback (most recent call last):
File "../../../../build/android/gyp/ant.py", line 34, in main
stdout = build_utils.CheckOutput(['ant'] + verbose_args)
File "/b/build/slave/Android/build/src/build/android/gyp/util/build_utils.py", line 113, in CheckOutput
raise CalledProcessError(cwd, args, stdout + stderr)
Original issue's description:
> Remove apk-codegen.xml
>
> process_resources.py already implements almost everything from
> apk-codegen.xml so just use that instead.
>
> BUG=359249,375324,375431
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272783TBR=yfriedman@chromium.org,cjhopman@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=359249,375324,375431
Review URL: https://codereview.chromium.org/301543002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@272795 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
apkbuilder only uses sourcefolder to package non-java files (see
addSourceFolder() and checkFileForPackaging() in
e162064a7b/sdkmanager/libs/sdklib/src/com/android/sdklib/build/ApkBuilder.java ),
and our java/src folders only contain .java (and OWNERS) files.
(Determined via `find . -type f -a -path '*/src/*' -a -not -name '*.java'` and
manually ignoring everything not looking like a java folder.)
No intended behavior change; Chrome.apk looks identical with and without
this change (except for timestamps).
BUG=none
NOTRY=true
Review URL: https://codereview.chromium.org/212173003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@260047 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
After much work, we can build gtest APKs without first transforming .java files, resource files, or the AndroidManifest.xml. We can directly use java_apk.gypi and build like all other APKs.
Do that.
Also, native_test_apk.xml was the last user of common.xml and sdk-targets.xml, and so those can now be removed.
Review URL: https://chromiumcodereview.appspot.com/13828003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@193576 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Splits apk-package.xml into apk-package.xml and
apk-package-resources.xml and adds a new gyp action for
package-resources.
This continues the simplification of gyp actions (i.e. each individual
action should be simple).
Also, allows more accurate specification of inputs for
-package-resources vs -package (and allows -package-resources to be
done in parallel with javac/dex/etc.).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13811027
git-svn-id: http://src.chromium.org/svn/trunk/src/build@193491 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Currently, normal APKs and instrumentation APKs are both built using
java_apk.gypi (which includes all kinds of new hotness). Native
unittest APKs, though use apk_test.gypi and thus the complicated
native_test_apk.xml and Android's Ant build.xml. That is bad.
This change updates apk_test.gypi to include java_apk.gypi and so
brings these two ways of building APKs into alignment. It also very
slightly updates the configurability of java_apk.gypi and
apk-package.xml.
There are still a couple of targets in WebKit that use
generate_native_test.py and native_test_apk.xml directly that need to
be updated to use apk_test.gypi before those two scripts can be
simplified/removed.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13564003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@192662 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
With gyp_managed_install no shared libraries should be packaged in the
APK (except gdbserver).
When toggling gyp_managed_install, there may be left over libraries in
<(intermediate_dir)/libs. APK packaging should use a different
directory when doing a managed install, so that it does not include the
library from a non-gyp_managed_install build.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13651003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@192617 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Proguard should only be run in Release mode (in gyp, proguard_enabled is
not set based on the configuration). This is the way that we had
been determining whether or not to run proguard before recent Ant
refactoring.
Also, proguard needs the path to the android.jar
BUG=224079
Review URL: https://chromiumcodereview.appspot.com/12922004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190876 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
In preparation for rewriting these actions in python, split apk-build.xml into smaller ant scripts. This should not change the functionality and mostly is just splitting the file and identifying the properties and defines required for each of the new files.
Some of the configuration is moved out of ant and into gyp (i.e. the android_manifest_path is now gyp-configurable).
Also, the ant scripts now use the correct basedir! That is, these ant scripts actually understand relative paths. To go along with this, resource_dir is the relative path to the resource directory (rather than a path relative to java_in_dir).
BUG=158821
TBR=torne@chromium.org, brettw@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12963009
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190712 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is a fairly straightforward translation of the ant build script
into two python actions.
Two things have been moved into the gyp file: adding android.jar to the
classpath and specifying the jar_excludes (currently just R.class and
R$*.class).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/12853002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188594 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This change makes the behavior of apk-build.xml much clearer.
First, delete several empty targets:
-pre-build
-post-build
-set-mode-check
-post-package
-set-debug-files
Then, merge chains of targets (i.e. only -compile depends on
-pre-compile and so they can be merged into one target).
check-env --> -setup
-pre-compile and -post-compile --> -compile
-crunch --> -package-resources
-release-sign --> release
-do-debug --> debug
-release-obfuscation-check --> -set-release-mode
-debug-obfuscation-check --> -set-debug-mode
-build-setup --> -setup
Then, rearrange the targets so that they are in the order that they are
run.
Finally, delete some small unused things (mergemanifest, buildconfig).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/12808004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188548 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Android's build script uses record-build-info to determine when the build type
has changed and things need to be rebuilt. We use gyp to tell us when to
rebuild things and ant should always do it. Remove this macro and inline the
corresponding empty strings.
BUG=158821
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12617005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188128 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is mostly dealing with the code for library dependencies. Our
library dependencies are handled through gyp, and not by ant. The
dependency task that is removed calculates only empty paths for each of
its arguments (some are already set above and are immutable).
BUG=158821
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12595008
git-svn-id: http://src.chromium.org/svn/trunk/src/build@187911 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This removes a bunch of the ant properties and targets that are never
used in our builds. These are related to: installing apks, running
tests, emma instrumentation, lint, help, clean, building library
dependencies, building main apk for test apks, renderscript, and asking
for keystore password.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/12701012
git-svn-id: http://src.chromium.org/svn/trunk/src/build@187735 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
First check in a copy of
third_party/android_tools/sdk/tools/ant/build.xml as
build/android/ant/apk-build.xml
Previously we were overriding targets from this build.xml
in build/android/ant/sdk-targets.xml. Instead of doing this
override, just replace the actual targets in apk-build.xml.
Do the same for properties that we were overriding in
build/android/ant/chromium-apk.xml.
Both of these have no logical change on these build scripts.
Ant's targets and properties are immutable and so Ant was
doing this exact thing already.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/12599005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@187483 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
We were using package_name as a unique name for naming output files and
directories. package_name was typically the same as _target_name or a
variation of it (like dropping _apk). Using _target_name instead means
we need to specify one less thing and it is (maybe?) guaranteed to be
unique.
TBR=brettw,joi,jar,fischman,zea,sky
BUG=
Review URL: https://chromiumcodereview.appspot.com/11308030
git-svn-id: http://src.chromium.org/svn/trunk/src/build@183639 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Some fixes included:
- Changes to resource management to account for new R.java packaging
from library projects
(https://android-review.googlesource.com/#/c/43134/).
- Fixed the package for some inludes in ModalDialogTest.java. This only
worked because of how we previously used to aggregate all resoures
from the prior layer. With the new packaging, we must use the resource
from the appropriate layer.
BUG=163001,166434
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11819047
git-svn-id: http://src.chromium.org/svn/trunk/src/build@176176 4ff67af0-8c30-449e-8e8b-ad334ec8d88c