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 enables Android layouts and Java code to use strings from
generated_resources.grd directly. Strings tagged with
formatter_data="android_java" in generated_resources.grd are used to produce an
Android strings xml file.
BUG=176069
Review URL: https://chromiumcodereview.appspot.com/12529025
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190573 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
This appends the list of inputs to the ant and process_resources.py
commands. Thus when the list of inputs changes, the command line
changes, and ninja will re-run the command.
This will be removed once ninja is updated to automatically rebuild
when the input list changes.
BUG=177449,177552
Review URL: https://chromiumcodereview.appspot.com/12379066
git-svn-id: http://src.chromium.org/svn/trunk/src/build@186299 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
Failed to rename package name in buildbot scripts. Broke buildbots.
> Add apk for running content_browsertests
>
> Split off org.chromium.content_shell into:
> org.chromium.content_shell - content shell java code, builds a jar, directory structure similar to other jar targets
> org.chromium.content_shell_apk - application code to build content_shell_apk, directory structure similar to that of android application
> org.chromium.content_browsertests_apk - application code to build content_browsertests_apk
>
> Also splitting content/shell/android/res into:
> - content/shell/android/java/res
> - content/shell/android/shell_apk/res
>
> Both content_shell_apk and content_browsertests_apk will depend on content_shell_java target to include java/res needed to show a shell based browser.
>
> I will do another CL to move The java files for content_shell_tests_apk to content_shell_apk package.
>
> BUG=138275
>
>
> Review URL: https://chromiumcodereview.appspot.com/12047068TBR=nileshagrawal@chromium.org
Review URL: https://codereview.chromium.org/12088031
git-svn-id: http://src.chromium.org/svn/trunk/src/build@179211 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Split off org.chromium.content_shell into:
org.chromium.content_shell - content shell java code, builds a jar, directory structure similar to other jar targets
org.chromium.content_shell_apk - application code to build content_shell_apk, directory structure similar to that of android application
org.chromium.content_browsertests_apk - application code to build content_browsertests_apk
Also splitting content/shell/android/res into:
- content/shell/android/java/res
- content/shell/android/shell_apk/res
Both content_shell_apk and content_browsertests_apk will depend on content_shell_java target to include java/res needed to show a shell based browser.
I will do another CL to move The java files for content_shell_tests_apk to content_shell_apk package.
BUG=138275
Review URL: https://chromiumcodereview.appspot.com/12047068
git-svn-id: http://src.chromium.org/svn/trunk/src/build@179189 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This generates localized strings.xml files (e.g.
values-fr/strings.xml) from grd and xtb files at build time. This
means we no longer need to check in localized strings.xml files. Note:
the xtb files are empty until translations are available.
Benefits:
- 41 fewer extraneous results when grepping Java string IDs
- Switching from maintaining strings in strings.xml over to using a
grd file is One Trivial CL* away: just include English in the list
of languages for which we generate strings.xml files.
*Restrictions may apply
Originally landed as https://codereview.chromium.org/11659006/
This can be re-landed as of https://codereview.chromium.org/11880050/
BUG=167248
TBR=yfriedman@chromium.org,thakis,jam@chromium.org,cjhopman,shashishekhar@chromium.org
Review URL: https://codereview.chromium.org/11967005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@177170 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
> [Android] Generate localized strings.xml files at build time.
>
> This generates localized strings.xml files (e.g.
> values-fr/strings.xml) from grd and xtb files at build time. This
> means we no longer need to check in localized strings.xml files. Note:
> the xtb files are empty until translations are available.
>
> Benefits:
> - 41 fewer extraneous results when grepping Java string IDs
> - Switching from maintaining strings in strings.xml over to using a
> grd file is One Trivial CL* away: just include English in the list
> of languages for which we generate strings.xml files.
>
> *Restrictions may apply
>
> BUG=167248
>
> Review URL: https://codereview.chromium.org/11659006TBR=newt@chromium.org
Review URL: https://codereview.chromium.org/11820058
git-svn-id: http://src.chromium.org/svn/trunk/src/build@176151 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This generates localized strings.xml files (e.g.
values-fr/strings.xml) from grd and xtb files at build time. This
means we no longer need to check in localized strings.xml files. Note:
the xtb files are empty until translations are available.
Benefits:
- 41 fewer extraneous results when grepping Java string IDs
- Switching from maintaining strings in strings.xml over to using a
grd file is One Trivial CL* away: just include English in the list
of languages for which we generate strings.xml files.
*Restrictions may apply
BUG=167248
Review URL: https://codereview.chromium.org/11659006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@176134 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This provides support for android-style resource folders in content and other
non-apk Java targets. The AppResource hack can then be removed shortly.
Details: while building a non-apk target (e.g. chromium_content.jar), we
generate an R.java file with non-final constants and in the appropriate Java
package (e.g. org.chromium.content.R) using the resources in the target (e.g.
content/public/android/java/res). This R.java is used to produce the jar, but is
not included in the jar itself.
When we later build an apk, we merge the resources from the apk (e.g.
org/chromium/content_shell/res) with the resources from the non-apk targets it
depends on (e.g. content/public/android/java/res). A new R.java is generated
using the merged resources with the correct mapping from resources to integer
IDs. This R.java file is copied into each needed package (e.g.
org.chromium.content.R and org.chromium.content_shell.R) and included in the
apk.
This is the first of three CLs to replace AppResource with R:
1. http://codereview.chromium.org/11363150 - Support Java resources within content
2. http://codereview.chromium.org/11360207 - Add Java resources to content and chrome
3. http://codereview.chromium.org/11377117 - Remove AppResource and unneeded resources
BUG=136704
Review URL: https://codereview.chromium.org/11363150
git-svn-id: http://src.chromium.org/svn/trunk/src/build@168283 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Previously, we had to keep this name in sync in multiple places, the
"fake" xxx_java target and in sdk-targets.xml. Instead, it should be set
only in java_apk.gypi and then passed along to each of the places that
we were specifying it before.
Also, delete unused 'output' block and unneeded xxx_java dependencies.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11363131
git-svn-id: http://src.chromium.org/svn/trunk/src/build@168148 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The ant build files for each of the apks that we create consisted of
only fairly straightforward boilerplate. With the recent changes to
java_apk.gypi and the gyp targets we can now build these correctly from
a single .xml with the differences in how the targets are built being
reflected in the gyp files (and then passed into ant).
TBR=joth
BUG=145991
Review URL: https://chromiumcodereview.appspot.com/10959034
git-svn-id: http://src.chromium.org/svn/trunk/src/build@160396 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Currently chromium_testshell_test_apk and content_shell_test_apk compile
and package java files from two different directories. Supporting this
in a good way is a requirement for using a single ant template for all
apks.
Introduce a new gyp variable for apk/jar targets, generated_src_dirs.
Now, generated_src_dirs is for directories that contain .java files that
are generated at build time and additional_src_dirs is for extra normal
directories to include in the jar/apk.
Change content_shell_test_apk and chromium_testshell_test_apk to use
additional_src_dirs for their extra dirs.
Add documentation for the gyp variables for jar/apk targets.
Reorder the ant defines in the java.gypi and java_apk.gypi.
BUG=136756,146056
Review URL: https://chromiumcodereview.appspot.com/10987083
git-svn-id: http://src.chromium.org/svn/trunk/src/build@159299 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add a new property generate.test.jar to ant scripts.
When this property is set, a jar containing all compiled
classes and referred classes is generated and placed in
out/{Debug|Release}/test.lib.java directory.
This makes it easier and cleaner to write ant build files for test apks.
New directory structure for the build:
Apks are placed in : out/{Debug|Release}/apks
All java libraries in : out/{Debug|Release}/lib.java
All test java libraries in : out/{Debug|Release}/test.lib.java
This CL also includes cleanup to work with the modified output
directory structure.
BUG=146583
Review URL: https://chromiumcodereview.appspot.com/10905138
git-svn-id: http://src.chromium.org/svn/trunk/src/build@157570 4ff67af0-8c30-449e-8e8b-ad334ec8d88c