Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Jan Krcal 969a53e102 [protobuf] Switch the default java protobuf generator from nano to lite
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
2018-04-09 08:52:16 +00:00
Florian Uunk 610a81804b Enable using lite protos for Android.
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
2017-11-17 03:11:07 +00:00
agrieve 4e62debd8b Fix android depfiles to always list GN's outputs[0]
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
2016-09-14 02:06:20 +00:00
cjhopman eb84219bc8 Add proto_java_library to gn
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
2014-10-01 23:49:49 +00:00
nyquist d605ffdd30 Remove protobuf lite for java.
Since the introduction of nano protobufs for Java in
https://codereview.chromium.org/532303003 (and updated in
https://codereview.chromium.org/549543002), there is no need for the
lite protocol buffers anymore.

This CL removes the checked out files initially introduced when
protobuf lite support for Java was added in
https://chromiumcodereview.appspot.com/11347026 and cleans up the
infrastructure regarding generating protocol buffers.

Since lite is not supported anymore, this also removes the requirement
for setting the 'proto_runtime' variable for targets using
build/protoc_java.gypi.

BUG=377891
TBR=zea@chromium.org

Review URL: https://codereview.chromium.org/556933002

Cr-Original-Commit-Position: refs/heads/master@{#294453}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cca2bcd58f7fe1ef6100265c0d2f40e9c5e23f8c
2014-09-11 20:17:18 +00:00
nyquist 24848581b9 Add support for Java nano protocol buffers for Android (take 2).
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
2014-09-04 00:34:47 +00:00
nyquist 5c14b56e52 Revert of Add support for Java nano protocol buffers for Android. (patchset #4 id:60001 of https://codereview.chromium.org/511283003/)
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: d8ae0a7983

TBR=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
2014-09-03 00:26:04 +00:00
nyquist 2c59f6efd9 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

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
2014-09-02 18:51:26 +00:00
nyquist@chromium.org 0e337943da Add support for generating jars from protos and add cacheinvalidation_java.
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
2012-11-14 21:20:47 +00:00