From ef1e8e7172bedd177b91bdbeacdca1478021d0df Mon Sep 17 00:00:00 2001 From: Hao Nguyen Date: Tue, 9 Apr 2019 06:48:01 -0700 Subject: [PATCH] Add module for JavaLite and fix builds --- BUILD | 6 +- Makefile.am | 100 ++++- conformance/Makefile.am | 2 +- csharp/src/Google.Protobuf.Test/testprotos.pb | Bin 205149 -> 205179 bytes .../WellKnownTypes/Timestamp.cs | 10 +- java/core/generate-test-sources-build.xml | 51 ++- java/lite/generate-sources-build.xml | 19 + java/lite/generate-test-sources-build.xml | 50 +++ java/lite/lite.awk | 25 ++ java/lite/pom.xml | 344 ++++++++++++++++++ java/lite/process-lite-sources-build.xml | 7 + java/pom.xml | 1 + objectivec/google/protobuf/Timestamp.pbobjc.h | 10 +- 13 files changed, 590 insertions(+), 35 deletions(-) create mode 100644 java/lite/generate-sources-build.xml create mode 100644 java/lite/generate-test-sources-build.xml create mode 100644 java/lite/lite.awk create mode 100644 java/lite/pom.xml create mode 100644 java/lite/process-lite-sources-build.xml diff --git a/BUILD b/BUILD index f1e94a588d..45a39b957b 100644 --- a/BUILD +++ b/BUILD @@ -116,6 +116,7 @@ cc_library( "src/google/protobuf/implicit_weak_message.cc", "src/google/protobuf/io/coded_stream.cc", "src/google/protobuf/io/strtod.cc", + "src/google/protobuf/io/io_win32.cc", "src/google/protobuf/io/zero_copy_stream.cc", "src/google/protobuf/io/zero_copy_stream_impl_lite.cc", "src/google/protobuf/message_lite.cc", @@ -124,7 +125,6 @@ cc_library( "src/google/protobuf/stubs/bytestream.cc", "src/google/protobuf/stubs/common.cc", "src/google/protobuf/stubs/int128.cc", - "src/google/protobuf/stubs/io_win32.cc", "src/google/protobuf/stubs/status.cc", "src/google/protobuf/stubs/statusor.cc", "src/google/protobuf/stubs/stringpiece.cc", @@ -514,7 +514,7 @@ cc_binary( cc_test( name = "win32_test", - srcs = ["src/google/protobuf/stubs/io_win32_unittest.cc"], + srcs = ["src/google/protobuf/io/io_win32_unittest.cc"], deps = [ ":protobuf_lite", "//external:gtest_main", @@ -553,6 +553,7 @@ cc_test( "src/google/protobuf/extension_set_unittest.cc", "src/google/protobuf/generated_message_reflection_unittest.cc", "src/google/protobuf/io/coded_stream_unittest.cc", + "src/google/protobuf/io/io_win32_unittest.cc", "src/google/protobuf/io/printer_unittest.cc", "src/google/protobuf/io/tokenizer_unittest.cc", "src/google/protobuf/io/zero_copy_stream_unittest.cc", @@ -572,7 +573,6 @@ cc_test( "src/google/protobuf/stubs/bytestream_unittest.cc", "src/google/protobuf/stubs/common_unittest.cc", "src/google/protobuf/stubs/int128_unittest.cc", - "src/google/protobuf/stubs/io_win32_unittest.cc", "src/google/protobuf/stubs/status_test.cc", "src/google/protobuf/stubs/statusor_test.cc", "src/google/protobuf/stubs/stringpiece_unittest.cc", diff --git a/Makefile.am b/Makefile.am index 95024300f3..903eca7c01 100644 --- a/Makefile.am +++ b/Makefile.am @@ -225,17 +225,25 @@ java_EXTRA_DIST= java/core/src/main/java/com/google/protobuf/AbstractMessageLite.java \ java/core/src/main/java/com/google/protobuf/AbstractParser.java \ java/core/src/main/java/com/google/protobuf/AbstractProtobufList.java \ + java/core/src/main/java/com/google/protobuf/AllocatedBuffer.java \ java/core/src/main/java/com/google/protobuf/Android.java \ + java/core/src/main/java/com/google/protobuf/ArrayDecoders.java \ + java/core/src/main/java/com/google/protobuf/BinaryReader.java \ + java/core/src/main/java/com/google/protobuf/BinaryWriter.java \ java/core/src/main/java/com/google/protobuf/BlockingRpcChannel.java \ java/core/src/main/java/com/google/protobuf/BlockingService.java \ java/core/src/main/java/com/google/protobuf/BooleanArrayList.java \ + java/core/src/main/java/com/google/protobuf/BufferAllocator.java \ java/core/src/main/java/com/google/protobuf/ByteBufferWriter.java \ java/core/src/main/java/com/google/protobuf/ByteOutput.java \ java/core/src/main/java/com/google/protobuf/ByteString.java \ java/core/src/main/java/com/google/protobuf/CodedInputStream.java \ + java/core/src/main/java/com/google/protobuf/CodedInputStreamReader.java \ java/core/src/main/java/com/google/protobuf/CodedOutputStream.java \ - java/core/src/main/java/com/google/protobuf/DiscardUnknownFieldsParser.java \ + java/core/src/main/java/com/google/protobuf/CodedOutputStreamWriter.java \ + java/core/src/main/java/com/google/protobuf/DescriptorMessageInfoFactory.java \ java/core/src/main/java/com/google/protobuf/Descriptors.java \ + java/core/src/main/java/com/google/protobuf/DiscardUnknownFieldsParser.java \ java/core/src/main/java/com/google/protobuf/DoubleArrayList.java \ java/core/src/main/java/com/google/protobuf/DynamicMessage.java \ java/core/src/main/java/com/google/protobuf/ExperimentalApi.java \ @@ -244,37 +252,65 @@ java_EXTRA_DIST= java/core/src/main/java/com/google/protobuf/ExtensionRegistry.java \ java/core/src/main/java/com/google/protobuf/ExtensionRegistryFactory.java \ java/core/src/main/java/com/google/protobuf/ExtensionRegistryLite.java \ + java/core/src/main/java/com/google/protobuf/ExtensionSchema.java \ + java/core/src/main/java/com/google/protobuf/ExtensionSchemaFull.java \ + java/core/src/main/java/com/google/protobuf/ExtensionSchemaLite.java \ + java/core/src/main/java/com/google/protobuf/ExtensionSchemas.java \ + java/core/src/main/java/com/google/protobuf/FieldInfo.java \ java/core/src/main/java/com/google/protobuf/FieldSet.java \ + java/core/src/main/java/com/google/protobuf/FieldType.java \ java/core/src/main/java/com/google/protobuf/FloatArrayList.java \ java/core/src/main/java/com/google/protobuf/GeneratedMessage.java \ + java/core/src/main/java/com/google/protobuf/GeneratedMessageInfoFactory.java \ java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java \ java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java \ java/core/src/main/java/com/google/protobuf/IntArrayList.java \ java/core/src/main/java/com/google/protobuf/Internal.java \ java/core/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java \ java/core/src/main/java/com/google/protobuf/IterableByteBufferInputStream.java \ + java/core/src/main/java/com/google/protobuf/JavaType.java \ java/core/src/main/java/com/google/protobuf/LazyField.java \ java/core/src/main/java/com/google/protobuf/LazyFieldLite.java \ java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java \ java/core/src/main/java/com/google/protobuf/LazyStringList.java \ + java/core/src/main/java/com/google/protobuf/ListFieldSchema.java \ java/core/src/main/java/com/google/protobuf/LongArrayList.java \ + java/core/src/main/java/com/google/protobuf/ManifestSchemaFactory.java \ java/core/src/main/java/com/google/protobuf/MapEntry.java \ java/core/src/main/java/com/google/protobuf/MapEntryLite.java \ java/core/src/main/java/com/google/protobuf/MapField.java \ java/core/src/main/java/com/google/protobuf/MapFieldLite.java \ + java/core/src/main/java/com/google/protobuf/MapFieldSchema.java \ + java/core/src/main/java/com/google/protobuf/MapFieldSchemaFull.java \ + java/core/src/main/java/com/google/protobuf/MapFieldSchemaLite.java \ + java/core/src/main/java/com/google/protobuf/MapFieldSchemas.java \ java/core/src/main/java/com/google/protobuf/Message.java \ + java/core/src/main/java/com/google/protobuf/MessageInfo.java \ + java/core/src/main/java/com/google/protobuf/MessageInfoFactory.java \ java/core/src/main/java/com/google/protobuf/MessageLite.java \ java/core/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java \ java/core/src/main/java/com/google/protobuf/MessageLiteToString.java \ java/core/src/main/java/com/google/protobuf/MessageOrBuilder.java \ java/core/src/main/java/com/google/protobuf/MessageReflection.java \ + java/core/src/main/java/com/google/protobuf/MessageSchema.java \ + java/core/src/main/java/com/google/protobuf/MessageSetSchema.java \ java/core/src/main/java/com/google/protobuf/MutabilityOracle.java \ + java/core/src/main/java/com/google/protobuf/NewInstanceSchema.java \ + java/core/src/main/java/com/google/protobuf/NewInstanceSchemaFull.java \ + java/core/src/main/java/com/google/protobuf/NewInstanceSchemaLite.java \ + java/core/src/main/java/com/google/protobuf/NewInstanceSchemas.java \ java/core/src/main/java/com/google/protobuf/NioByteString.java \ + java/core/src/main/java/com/google/protobuf/OneofInfo.java \ java/core/src/main/java/com/google/protobuf/Parser.java \ java/core/src/main/java/com/google/protobuf/PrimitiveNonBoxingCollection.java \ + java/core/src/main/java/com/google/protobuf/ProtoSyntax.java \ + java/core/src/main/java/com/google/protobuf/Protobuf.java \ java/core/src/main/java/com/google/protobuf/ProtobufArrayList.java \ + java/core/src/main/java/com/google/protobuf/ProtobufLists.java \ java/core/src/main/java/com/google/protobuf/ProtocolMessageEnum.java \ java/core/src/main/java/com/google/protobuf/ProtocolStringList.java \ + java/core/src/main/java/com/google/protobuf/RawMessageInfo.java \ + java/core/src/main/java/com/google/protobuf/Reader.java \ java/core/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java \ java/core/src/main/java/com/google/protobuf/RepeatedFieldBuilderV3.java \ java/core/src/main/java/com/google/protobuf/RopeByteString.java \ @@ -282,30 +318,47 @@ java_EXTRA_DIST= java/core/src/main/java/com/google/protobuf/RpcChannel.java \ java/core/src/main/java/com/google/protobuf/RpcController.java \ java/core/src/main/java/com/google/protobuf/RpcUtil.java \ + java/core/src/main/java/com/google/protobuf/Schema.java \ + java/core/src/main/java/com/google/protobuf/SchemaFactory.java \ + java/core/src/main/java/com/google/protobuf/SchemaUtil.java \ java/core/src/main/java/com/google/protobuf/Service.java \ java/core/src/main/java/com/google/protobuf/ServiceException.java \ java/core/src/main/java/com/google/protobuf/SingleFieldBuilder.java \ java/core/src/main/java/com/google/protobuf/SingleFieldBuilderV3.java \ java/core/src/main/java/com/google/protobuf/SmallSortedMap.java \ + java/core/src/main/java/com/google/protobuf/StructuralMessageInfo.java \ java/core/src/main/java/com/google/protobuf/TextFormat.java \ java/core/src/main/java/com/google/protobuf/TextFormatEscaper.java \ java/core/src/main/java/com/google/protobuf/TextFormatParseInfoTree.java \ java/core/src/main/java/com/google/protobuf/TextFormatParseLocation.java \ java/core/src/main/java/com/google/protobuf/UninitializedMessageException.java \ + java/core/src/main/java/com/google/protobuf/UnknownFieldSchema.java \ java/core/src/main/java/com/google/protobuf/UnknownFieldSet.java \ java/core/src/main/java/com/google/protobuf/UnknownFieldSetLite.java \ + java/core/src/main/java/com/google/protobuf/UnknownFieldSetLiteSchema.java \ + java/core/src/main/java/com/google/protobuf/UnknownFieldSetSchema.java \ java/core/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java \ java/core/src/main/java/com/google/protobuf/UnsafeByteOperations.java \ java/core/src/main/java/com/google/protobuf/UnsafeUtil.java \ java/core/src/main/java/com/google/protobuf/Utf8.java \ java/core/src/main/java/com/google/protobuf/WireFormat.java \ + java/core/src/main/java/com/google/protobuf/Writer.java \ java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java \ + java/core/src/test/java/com/google/protobuf/AbstractProto2LiteSchemaTest.java \ + java/core/src/test/java/com/google/protobuf/AbstractProto2SchemaTest.java \ + java/core/src/test/java/com/google/protobuf/AbstractProto3LiteSchemaTest.java \ + java/core/src/test/java/com/google/protobuf/AbstractProto3SchemaTest.java \ + java/core/src/test/java/com/google/protobuf/AbstractSchemaTest.java \ java/core/src/test/java/com/google/protobuf/AnyTest.java \ + java/core/src/test/java/com/google/protobuf/ArrayDecodersTest.java \ + java/core/src/test/java/com/google/protobuf/BinaryProtocolTest.java \ java/core/src/test/java/com/google/protobuf/BooleanArrayListTest.java \ java/core/src/test/java/com/google/protobuf/BoundedByteStringTest.java \ java/core/src/test/java/com/google/protobuf/ByteBufferWriterTest.java \ java/core/src/test/java/com/google/protobuf/ByteStringTest.java \ + java/core/src/test/java/com/google/protobuf/CachedFieldSizeTest.java \ java/core/src/test/java/com/google/protobuf/CheckUtf8Test.java \ + java/core/src/test/java/com/google/protobuf/CodedAdapterTest.java \ java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java \ java/core/src/test/java/com/google/protobuf/CodedOutputStreamTest.java \ java/core/src/test/java/com/google/protobuf/DecodeUtf8Test.java \ @@ -315,6 +368,9 @@ java_EXTRA_DIST= java/core/src/test/java/com/google/protobuf/DoubleArrayListTest.java \ java/core/src/test/java/com/google/protobuf/DynamicMessageTest.java \ java/core/src/test/java/com/google/protobuf/EnumTest.java \ + java/core/src/test/java/com/google/protobuf/ExperimentalMessageFactory.java \ + java/core/src/test/java/com/google/protobuf/ExperimentalSerializationUtil.java \ + java/core/src/test/java/com/google/protobuf/ExperimentalTestDataProvider.java \ java/core/src/test/java/com/google/protobuf/ExtensionRegistryFactoryTest.java \ java/core/src/test/java/com/google/protobuf/FieldPresenceTest.java \ java/core/src/test/java/com/google/protobuf/FloatArrayListTest.java \ @@ -329,17 +385,32 @@ java_EXTRA_DIST= java/core/src/test/java/com/google/protobuf/LazyStringArrayListTest.java \ java/core/src/test/java/com/google/protobuf/LazyStringEndToEndTest.java \ java/core/src/test/java/com/google/protobuf/LiteEqualsAndHashTest.java \ - java/core/src/test/java/com/google/protobuf/LiteTest.java \ java/core/src/test/java/com/google/protobuf/LiteralByteStringTest.java \ java/core/src/test/java/com/google/protobuf/LongArrayListTest.java \ java/core/src/test/java/com/google/protobuf/MapForProto2LiteTest.java \ java/core/src/test/java/com/google/protobuf/MapForProto2Test.java \ + java/core/src/test/java/com/google/protobuf/MapLiteTest.java \ java/core/src/test/java/com/google/protobuf/MapTest.java \ java/core/src/test/java/com/google/protobuf/MessageTest.java \ java/core/src/test/java/com/google/protobuf/NestedBuildersTest.java \ java/core/src/test/java/com/google/protobuf/NioByteStringTest.java \ + java/core/src/test/java/com/google/protobuf/PackedFieldTest.java \ java/core/src/test/java/com/google/protobuf/ParseExceptionsTest.java \ + java/core/src/test/java/com/google/protobuf/ParserLiteTest.java \ java/core/src/test/java/com/google/protobuf/ParserTest.java \ + java/core/src/test/java/com/google/protobuf/Proto2ExtensionLookupSchemaTest.java \ + java/core/src/test/java/com/google/protobuf/Proto2LiteSchemaTest.java \ + java/core/src/test/java/com/google/protobuf/Proto2MessageFactory.java \ + java/core/src/test/java/com/google/protobuf/Proto2MessageInfoFactory.java \ + java/core/src/test/java/com/google/protobuf/Proto2MessageLiteFactory.java \ + java/core/src/test/java/com/google/protobuf/Proto2SchemaTest.java \ + java/core/src/test/java/com/google/protobuf/Proto2UnknownEnumValueTest.java \ + java/core/src/test/java/com/google/protobuf/Proto3LiteSchemaTest.java \ + java/core/src/test/java/com/google/protobuf/Proto3MessageFactory.java \ + java/core/src/test/java/com/google/protobuf/Proto3MessageInfoFactory.java \ + java/core/src/test/java/com/google/protobuf/Proto3MessageLiteFactory.java \ + java/core/src/test/java/com/google/protobuf/Proto3MessageLiteInfoFactory.java \ + java/core/src/test/java/com/google/protobuf/Proto3SchemaTest.java \ java/core/src/test/java/com/google/protobuf/ProtobufArrayListTest.java \ java/core/src/test/java/com/google/protobuf/RepeatedFieldBuilderV3Test.java \ java/core/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java \ @@ -349,18 +420,25 @@ java_EXTRA_DIST= java/core/src/test/java/com/google/protobuf/SmallSortedMapTest.java \ java/core/src/test/java/com/google/protobuf/TestBadIdentifiers.java \ java/core/src/test/java/com/google/protobuf/TestBadIdentifiersLite.java \ + java/core/src/test/java/com/google/protobuf/TestSchemas.java \ + java/core/src/test/java/com/google/protobuf/TestSchemasLite.java \ java/core/src/test/java/com/google/protobuf/TestUtil.java \ java/core/src/test/java/com/google/protobuf/TestUtilLite.java \ java/core/src/test/java/com/google/protobuf/TextFormatParseInfoTreeTest.java \ java/core/src/test/java/com/google/protobuf/TextFormatParseLocationTest.java \ java/core/src/test/java/com/google/protobuf/TextFormatTest.java \ java/core/src/test/java/com/google/protobuf/UnknownEnumValueTest.java \ - java/core/src/test/java/com/google/protobuf/UnknownFieldSetLiteTest.java \ java/core/src/test/java/com/google/protobuf/UnknownFieldSetTest.java \ java/core/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java \ + java/core/src/test/java/com/google/protobuf/Utf8Test.java \ + java/core/src/test/java/com/google/protobuf/Utf8Utils.java \ java/core/src/test/java/com/google/protobuf/WellKnownTypesTest.java \ + java/core/src/test/java/com/google/protobuf/WireFormatLiteTest.java \ java/core/src/test/java/com/google/protobuf/WireFormatTest.java \ + java/core/src/test/java/com/google/protobuf/WrappersLiteOfMethodTest.java \ + java/core/src/test/java/com/google/protobuf/WrappersOfMethodTest.java \ java/core/src/test/proto/com/google/protobuf/any_test.proto \ + java/core/src/test/proto/com/google/protobuf/cached_field_size_test.proto \ java/core/src/test/proto/com/google/protobuf/deprecated_file.proto \ java/core/src/test/proto/com/google/protobuf/field_presence_test.proto \ java/core/src/test/proto/com/google/protobuf/lazy_fields_lite.proto \ @@ -370,6 +448,7 @@ java_EXTRA_DIST= java/core/src/test/proto/com/google/protobuf/map_initialization_order_test.proto \ java/core/src/test/proto/com/google/protobuf/map_lite_test.proto \ java/core/src/test/proto/com/google/protobuf/map_test.proto \ + java/core/src/test/proto/com/google/protobuf/message_lite_extension_util_test.proto\ java/core/src/test/proto/com/google/protobuf/multiple_files_test.proto \ java/core/src/test/proto/com/google/protobuf/nested_builders_test.proto \ java/core/src/test/proto/com/google/protobuf/nested_extension.proto \ @@ -379,13 +458,26 @@ java_EXTRA_DIST= java/core/src/test/proto/com/google/protobuf/outer_class_name_test.proto \ java/core/src/test/proto/com/google/protobuf/outer_class_name_test2.proto \ java/core/src/test/proto/com/google/protobuf/outer_class_name_test3.proto \ + java/core/src/test/proto/com/google/protobuf/packed_field_test.proto \ + java/core/src/test/proto/com/google/protobuf/proto2_message.proto \ + java/core/src/test/proto/com/google/protobuf/proto2_message_lite.proto \ java/core/src/test/proto/com/google/protobuf/proto2_unknown_enum_values.proto \ + java/core/src/test/proto/com/google/protobuf/proto3_message.proto \ + java/core/src/test/proto/com/google/protobuf/proto3_message_lite.proto \ java/core/src/test/proto/com/google/protobuf/test_bad_identifiers.proto \ java/core/src/test/proto/com/google/protobuf/test_check_utf8.proto \ java/core/src/test/proto/com/google/protobuf/test_check_utf8_size.proto \ java/core/src/test/proto/com/google/protobuf/test_custom_options.proto \ java/core/src/test/proto/com/google/protobuf/test_extra_interfaces.proto \ + java/core/src/test/proto/com/google/protobuf/wrappers_test.proto \ java/lite.md \ + java/lite/generate-sources-build.xml \ + java/lite/generate-test-sources-build.xml \ + java/lite/lite.awk \ + java/lite/pom.xml \ + java/lite/process-lite-sources-build.xml \ + java/lite/src/test/java/com/google/protobuf/LiteTest.java \ + java/lite/src/test/java/com/google/protobuf/Proto2MessageLiteInfoFactory.java \ java/pom.xml \ java/util/pom.xml \ java/util/src/main/java/com/google/protobuf/util/Durations.java \ @@ -812,6 +904,7 @@ python_EXTRA_DIST= \ python/google/protobuf/internal/import_test_package/inner.proto \ python/google/protobuf/internal/import_test_package/outer.proto \ python/google/protobuf/internal/json_format_test.py \ + python/google/protobuf/internal/keywords_test.py \ python/google/protobuf/internal/message_factory_test.py \ python/google/protobuf/internal/message_listener.py \ python/google/protobuf/internal/message_set_extensions.proto \ @@ -879,7 +972,6 @@ python_EXTRA_DIST= \ python/google/protobuf/pyext/repeated_scalar_container.h \ python/google/protobuf/pyext/safe_numerics.h \ python/google/protobuf/pyext/scoped_pyobject_ptr.h \ - python/google/protobuf/pyext/thread_unsafe_shared_ptr.h \ python/google/protobuf/reflection.py \ python/google/protobuf/service.py \ python/google/protobuf/service_reflection.py \ diff --git a/conformance/Makefile.am b/conformance/Makefile.am index 495b462b9d..e47fd1081d 100644 --- a/conformance/Makefile.am +++ b/conformance/Makefile.am @@ -362,7 +362,7 @@ test_php_zts_c: protoc_middleman conformance-test-runner conformance-php-c $(oth # These depend on library paths being properly set up. The easiest way to # run them is to just use "tox" from the python dir. test_python: protoc_middleman conformance-test-runner - ./conformance-test-runner --enforce_recommended --failure_list failure_list_python.txt ./conformance_python.py + ./conformance-test-runner --enforce_recommended --failure_list failure_list_python.txt --text_format_failure_list text_format_failure_list_python.txt ./conformance_python.py test_python_cpp: protoc_middleman conformance-test-runner ./conformance-test-runner --enforce_recommended --failure_list failure_list_python_cpp.txt ./conformance_python.py diff --git a/csharp/src/Google.Protobuf.Test/testprotos.pb b/csharp/src/Google.Protobuf.Test/testprotos.pb index b66c4eef71e4dafa56f03d3db248773908970218..9c68af0849e5121ef8a32d0c087f951b74f8b70c 100644 GIT binary patch delta 1436 zcmY+DU1*zC7{}l9oRhE9G|79Cw3_ZCMvF9S-Ik@os&kZ>wpptTXQxMu6gA=6a8%oQJl{J@nxh*10(AcI@~hXfR# zfcyO|2lAN94l4e9ac(e-%l-+P2v#=_QFN zK8@`}cI+fd_PQ%BA(W;Ole0R1pjqd6s`GJrW6IP4mQyb5Ej zh2vg@vDGl#i(Cq4nrw^zYm%JjH?JcY8pYx~Q--+ne_-%s$D;m^1EC`NVP z8S2lEim*%M@Q+54US(Uly5&IIkH=HdOJ`_*zT)$70=(k$1^gB89Y5wYuD^wU-?+cu z0Q}?regp82W4~)mQUHf`!Z@i5^RyN_5s1l*6aicp#V7UFJnh;&Nl`nNtzoB=@q}#R zH$h5F8PhtqK+V`x*px%aO7?G6eSLwRK3pZ|?4V())edLIsF0*;Iwy$=NvfHinc$oC zbLY<;lE3bk`r}V2t4C|}b>zh-hPw---Kon4|A(u3CQG?CJQe}LgW&q0#65K& N43HJ8vq{IV{0r0h-oO9= delta 1441 zcmY+DPfT1@6vp2@_r77c%pc}LZ8J005hbQWv8~f-Q)(s^={OQZG=v&MrZS~daEP@X zu$mw`R6}K z-1GPC(2uu6Ul(q$<<*yO+_c&K)xW;F6ur8zR=T{s=4`LAR}ZnI&aJa-ES`{0$$((O zBBuC&Na|14*J3@dD)VhAaCJq4*%=*EaqSu@xVJ{JH0T+G7V4 zABOzHhFgg*w+HFmb+;-$3VEgOKAHF2Qt>hIxZbX_Q?Ynb z`s_Bv-+(-}Y1qkTmm$U9g#5*(X(!p7Nm%i5$Ukoyc2fG4L=-PV?%pz$BxSevWK{9D zAWvQHda^&NnBtR=|JZWbzN{24Lq7h19j18Fx$uCUImBk2@GbU!Ku1cn zOP9K-0_9#e^#)l*|IWJucBqlIBtsKt-4)=DtyM_5}$b;!$H3U}pIr}F@P z%Jx^O(&?EP0M#ad0Z!%nP5a7Yv3)#vwCEb zj`w9L)9#mmrDw^1%K|;SE8*ur&+dIfenXN3QzB;#J9j4OMb@4}1zmu$prynKdPVOk zQ&;3fFeINbD&eVqT`1GObiZ(Gg$8ziWKV;Q2<-kuQtoT`ks8p;W$H-}2{J`L7zNF`_lyx^oSh(LTiT~8Ovk4WpBf8 z?nW=4qXX%|CLa^vgH67Ge-M1vZw^ZT4u8*3vtJwjp=Q4}{6pw>g-Nn8v{CDn9-g9= zmqzV~j7wqTr{F{=77wR}=VoS7?@i3ioqe`343h(Fj6$YZ6QTdHXuDhlOpp@e)@hxa zrp3s3FedxZ0U20P-P6+XDT?hkY$>~|7k?a2gQ!3te diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs index 2e5809f2fa..9df237cfc0 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs @@ -113,11 +113,13 @@ namespace Google.Protobuf.WellKnownTypes { /// 01:30 UTC on January 15, 2017. /// /// In JavaScript, one can convert a Date object to this format using the - /// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + /// standard + /// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) /// method. In Python, a standard `datetime.datetime` object can be converted - /// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - /// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - /// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( + /// to this format using + /// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + /// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + /// the Joda Time's [`ISODateTimeFormat.dateTime()`]( /// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D /// ) to obtain a formatter capable of generating timestamps in this format. /// diff --git a/java/core/generate-test-sources-build.xml b/java/core/generate-test-sources-build.xml index 6016353471..92c0b1c8ae 100644 --- a/java/core/generate-test-sources-build.xml +++ b/java/core/generate-test-sources-build.xml @@ -5,43 +5,56 @@ - + + + + + - - - - - - - + + + + + + + + + + + - - - - + + + + + + + - - - - - - - + + + + + + + + + diff --git a/java/lite/generate-sources-build.xml b/java/lite/generate-sources-build.xml new file mode 100644 index 0000000000..74d96a2f10 --- /dev/null +++ b/java/lite/generate-sources-build.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/java/lite/generate-test-sources-build.xml b/java/lite/generate-test-sources-build.xml new file mode 100644 index 0000000000..1c1a18c544 --- /dev/null +++ b/java/lite/generate-test-sources-build.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/lite/lite.awk b/java/lite/lite.awk new file mode 100644 index 0000000000..b22d965b6f --- /dev/null +++ b/java/lite/lite.awk @@ -0,0 +1,25 @@ +# Remove code enclosed by "BEGIN FULL-RUNTIME" and "END FULL-RUNTIME" to +# create the lite-only version of a test file. + +BEGIN { + in_full_runtime = 0; +} + +/BEGIN FULL-RUNTIME/ { + in_full_runtime = 1; + next; +} + +/END FULL-RUNTIME/ { + in_full_runtime = 0; + next; +} + +in_full_runtime { + # Skip full runtime code path. + next; +} + +{ + print; +} diff --git a/java/lite/pom.xml b/java/lite/pom.xml new file mode 100644 index 0000000000..f63e275d91 --- /dev/null +++ b/java/lite/pom.xml @@ -0,0 +1,344 @@ + + + 4.0.0 + + com.google.protobuf + protobuf-parent + 3.7.0 + + + protobuf-javalite + bundle + + Protocol Buffers [Lite] + + Lite version of Protocol Buffers library. This version is optimized for code size, but does + not guarantee API/ABI stability. + + + + + junit + junit + test + + + org.easymock + easymock + test + + + org.easymock + easymockclassextension + test + + + com.google.guava + guava + test + + + + + + + + ${protobuf.source.dir} + + google/protobuf/any.proto + google/protobuf/api.proto + google/protobuf/empty.proto + google/protobuf/field_mask.proto + google/protobuf/source_context.proto + google/protobuf/struct.proto + google/protobuf/timestamp.proto + google/protobuf/type.proto + google/protobuf/wrappers.proto + + + + + + ${protobuf.source.dir} + + google/protobuf/testdata/golden_message_oneof_implemented + google/protobuf/testdata/golden_packed_fields_message + + + + + + + maven-resources-plugin + 3.1.0 + + + copy-source-files + generate-sources + + copy-resources + + + ${generated.sources.dir}/com/google/protobuf + + + ${basedir}/../core/src/main/java/com/google/protobuf + + AbstractMessageLite.java + AbstractParser.java + AbstractProtobufList.java + AllocatedBuffer.java + Android.java + ArrayDecoders.java + BinaryReader.java + BinaryWriter.java + BooleanArrayList.java + BufferAllocator.java + ByteBufferWriter.java + ByteOutput.java + ByteString.java + CodedInputStream.java + CodedInputStreamReader.java + CodedOutputStream.java + CodedOutputStreamWriter.java + DoubleArrayList.java + ExperimentalApi.java + ExtensionLite.java + ExtensionRegistryFactory.java + ExtensionRegistryLite.java + ExtensionSchema.java + ExtensionSchemaLite.java + ExtensionSchemas.java + FieldInfo.java + FieldSet.java + FieldType.java + FloatArrayList.java + GeneratedExtensionRegistryLoader.java + GeneratedMessageInfoFactory.java + GeneratedMessageLite.java + IntArrayList.java + Internal.java + InvalidProtocolBufferException.java + IterableByteBufferInputStream.java + JavaType.java + LazyField.java + LazyFieldLite.java + LazyStringArrayList.java + LazyStringList.java + ListFieldSchema.java + LongArrayList.java + ManifestSchemaFactory.java + MapEntryLite.java + MapFieldLite.java + MapFieldSchema.java + MapFieldSchemaLite.java + MapFieldSchemas.java + MessageInfo.java + MessageInfoFactory.java + MessageLite.java + MessageLiteOrBuilder.java + MessageLiteToString.java + MessageSchema.java + MessageSetSchema.java + MutabilityOracle.java + NewInstanceSchema.java + NewInstanceSchemaLite.java + NewInstanceSchemas.java + NioByteString.java + OneofInfo.java + Parser.java + PrimitiveNonBoxingCollection.java + ProtoField.java + ProtoMessage.java + ProtoOneof.java + ProtoOneofCase.java + ProtoPresenceBits.java + ProtoPresenceCheckedField.java + ProtoSyntax.java + Protobuf.java + ProtobufArrayList.java + ProtobufLists.java + ProtocolStringList.java + RawMessageInfo.java + Reader.java + RopeByteString.java + Schema.java + SchemaFactory.java + SchemaUtil.java + SmallSortedMap.java + StructuralMessageInfo.java + TextFormatEscaper.java + UninitializedMessageException.java + UnknownFieldSchema.java + UnknownFieldSetLite.java + UnknownFieldSetLiteSchema.java + UnmodifiableLazyStringList.java + UnsafeUtil.java + Utf8.java + WireFormat.java + Writer.java + + + + + + + copy-test-source-files + generate-test-sources + + copy-resources + + + ${generated.testsources.dir}/com/google/protobuf + + + ${basedir}/../core/src/test/java/com/google/protobuf + + + AbstractMessageTest.java + AbstractProto2SchemaTest.java + AnyTest.java + CodedInputStreamTest.java + DeprecatedFieldTest.java + DescriptorsTest.java + DiscardUnknownFieldsTest.java + DynamicMessageTest.java + ExtensionRegistryFactoryTest.java + FieldPresenceTest.java + ForceFieldBuildersPreRun.java + GeneratedMessageTest.java + LazyFieldTest.java + LazyStringEndToEndTest.java + MapForProto2Test.java + MapTest.java + MessageTest.java + NestedBuildersTest.java + PackedFieldTest.java + ParserTest.java + ParseExceptionsTest.java + Proto2ExtensionLookupSchemaTest.java + Proto2SchemaTest.java + Proto2UnknownEnumValueTest.java + RepeatedFieldBuilderV3Test.java + ServiceTest.java + SingleFieldBuilderV3Test.java + TestBadIdentifiers.java + TextFormatParseInfoTreeTest.java + TextFormatParseLocationTest.java + TextFormatTest.java + TestUtil.java + UnknownEnumValueTest.java + UnknownFieldSetLiteTest.java + UnknownFieldSetTest.java + WellKnownTypesTest.java + WireFormatTest.java + + + + + + + + + + + maven-antrun-plugin + + + + generate-sources + generate-sources + + + + + + + run + + + + + + generate-test-sources + generate-test-sources + + + + + + + run + + + + + process-lite-sources + generate-test-sources + + + + + + + run + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-generated-sources + generate-sources + + add-source + + + + ${generated.sources.dir} + + + + + + add-generated-test-sources + generate-test-sources + + add-test-source + + + + ${generated.testsources.dir} + + + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + https://developers.google.com/protocol-buffers/ + com.google.protobuf + com.google.protobuf;version=${project.version} + sun.misc;resolution:=optional,* + + + + + + + diff --git a/java/lite/process-lite-sources-build.xml b/java/lite/process-lite-sources-build.xml new file mode 100644 index 0000000000..d49cf3aac0 --- /dev/null +++ b/java/lite/process-lite-sources-build.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/java/pom.xml b/java/pom.xml index 07e366f4bb..5291f9c113 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -223,6 +223,7 @@ bom + lite core util diff --git a/objectivec/google/protobuf/Timestamp.pbobjc.h b/objectivec/google/protobuf/Timestamp.pbobjc.h index f6ea25ca11..591dbe386d 100644 --- a/objectivec/google/protobuf/Timestamp.pbobjc.h +++ b/objectivec/google/protobuf/Timestamp.pbobjc.h @@ -129,11 +129,13 @@ typedef GPB_ENUM(GPBTimestamp_FieldNumber) { * 01:30 UTC on January 15, 2017. * * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + * standard + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( + * to this format using + * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + * the Joda Time's [`ISODateTimeFormat.dateTime()`]( * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D * ) to obtain a formatter capable of generating timestamps in this format. **/