This also creates build/android/pylib/constants/ and moves the existing
constants.py file into it as __init__.py.
BUG=267773
Review URL: https://codereview.chromium.org/1092703002
Cr-Original-Commit-Position: refs/heads/master@{#326025}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cdb5bb0b94d7d2716a0c826fca576a0efdd33511
A recent CL -- http://crrev.com/1002313002 -- made the jinja wrapper script
barf on templates located outside CHROMIUM_SRC (the used Jinja2 loader
disallows template paths with '..' components). While not actively used
currently in the Chromium build, it is a somewhat useful feature of the
wrapper that used to work.
Fix by instatiating the jinja template loader with a configurable path as the
search directory, rather than a hardcoded CHROMIUM_SRC. Usages with templates
outside CHROMIUM_SRC now must pass an appropriate --loader-base-dir value
to the wrapper script.
R=cjhopman,jbudorick
BUG=
Review URL: https://codereview.chromium.org/1077553002
Cr-Original-Commit-Position: refs/heads/master@{#324597}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 65b1b8d1d29b68df077dfaec40d3fd4e8961758e
Now that android_webview_build is being removed we no longer need
support for jarjar-ing layout.xml files. Delete the tools used to do
this, as well as the jarjar configuration for android_webview_build.
BUG=440794
Review URL: https://codereview.chromium.org/1040653003
Cr-Original-Commit-Position: refs/heads/master@{#322860}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 15040fcb70a124db6a7886677d0c78cb7624da8a
This allows jinja2 templates to reference other templates by path name,
e.g. to extend them or include them.
BUG=467069
Review URL: https://codereview.chromium.org/1002313002
Cr-Original-Commit-Position: refs/heads/master@{#320963}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 031bd459554280a3653a1541221e224a6678eda2
Dependent libraries need to be passed in the reverse order that
build_utils.GetSortedTransitiveDependencies returns.
Also, a multi-library resource zip in package_libraries should be sorted
on the numeric values of the directories in the zip, not the string
values.
Review URL: https://codereview.chromium.org/1007043002
Cr-Original-Commit-Position: refs/heads/master@{#320802}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 46ba0c2ba3d041ee8dac492be81904ee073f4ed8
We want to remove downstream lint script. We will need this script to be able to fail
builds if we want to replace the downstream script with this one.
BUG=266140
Review URL: https://codereview.chromium.org/982683002
Cr-Original-Commit-Position: refs/heads/master@{#319481}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2b6f0c85fc4dcdb1746c4ac717b4b71c96e6e22a
ProGuard outputs boring stuff to stdout (proguard version, jar path,
etc) as well as interesting stuff (notes, warnings, etc). If stdout is
entirely boring, this method suppresses the output.
Review URL: https://codereview.chromium.org/977253002
Cr-Original-Commit-Position: refs/heads/master@{#319183}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 20e824209ff87f27e26d8c20bf20b5d0d6795d4e
For an image that's already optimized, aapt crunch typically increases
the image size. In this case, we now use the original image instead of
the crunched image. 9-patches, however, must always be crunched, since
crunching adds important metadata to the file.
Currently, this saves 50KB, but has the potential to save up to 300KB
once we optimize all the images in the codebase.
BUG=407781
Review URL: https://codereview.chromium.org/867483005
Cr-Original-Commit-Position: refs/heads/master@{#313656}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d7e09cdd4322829368cdad8eb33c784912971a77
Jinja2 defaults to utf-8 for templates... unless the template is loaded
using env.from_string. Since we process manifest xml files which are
declared utf-8, the wrapper should treat them as utf-8 properly.
BUG=
Review URL: https://codereview.chromium.org/816813003
Cr-Original-Commit-Position: refs/heads/master@{#312352}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dad6da460d13947b90750195bc4957349e670e61
Almost any character is valid in a filename. The rest of the pattern
should be restrictive enough that we don't actually match anything that
we don't want.
BUG=427718
Review URL: https://codereview.chromium.org/849973002
Cr-Original-Commit-Position: refs/heads/master@{#311397}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4a714c8d99004ed1f882f502dbe65d126e413b4b
Backslashes in comments produce a compile error (as the compiler
interprets them as 'multi-line single-line comments'). This requires
a different way of denoting mulit-line directives. Parens seem
like a reasonably natural syntax for this.
BUG=None
TEST=java_cpp_enum_tests.py
R=jbudorick@chromium.org
Review URL: https://codereview.chromium.org/842043003
Cr-Original-Commit-Position: refs/heads/master@{#311073}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2f65eb2d9c327d2bd93d079b7b6c2924e1959df5
This makes is possible to specify multi-line directives to the
generator. The primary motivation is to specify long package names
without violating the 80 column limit in C++.
BUG=None
TESTS=java_cpp_enum_tests.py
R=jbudorick@chromium.org
Review URL: https://codereview.chromium.org/841173006
Cr-Original-Commit-Position: refs/heads/master@{#310799}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 528e46025bf28be9dc3eb6a8739b6b398903bb27
This patch extracts the rule needed to produce a standalone .dex.jar for
a set of Java dependencies into a separate rule. This allows to package
any android library into a standalone .dex.jar file without affecting
the target being packaged.
BUG=437290
Review URL: https://codereview.chromium.org/778093004
Cr-Original-Commit-Position: refs/heads/master@{#307575}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7d7c32ec12774eaf22c901194ff9f788a1dcc9b2
This patch allows to set .standalone_dex_path as a variable in the
android_library target. This puts all dependencies together with the
library code in one dex.jar file.
This is needed to produce bundles of Java code packaged as Mojo
applications on Android.
BUG=437290
Review URL: https://codereview.chromium.org/772493003
Cr-Original-Commit-Position: refs/heads/master@{#306455}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc9dcc51638870318f1db8a8ef7b2b6440406292
A starting point for doing all of src, and adding a PRESUBMIT.
Includes https://codereview.chromium.org/772663002/ and https://codereview.chromium.org/770053002/.
I haven't pushed new binaries yet.
Generated via:
> cd build
> git ls-files *.gn *.gni | sed -e "s/^/@..\\\\out\\\\Debug\\\\gn format --in-place /" >x.bat && x.bat
The only things that I don't love in the current output are:
1. Turning
args = [
"--depfile", rebase_path(depfile, root_build_dir),
"--android-sdk-tools", rebased_android_sdk_build_tools,
"--dex-path", rebased_output,
]
into:
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
"--android-sdk-tools",
rebased_android_sdk_build_tools,
"--dex-path",
rebased_output,
]
The heuristic for this isn't trivial though, and it also affects e.g. '-Xclang' in cflags, as well
as assignments to temporaries that are later assigned to args.
2. Turning single line
if (defined(invoker.inputs)) { inputs = invoker.inputs }
into
if (defined(invoker.inputs)) {
inputs = invoker.inputs
}
This could be argued to be an improvement, but as it's very boilerplate-y perhaps an exception to
allow single line in this case is worthwhile. I think there was discussion of new syntax for this
case too, something like "inputs ?= invoker.inputs" maybe.
In both cases, I think it's worthwhile to get formatting turned on, and then go back and special
case these if we decide it's worthwhile.
R=brettw@chromium.org
BUG=348474
Review URL: https://codereview.chromium.org/766573003
Cr-Original-Commit-Position: refs/heads/master@{#306305}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b199254f481c5db36d56e83fce40594b06d2b81f
From our UMA and operation feedbacks, we don't see such issue anymore.
(We notified the manufactor of the issue and likely they addressed it
in OTA). The cleanup restores native library name to libchrome.so
instead of libchrome.<VER>.so.
BUG=311644
Review URL: https://codereview.chromium.org/759833002
Cr-Original-Commit-Position: refs/heads/master@{#305925}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d9201758ca9e6dc47e36026a4029dae5cc69e4c4
This allows a target to disable checks that prevent a java library from
depending on an android_library. This is required for the current way
that we build java unittests.
Also, remove provides_android_platform option. This was planned to
support unit tests, but it doesn't really work (at the top-level we want
to depend on both targets that require Android and ones that don't
support Android).
Also fixes some minor target definition issues.
TBR=cpu
BUG=359249
Review URL: https://codereview.chromium.org/739383004
Cr-Original-Commit-Position: refs/heads/master@{#305326}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7aac92d873502f8a9676bf6b3a95cdfa8cce82c5
This change fixes java_library and java_prebuilt to actually construct a
classpath based on their dependents. It adds java_binary that is similar
to java_library but also creates a script in $root_build_dir/bin/ to
actually run a java jar (it builds in the classpath and main class so
that it can just be run like a normal executable).
Adds the flags "android" and "has_android_platform" to the java_library
template. An android_library can depend on a java_library only if the
java_libary has "android == true". A java_library can depend on an
android_library only if the java_libary has
"has_android_platform == true".
This merges several of the paths for compiling java between android and
non-android implementations into a single one that just takes a flag
controlling it's behavior (enabling/disabling dex, for example).
Adds a very simple java_binary target. This can be run to ensure it works,
output is printed, and exit code is propagated.
TBR=brettw
BUG=359249,383646,417843
Review URL: https://codereview.chromium.org/687633003
Cr-Original-Commit-Position: refs/heads/master@{#304555}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3d85c6dd6a6540699d3baf583780577327a0cd13
This adds support for the enum class/struct construct as well as limited
support for fixed types (currently only types that convert to jint are
supported).
BUG=None
TESTS=java_cpp_enum_tests
Review URL: https://codereview.chromium.org/705093005
Cr-Original-Commit-Position: refs/heads/master@{#303332}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7fd46f236b16d0dee58a8e0f007029912dea4d9f
Previously, when generate_v14_compatible_resources.py encountered an
invalid XML file, it showed an error message that didn't tell which
file it was processing. E.g.:
Traceback (most recent call last):
...
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
ExpatError: unbound prefix: line 6, column 0
Now it also prints the name of the file that couldn't be parsed. E.g.
Traceback (most recent call last):
...
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
ExpatError: unbound prefix: line 6, column 0
Failed to parse XML file: chrome/android/res/layout/my_layout.xml
Review URL: https://codereview.chromium.org/661433005
Cr-Original-Commit-Position: refs/heads/master@{#302138}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fcd9c4769cdea951a67a4021a6d8b5f6bec79bbd
In GN we pass multiple lists of libraries to the relocation packing
script. But, when that script doesn't support that, it just makes the
later ones override the earlier ones. Now, it will append all the lists.
NOTRY=true
BUG=359249
Review URL: https://codereview.chromium.org/675263002
Cr-Original-Commit-Position: refs/heads/master@{#301184}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 09ac0842aa0603f504d8877b015dc3d04a0b928f
Changes to these files are always UI-related and should be reviewed by
someone familiar with Chrome Android UI.
Review URL: https://codereview.chromium.org/647043007
Cr-Original-Commit-Position: refs/heads/master@{#300990}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 98babcf3410e52f785c8ee210de395accaba7894
This adds pretty straightforward conversion of the relocation package
gyp targets.
The android_apk template is updated to use pack_arm_relocations.py
instead of copy_ex.py for copying native libraries into the directory
used to build the apk. This script will copy the files when relocation
packing is disabled and otherwise will do the relocation packing (just
like it does in gyp).
BUG=359249
Review URL: https://codereview.chromium.org/650933003
Cr-Original-Commit-Position: refs/heads/master@{#300969}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 284a11b8e10b24d85247dc447dfb3ae812b75f91
This turns Chrome Shell's AndroidManifest.xml into a template which gets
processed at build time to produce the final AndroidManifest.xml that's
used to build the APK.
BUG=163751
NOTRY=true
Review URL: https://codereview.chromium.org/657443002
Cr-Original-Commit-Position: refs/heads/master@{#300409}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d5366cb1ad27e6bf1ae659f374a9b9dd3186761d
Reason for revert:
We have switched to L sdk.
Original issue's description:
> Temporarily suppress Android API deprecation warnings.
>
> We will remove this suppression once all of the builders support the L SDK.
>
> BUG=405174,398669,411361,411366,411367,411376,416041
>
> Committed: https://crrev.com/c26c106e7724c400fed9980ce371a1c81d1af849
> Cr-Commit-Position: refs/heads/master@{#297505}
TBR=dmazzoni@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=405174,398669,411361,411366,411367,411376,416041
Review URL: https://codereview.chromium.org/649653004
Cr-Original-Commit-Position: refs/heads/master@{#300294}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 899f630a25669232d5817b8a6d7d365fb7adc42a
This mostly just adds the chrome_shell_apk build definition and those of
a whole bunch of targets.
Adds a simple check that when DEPRECATED_java_in_dir is used, it
actually includes the "src" at the end (GYP just assumes that you really
meant that java files are in <(java_in_dir)/src).
Makes the call to process_resources only generate R.java for extra
packages when being run as part of the apk step (otherwise, for
example, both chrome resources and content resources would contain
an R.java for net resources and compilation would fail).
Depends on https://codereview.chromium.org/581273004/
Adds the following targets -- and enables ~300 more (550 counting
template-generated inner targets):
//chrome:chrome_android_core
//chrome/android:chrome_strings_grd
//chrome/android:chrome_java
//chrome/android:activity_type_ids_javagen
//chrome/android:app_banner_metrics_ids_javagen
//chrome/android:resource_id_javagen
//chrome/android:profile_account_management_metrics_javagen
//chrome/android:profile_sync_service_model_type_selection_javagen
//chrome/android:toolbar_model_security_levels_javagen
//chrome/android:tab_load_status_javagen
//chrome/android:chrome_shell_base
//chrome/android:chrome_shell
//chrome/android:chrome_sync_shell
//chrome/android:chrome_shell_resources
//chrome/android:chrome_shell_java
//chrome/android:chrome_shell_assets
//chrome/android:chrome_shell_apk
//chrome/android:chrome_sync_shell_apk
//components/bookmarks:bookmarks_java
//components/bookmarks:bookmarks_jni_headers
//components/bookmarks:bookmark_type_javagen
//components/dom_distiller/android:dom_distiller_core_java
//components/dom_distiller/android:dom_distiller_core_font_family_javagen
//components/dom_distiller/android:dom_distiller_core_theme_javagen
//components/enhanced_bookmarks:jni_headers
//components/enhanced_bookmarks/android:enhanced_bookmarks_java
//components/gcm_driver:gcm_driver_java
//components/gcm_driver:jni_headers
//components/navigation_interception/android:navigation_interception_java
//components/variations:variations_java
//components/web_contents_delegate_android:web_contents_delegate_android
//components/web_contents_delegate_android:web_contents_delegate_android_java
//components/web_contents_delegate_android:web_contents_delegate_android_jni_headers
//printing:printing_java
//sync:fake_server_jni
//sync:sync_java_test_support
//sync:test_support_sync_fake_server_android
//sync:sync_unit_tests_apk
//sync/android:sync_java
//sync/android:sync_javatests
BUG=359249
TBR=ben
Review URL: https://codereview.chromium.org/570203002
Cr-Original-Commit-Position: refs/heads/master@{#299381}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 11a68cbf1df1110ebac0b649edf2aef22682387e
This patch revises the implementation of DeviceUtils.PushChangedFiles
and changes its interface (slightly).
PushChangedFiles now:
- takes a list of (host_path, device_path) tuples, each of which are
analogous to the original parameters.
- continues to use AndroidCommands.GetFilesChanged to determine which
files need pushing
- attempts to pick the fastest method out of:
- individual file pushes
- entire directory pushes
- zip-push-unzip
BUG=400440
Review URL: https://codereview.chromium.org/646523002
Cr-Original-Commit-Position: refs/heads/master@{#299098}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b53e3ccca7fa26a51f3980f250f5527581324316
Extended java_cpp_enum to parse enums that have values set for some of
the enums. Also fixed a small bug where enum values with comments on the
same line (following the enum) were being ignored.
BUG=NONE
Review URL: https://codereview.chromium.org/636773002
Cr-Original-Commit-Position: refs/heads/master@{#299009}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8bf011fd19739f5b6c85c87e0928de84ed487476
Arm uses .rel.dyn, and arm64 .rela.dyn. For consistency, name the
packed relocations section as '.android.rela.dyn' for arm64, and
leave '.android.rel.dyn' for arm32.
[ No semantic effect, since packing and unpacking tools treat both
section names identically, and use the signature at the start of
section data to indicate content type. ]
BUG=385553
Review URL: https://codereview.chromium.org/635863002
Cr-Original-Commit-Position: refs/heads/master@{#298515}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1ddabff1f7612387b7578d3855cb5ba9729de9f2
Objcopy knows nothing about the dynamic tags that point to packed
relocation data. If objcopy is run after relocation packing, and if it
moves the .android.rel.dyn section, these dynamic tags become invalid
and the crazy linker cannot load the library:
E/chromium_android_linker( 9584): Open:
Could not open libchrome.2180.0.so:
Bad packed relocations ident, expected APR1 or APA1
Currently, version branding happens at the end of building libchrome.so,
and after relocation packing. Re-order so that relocation packing again
comes after all other strip and/or objcopy operations.
BUG=417510
Review URL: https://codereview.chromium.org/621263003
Cr-Original-Commit-Position: refs/heads/master@{#298236}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4749549c06525071692f777fc6a1fa5a9ad7f877
This removes the need to use the previous "rezip" tool in the build
process. That tool is still used in the LGPL compliance script,
which will need to be addressed separately.
BUG=390618, 388223
Review URL: https://codereview.chromium.org/608853005
Cr-Original-Commit-Position: refs/heads/master@{#297866}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5887c778a800c9000e9565b40da65e9979657afd
We will remove this suppression once all of the builders support the L SDK.
BUG=405174,398669,411361,411366,411367,411376,416041
Review URL: https://codereview.chromium.org/615163002
Cr-Original-Commit-Position: refs/heads/master@{#297505}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c26c106e7724c400fed9980ce371a1c81d1af849
With this change setting 'load_library_from_zip_file' to 1 will now
construct the APK with a new tool chain. The purpose of this change is
to contruct the APK in such a way that the page alignment is not broken
by the chrome signing process. To achieve this the tool is written in
Java so it shares the same underlying JarOutputStream implementation.
The key things that we depend on are that the filenames are output in
lexographical order with the META_INF files at the end of the file.
That zipalign adds 4 byte alignment to STORED files and this is done by
adding padding to the zip extra field.
BUG=390618
Review URL: https://codereview.chromium.org/595933003
Cr-Original-Commit-Position: refs/heads/master@{#297439}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c83a88d39329e2a7d8bbc1de280d9e572d2f7c8a
When building the native libraries, insert the version string into
native libraries as a section .chromium.verson.
BUG=417510
Review URL: https://codereview.chromium.org/599093005
Cr-Original-Commit-Position: refs/heads/master@{#297065}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 29d1208bfd30add739982738a6f11f7b0dbcfcd0
Reason for revert:
Didn't help. We probably got scheduled on other, flakier Android devices which caused tests to start flaking, or something else is the root cause.
Original issue's description:
> Revert of [Android] JUnit runner + gyp changes. (patchset #15 id:280001 of https://codereview.chromium.org/574433003/)
>
> Reason for revert:
> Speculative revert: Android test started flaking a ton after this landed. Affected targets androidwebview_instrumentation_tests, chromeshell_instrumentation_tests, contentshell_instrumentation_tests. This CL seems the most likely in the blamelist of https://build.chromium.org/p/chromium.linux/builders/Android%20Tests/builds/15905.
>
> Original issue's description:
> > [Android] JUnit runner + gyp changes.
> >
> > This adds Java code for running junit tests, as well as gyp targets for
> > both runnable and non-runnable host-side JARs.
> >
> > BUG=316383
> >
> > Committed: https://crrev.com/2e56d4508e33de5fc60bbbb41c5a5d5534e88174
> > Cr-Commit-Position: refs/heads/master@{#296340}
>
> TBR=cjhopman@chromium.org,nyquist@chromium.org,aurimas@chromium.org,jbudorick@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=316383
>
> Committed: https://crrev.com/54b9408f8b18e3bf3a33343e375186e1949e8e86
> Cr-Commit-Position: refs/heads/master@{#296384}
TBR=cjhopman@chromium.org,nyquist@chromium.org,aurimas@chromium.org,jbudorick@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=316383
Review URL: https://codereview.chromium.org/596303002
Cr-Original-Commit-Position: refs/heads/master@{#296406}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6e9dc50aecf078d7826fe8e4611b2c238aab3f23
Reason for revert:
Speculative revert: Android test started flaking a ton after this landed. Affected targets androidwebview_instrumentation_tests, chromeshell_instrumentation_tests, contentshell_instrumentation_tests. This CL seems the most likely in the blamelist of https://build.chromium.org/p/chromium.linux/builders/Android%20Tests/builds/15905.
Original issue's description:
> [Android] JUnit runner + gyp changes.
>
> This adds Java code for running junit tests, as well as gyp targets for
> both runnable and non-runnable host-side JARs.
>
> BUG=316383
>
> Committed: https://crrev.com/2e56d4508e33de5fc60bbbb41c5a5d5534e88174
> Cr-Commit-Position: refs/heads/master@{#296340}
TBR=cjhopman@chromium.org,nyquist@chromium.org,aurimas@chromium.org,jbudorick@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=316383
Review URL: https://codereview.chromium.org/597123002
Cr-Original-Commit-Position: refs/heads/master@{#296384}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 54b9408f8b18e3bf3a33343e375186e1949e8e86
This adds Java code for running junit tests, as well as gyp targets for
both runnable and non-runnable host-side JARs.
BUG=316383
Review URL: https://codereview.chromium.org/574433003
Cr-Original-Commit-Position: refs/heads/master@{#296340}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2e56d4508e33de5fc60bbbb41c5a5d5534e88174
This removes the rest of guava from a chromium checkout.
It also removes a workaround in build/android/gyp/javac.py
which sorts input files for javac. The issue was fixed in guava 14
(https://code.google.com/p/guava-libraries/issues/detail?id=950),
but it was never rolled in to chromium.
The last remaining files in third_party/guava are left because
some bots do not delete non-existing DEPS. COPYING is a copy of the
current version of the COPYING file from the guava repository.
See http://crbug.com/380688 for details about the DEPS issue.
BUG=412673
Review URL: https://codereview.chromium.org/574103002
Cr-Original-Commit-Position: refs/heads/master@{#296202}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e1aebb5900838ff7c3e83dd54b4e51e88f866f04
This has several changes:
apks no longer export information about resources (this means to get
resources, a target must depend on the android_resources target).
libraries are only built against their direct resource dependencies. If
a library refers directly to some resource id, it should depend directly
on the corresponding android_resources target.
When building an apk, we now properly create the R.java files for all
the packages of all the apk's resource dependencies.
Since an apk will always have a resources srcjar, it will always have
java code (so remove the no-java path).
BUG=359249
Review URL: https://codereview.chromium.org/570033002
Cr-Original-Commit-Position: refs/heads/master@{#295362}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fed93a9b98c45ad7b0c8d3e3b0b9805d5a5107ac
Reason for revert:
Android SDK fixed the issue, so we can convert back from warning to error.
Original issue's description:
> [Android] Temporarily suppress RTL start&end check error.
>
> The newest Android SDK had start&end attributes in non -v17 resources.
> Temporarily change the checking script from error to warning so that
> people can continue to work before it is fixed. This should be
> reverted once the issue is addressed
>
> BUG=None
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287711TBR=newt@chromium.org,tedchoc@chromium.org,dfalcantara@chromium.org
BUG=None
Review URL: https://codereview.chromium.org/555253004
Cr-Original-Commit-Position: refs/heads/master@{#294038}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 992e0f97595ddf295f15550fcb3e9e5947c90108
This changes the "test" template to create a shared_library (instead of
an executable) on Android. After this, we can actually run
base_unittests with
`build/android/test_runner.py gtest -s base_unnittests`
as normal (though may need to CHROMIUM_OUT_DIR and BUILDTYPE as
appropriate).
This requires adding the following targets:
//testing/android:native_test_native_code
//testing/android:native_test_util
//testing/android:native_test_jni_headers
//tools/android/md5sum:md5sum
//tools/android/md5sum:md5sum_bin
//tools/android/md5sum:md5sum_prepare_dist
//tools/android/md5sum:md5sum_copy_host
Also, makes it so that native executables are stripped (just like shared
libraries). Adds a simple create_native_execuatable_dist template that
sets up a dist directory for the executable (see
build/android/gyp/native_app_dependencies.gyp).
BUG=359249
TBR=rlarocque
Review URL: https://codereview.chromium.org/557463002
Cr-Original-Commit-Position: refs/heads/master@{#294032}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e65ead8fb1a1976682356cf824445476584e70f0
This adds support for android_apk targets without any java included
directly in the target (only included through deps).
This adds the following targets:
//base:base_javatests
//content/public/android:content_javatests
//content/shell/android:content_shell_test_apk
//media/android:media_android_imageformat_list (moved)
//media/android:media_java (moved+fixed)
BUG=359249
Review URL: https://codereview.chromium.org/525533003
Cr-Original-Commit-Position: refs/heads/master@{#293897}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 394dfd1052e53e64083daef7cc66055557256dcb
The content_shell_apk does not have the full native part that it should.
It builds, installs, starts, loads the native library, and then crashes
when it tries to access missing native parts.
This requires fixes to a bunch of little things:
1. Should only extract java files to compile from srcjars.
2. The way we were creating the single combined resources zip was wrong
because we were clobbering xml files (we should only clobber images, xml
files need to be handled more carefully). Instead of trying to properly
handle xml files, the combined zip now just puts all the different
dependencies in different folders (0/, 1/, etc) and then when packaging
we detect that type of zip and pass all the subdirs to aapt.
3. java_cpp_template with multiple sources needs to have a unique
depfile path for each source
4. jni_generator needs to clear the classlist variable in each loop of
foreach (otherwise gn complains about assigning to non-empty list)
5. a couple parts of apk native lib handling was not skipped for an apk
with no native lib
This adds a bunch of targets:
//base:base_java_test_support
//content/public/android:content_java_resources
//content/public/android:content_java
//content/public/android:content_strings_grd
//content/public/android:gesture_event_type_java
//content/public/android:page_transition_types_java
//content/public/android:popup_item_type_java
//content/public/android:result_codes_java
//content/public/android:selection_event_type_java
//content/public/android:speech_recognition_error_java
//content/public/android:top_controls_state_java
//content/public/android:screen_orientation_values_java
//content/public/android:content_gamepad_mapping_java
//content/public/android:content_jni_headers
//content/shell/android:content_shell_jni_headers
//content/shell/android:libcontent_shell_content_view (partial)
//content/shell/android:content_shell_java_resources
//content/shell/android:content_shell_java
//content/shell/android:content_shell_apk_resources
//content/shell/android:content_shell_apk
//net/android:net_java
//net/android:remote_android_keystore_aidl
//net/android:net_java_test_support
//net/android:net_javatests
//net/android:net_errors_java
//net/android:certificate_mime_types_java
//net/android:cert_verify_status_android_java
//net/android:private_key_types_java
//net/android:net_unittests_apk (disabled)
TBR=yfriedman,thestig
BUG=359249
Review URL: https://codereview.chromium.org/507523002
Cr-Original-Commit-Position: refs/heads/master@{#293671}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cd7694afb928b265e64be5448bb281ad86771f34
Adds the android_aidl template to support Android aidl.
Adds a DEPRECATED_java_in_dir to android_library and android_apk. This
will greatly ease the transition from gyp to gn.
Adds BUILD.gn for third_party/eyesfree (using the two new features
added).
TBR=rsleevi
BUG=359249
Review URL: https://codereview.chromium.org/512923002
Cr-Original-Commit-Position: refs/heads/master@{#293386}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dad5f427256371787b536ccdcf08d6493bebb379
Mostly just a refactoring of build rules to support prebuilt jars.
Adds support for proguard preprocessing of both prebuilt and
non-prebuilt java libraries.
Adds definitions of all (but for android.jar) of the prebuilt jars that
we need from the sdk.
BUG=359249
Review URL: https://codereview.chromium.org/484813002
Cr-Original-Commit-Position: refs/heads/master@{#291464}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 684b22957e09c08e917a63390b04980a67da4fa1
First, change the NativeLibraries template to use preprocessor defines
instead of includes. This allows us to delete all the corresponding
headers.
Then, change the ordered libraries file to be a dict with both the list
of library paths and the java-style list of library names.
Update a bunch of things that used the ordered libraries file to instead
take the list of libraries directly as an argument (as a FileArg in
every case).
Add calculating the list of libraries to write_build_config and add it
to the build config (gn can use this then instead of a separate ordered
libraries file).
Add a simple copy step in gn to set up the native libraries directory
for an apk. Use this directory when creating the apk.
BUG=359249
NOTRY=true
Review URL: https://codereview.chromium.org/456493002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@290963 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The newest Android SDK had start&end attributes in non -v17 resources.
Temporarily change the checking script from error to warning so that
people can continue to work before it is fixed. This should be
reverted once the issue is addressed
BUG=None
Review URL: https://codereview.chromium.org/445753002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@287711 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- Change the android_webview_apk gyp files to include the en-US.pak
file in the apk, which was erroneously missing.
- Add the do_not_compress gyp plumbing to store and zipalign paks in
the apk (only for the android_webview_apk target).
- Stop decompressing pak files in the android webview shell apk.
- Change aw_browser_main_parts.cc to take advantage of the new AwAssets
and DataPack/ResourceBundle *FromRegion methods (mmap from the apk).
- Add temporary workaround which loads always the en-US.pak locale, in
lack of a proper refactoring of i10n_utils and ResourceBundle.
BUG=394502
Review URL: https://codereview.chromium.org/402603006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@286258 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds two templates, android_apk and unittest_apk. unittest_apk is
a simple wrapper of android_apk for packaging gtests into apks.
android_apk currently just does the java compilation, processing
resources, and build_config stuff for apks.
BUG=359249
Review URL: https://codereview.chromium.org/379333003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@286031 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This changes the syntax from:
@(filepath:key0:key1)
to:
@FileArg(filepath:key0:key1)
This should make it much easier for someone who encounters this syntax
to figure out what it is (currently a `git grep FileArg` returns only
results about/using this feature).
Also changes it to use a simple regex search instead of adhoc stuff.
BUG=359249
Review URL: https://codereview.chromium.org/377803003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@283484 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds support for android resources to gn.
Two new templates are introduced:
java_string_grd: This is like gyp's build/java_strings_grd.gypi. It runs
grit and generates Android strings.xml files and then zips them
together.
android_resources: This is the target for android resources. It is
mostly a wrapper around process_resources.py. This is *not part* of
android_library (like it is in gyp). Making these two things separate is
more like facebook's BUCK and google's internal build rules (and gyp's
java.gypi and java_apk.gypi have gotten way too big and complicated).
Changes to the actual build scripts are very minor except for the added
support for andoid_resources to write_build_config.py. Building
resources requires getting all the transitive resource dependencies, and
so this reuses the simple sorted transitive dependency thing from
write_ordered_libraries.py.
TBR=rch@chromium.org
BUG=359249
Review URL: https://codereview.chromium.org/361633002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@283293 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This CL does the 3 following things to allow the mojo shell to run:
- Updates java_apk.gypi to allow bundling additional libs.
- Bundle the network service with the mojo shell.
- Updates the shell to look for .so and .cr.so file in the local file
system for android component build.
Review URL: https://codereview.chromium.org/334783006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@282015 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Broke Android compile:
FAILED: cd ../../net; python ../build/android/gyp/pack_arm_relocations.py "--enable-packing=0" "--stripped-libraries-dir=../out/Release/gen/stripped_libraries" "--packed-libraries-dir=../out/Release/net_unittests_apk/libs/armeabi-v7a" "--libraries-file=../out/Release/net_unittests_apk/native_libraries.json" "--stamp=../out/Release/net_unittests_apk/pack_arm_relocations.stamp"
Traceback (most recent call last):
File "../build/android/gyp/pack_arm_relocations.py", line 108, in <module>
sys.exit(main())
File "../build/android/gyp/pack_arm_relocations.py", line 99, in main
CopyArmLibraryUnchanged(library_path, output_path)
File "../build/android/gyp/pack_arm_relocations.py", line 58, in CopyArmLibraryUnchanged
shutil.copy(library_path, output_path)
File "/usr/lib/python2.7/shutil.py", line 117, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: u'../out/Release/net_unittests_apk/libs/armeabi-v7a/libnet_unittests.so'
ninja: build stopped: subcommand failed.
> Add gyp machinery to build with packed ARM relative relocations.
>
> Add gypi and python files to support packing ARM relative relocations
> during the build process.
>
> Define a use_relocation_packer gyp variable to turn ARM relocation
> packing on and off (currently set to 0).
>
> BUG=385553
>
> Review URL: https://codereview.chromium.org/358863002TBR=simonb@chromium.org
Review URL: https://codereview.chromium.org/370633002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@281303 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add gypi and python files to support packing ARM relative relocations
during the build process.
Define a use_relocation_packer gyp variable to turn ARM relocation
packing on and off (currently set to 0).
BUG=385553
Review URL: https://codereview.chromium.org/358863002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@281286 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is the GN equivalent of build/java.gypi. It is a template for
creating an Android library including java code and Android resources.
It currently only compiles java files (including files in srcjars from
srcjar targets like java_cpp_template) and zips them together in a .jar
and creates the corresponding .jar.TOC.
Some of the things still to do: proguard_preprocess, android_lint,
emma coverage, dex, everything resources.
Adds android_java_library rule for base_java, guava, and jsr-305.
This add the --java-srcjars argument to javac.py. This will accept a .zip of
.java files and include those files in the compilation. This approach is
preferred over using the --src-gendirs option.
Many of the parts of building Android stuff (libraries, resources, apks)
require knowledge of the dependents of that thing. Examples: javac classpath,
for resources aapt needs to know about all dependents, dexing for an apk
needs to know about all java code going into that apk. For gyp, this is done
primarily with all_dependent_settings. There is then some of this logic in
two particular steps (dexing and proguard). These steps, when building an
instrumentation apk, need to exclude the things in the tested apk and this is
done by having the tested apk essentially write a file saying what it did in
those steps and the test apk reading that file and excluding stuff.
In GN, all_dependent_settings doesn't really work. This change introduces a new
way of calculating and using this information. Specifically .build_config files
and build_utils.ExpandFileArgs(). The build_config file for a target contains
the information that depends on dependents. The logic in write_build_config and
the logic in the template specification are very much tied together (in some
sense, write_build_config is just the part of the template specification
that can actually inspect the dependency graph). With
build_utils.ExpandFileArgs() all the other build scripts are essentially
unaware of the .build_config files and can just be written in a (mostly)
straightforward way.
A large part of the information calculated by the build_config is finding input
files to later actions. This requires that those later actions writes a depfile
that contains any inputs that are specified by the build_config (in the case of
this change, javac and the classpath files). Since a action's script shouldn't
really know about the build_config file and what information it got
from that, it is safest for the action to write *all* of its inputs into the
depfile (but to be correct it only has to write those that aren't explicitly
specified in the build files).
Depends on: https://codereview.chromium.org/341823003/
BUG=359249
Review URL: https://codereview.chromium.org/269943005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@280995 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
generate_v14_compatible_resources.GenerateV14Resources was deleting and
recreating the output directory. process_resources was calling that
multiple times and reusing the same output directory (and so it would
only actually get v14 resources for the final directory).
Instead, callers of GenerateV14Resources should handle deleting/creating
the output directory for themselves--this is just
generate_v14_compatible_resources.main and process_resources (which was
already handling this itself).
BUG=383803
Review URL: https://codereview.chromium.org/362543004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@280725 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds the --depfile option to a bunch of android's build scripts
(the ones used by gn). It also adds a simple function in build_utils to
calculate the paths of the imported python files.
Currently, the written depfiles just contain that list of python files
(which is much more accurate than the way this is handled in gyp).
BUG=359249
Review URL: https://codereview.chromium.org/341823003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@279546 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This allows us to more accurately specify the outputs of each action (we
can't specify the .class file outputs easily because determing them
essentially requires compiling the .java files).
The lint action still operates directly on the .class files, so we continue to
support specifying a directory for the .class files (but in a very simple to
remove way).
BUG=359249
Review URL: https://codereview.chromium.org/328893003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@279152 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The android_webview build will require there only be
a single R class (details in bug).
This change makes the necessary changes to the build
infrastructure for this to happen but the actual swap
to building the webview this way will land as a subsequent
CL.
BUG=387155
build-only change, all trybots compile fine.
NOTRY=true
Review URL: https://codereview.chromium.org/255613003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@278849 4ff67af0-8c30-449e-8e8b-ad334ec8d88c