This CL takes the (almost) last step in converting java code from
protobuf nano to lite. The only remaining code with nano is
//third_party/cacheinvalidation which is deprecated and should be
replaced later this year.
We still need to keep the generate_lite variable in rules.gni because
it is used in the internal repo. After this CL, I will
- remove instances of generate_lite from the internal repo and finally
- remove generate_lite from rules.gni.
Bug: 782237
Change-Id: I65f144c59d84e8c75fe3152543c6e1941e52a3dd
Reviewed-on: https://chromium-review.googlesource.com/998033
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549129}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dc072552bd919ccdbacdd8f0ca4373791712f10b
Lite is the new preferred proto runtime on Android, for two reasons:
- It lends itself to better proguard optimizing
- There is only one flavor, so there is no risk in including
proto libraries with overlapping definitions that use different
flavors
This CL adds a generate_nano argument to the proto_java_library build
rule. This argument is default false, so new proto libraries will use
lite by default. However, existing libraries will be migrated in a
follow-up CL, so this change sets generate_nano to true for those
libraries.
It also adds the android_library rule that contains the runtime
library for lite protos.
For an example conversion CL for a proto target, see:
https://chromium-review.googlesource.com/c/chromium/src/+/757103
Bug: 782237
Change-Id: I8100e70c38d41add9068e493ca2a5822f7025213
Reviewed-on: https://chromium-review.googlesource.com/757134
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Doug Steedman <dougsteed@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#517268}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc12c7a9522169c079a0c0c6ad446088f6cbea1d
Ninja complains with:
expected depfile 'foo.d' to mention 'bar', got 'baz'
Running ninja twice now reports "no work to do" again.
This change required updating all calls to build_utils.WriteDepFile() so
that the output is passed in. While doing this, I also made the helper
add in GetPythonDependencies() by default.
build/android/gyp/ant.py I just deleted rather than updating since it's
GYP-only.
BUG=646165
Review-Url: https://codereview.chromium.org/2336173003
Cr-Original-Commit-Position: refs/heads/master@{#418455}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4eb18a55cde4daf2ef43330d0304ec73ef546f96
This adds a pretty straightforward gn template corresponding to
protoc_java.gypi.
protoc_java.py is updated to actually parse options instead of just
using positional arguments.
Adds cacheinvalidation targets.
TBR=brettw, zea
BUG=359249
Review URL: https://codereview.chromium.org/580343002
Cr-Original-Commit-Position: refs/heads/master@{#297739}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a3f2d3f6819d1a6709a5a4d8fc62321e478bcc9f
This CL adds a new dependency on the protocol buffer compiler
from the android source tree, since this compiler supports
generating Java files using the nano runtime.
The initial version of this dependency is 2.2.0a, but checked
out as what the Android 4.4.4 Release 2.0.1 tag points to.
This CL adds a new protoc binary (for compiling protos) that supports
this, and also adds a Java library with the runtime.
To simplify use of this, it also updates build/protoc_java.gypi to
support generating nano protos by specifying an optional
proto_runtime argument. The argument defaults to 'lite' which does
the same thing as before this change, and setting it to 'nano'
generates the new style Java files.
The plan is to quickly deprecate the 'lite' runtime for Java, since
it is too big and uses too many methods.
TBR=darin@chromium.org,cjhopman@chromium.org
BUG=377891,410067
Review URL: https://codereview.chromium.org/532303003
Cr-Original-Commit-Position: refs/heads/master@{#293236}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 38f28ba65426989765f8d070ef5f64b5fbce23fa
Reason for revert:
Breaks some workflows and also should get new quota.
Original issue's description:
> Add support for Java nano protocol buffers for Android.
>
> This CL adds a new dependency on the protocol buffer compiler
> from the android source tree, since this compiler supports
> generating Java files using the nano runtime.
>
> The initial version of this dependency is 2.2.0a, but checked
> out as what the Android 4.4.4 Release 2.0.1 tag points to.
>
> This CL adds a new protoc binary (for compiling protos) that supports
> this, and also adds a Java library with the runtime.
>
> To simplify use of this, it also updates build/protoc_java.gypi to
> support generating nano protos by specifying an optional
> proto_runtime argument. The argument defaults to 'lite' which does
> the same thing as before this change, and setting it to 'nano'
> generates the new style Java files.
>
> The plan is to quickly deprecate the 'lite' runtime for Java, since
> it is too big and uses too many methods.
>
> BUG=377891
>
> Committed: d8ae0a7983TBR=cjhopman@chromium.org,darin@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=377891
Review URL: https://codereview.chromium.org/534703004
Cr-Original-Commit-Position: refs/heads/master@{#293028}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e3f2241bc1235a54254f165db374f6013e037233
This CL adds a new dependency on the protocol buffer compiler
from the android source tree, since this compiler supports
generating Java files using the nano runtime.
The initial version of this dependency is 2.2.0a, but checked
out as what the Android 4.4.4 Release 2.0.1 tag points to.
This CL adds a new protoc binary (for compiling protos) that supports
this, and also adds a Java library with the runtime.
To simplify use of this, it also updates build/protoc_java.gypi to
support generating nano protos by specifying an optional
proto_runtime argument. The argument defaults to 'lite' which does
the same thing as before this change, and setting it to 'nano'
generates the new style Java files.
The plan is to quickly deprecate the 'lite' runtime for Java, since
it is too big and uses too many methods.
BUG=377891
Review URL: https://codereview.chromium.org/511283003
Cr-Original-Commit-Position: refs/heads/master@{#292965}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a076bf3d5a204c2e2db473a687b34c17830866bc
The cacheinvalidation_java target is also added to build/all_android.gyp to
ensure it is always built since nothing currently depends on it upstream.
When all of Android-specific sync code is upstreamed, a target for sync
should be used instead of cacheinvalidation.
BUG=158382
Review URL: https://chromiumcodereview.appspot.com/11146005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@167746 4ff67af0-8c30-449e-8e8b-ad334ec8d88c