Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: third_party/protobuf/protobuf.gyp

Issue 11347026: Check in protobuf java code and generate lite jar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved target to android conditional Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/protobuf.gyp
diff --git a/third_party/protobuf/protobuf.gyp b/third_party/protobuf/protobuf.gyp
index 4fc9ea3a3cbec5dbe4ef14e1c92f994a26d1ff1b..ccc763bd040b934775e1f36d68ba99aa2ebb65b2 100644
--- a/third_party/protobuf/protobuf.gyp
+++ b/third_party/protobuf/protobuf.gyp
@@ -67,6 +67,52 @@
},
],
}],
+ ['OS=="android"', {
+ 'targets': [
+ {
+ 'target_name': 'protobuf_lite_java',
+ 'type' : 'none',
+ 'dependencies': [
+ 'protoc#host',
+ ],
+ 'variables': {
+ 'script_descriptors': './protobuf_lite_java_descriptor_proto.py',
+ 'script_pom': './protobuf_lite_java_parse_pom.py',
+ 'protoc': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ # Variables needed by java.gypi below.
+ 'java_out_dir': '<(PRODUCT_DIR)/java_proto/protobuf_lite_java_descriptor_proto',
+ 'generated_src_dirs': ['<(java_out_dir)'],
+ 'package_name': '<(_target_name)',
+ 'java_in_dir': 'java',
+ 'maven_pom': '<(java_in_dir)/pom.xml',
+ 'javac_includes': ['<!@(<(script_pom) <(maven_pom))'],
+ },
+ 'actions': [
+ {
+ 'action_name': 'protobuf_lite_java_gen_descriptor_proto',
+ 'inputs': [
+ '<(script_descriptors)',
+ '<(protoc)',
+ 'src/google/protobuf/descriptor.proto',
+ ],
+ 'outputs': [
+ '<(java_out_dir)/com/google/protobuf/DescriptorProtos.java',
+ ],
+ 'action': [
+ '<(script_descriptors)',
+ '<(protoc)',
+ '<(java_out_dir)',
+ 'src',
+ 'src/google/protobuf/descriptor.proto',
+ ],
+ 'message': 'Generating descriptor protos for Java',
+ },
+ ],
+ # Now that we have generated DescriptorProtos.java, build jar.
+ 'includes': ['../../build/java.gypi'],
+ },
+ ]
+ }],
],
'targets': [
# The "lite" lib is about 1/7th the size of the heavy lib,

Powered by Google App Engine
This is Rietveld 408576698