Add dependencies locally

This commit is contained in:
Ahrimdon
2024-03-07 05:13:50 -05:00
parent e4a5cd056e
commit 9a56906be7
9538 changed files with 3064916 additions and 107 deletions

View File

@ -0,0 +1,19 @@
<project name="generate-sources">
<echo message="Running protoc ..."/>
<mkdir dir="${generated.sources.dir}"/>
<exec executable="${protoc}">
<arg value="--java_out=lite:${generated.sources.dir}"/>
<arg value="--proto_path=${protobuf.source.dir}"/>
<arg value="${protobuf.source.dir}/google/protobuf/any.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/api.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/duration.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/empty.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/field_mask.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/source_context.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/struct.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/timestamp.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/type.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/wrappers.proto"/>
</exec>
</project>

View File

@ -0,0 +1,52 @@
<project name="generate-test-sources">
<mkdir dir="${generated.testsources.dir}"/>
<exec executable="${protoc}">
<arg value="--java_out=lite:${generated.testsources.dir}"/>
<arg value="--proto_path=${protobuf.source.dir}"/>
<arg value="--proto_path=${protobuf.basedir}/java/core/${test.proto.dir}"/>
<arg value="${protobuf.source.dir}/google/protobuf/descriptor.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/map_lite_unittest.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_public.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_public_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_mset.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_mset_wire_format.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_no_generic_services.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_optimize_for.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_proto3.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_proto3_optional.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_well_known_types.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/any_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/cached_field_size_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/deprecated_file.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/field_presence_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/lazy_fields_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/lite_equals_and_hash.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_for_proto2_lite_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_for_proto2_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_initialization_order_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_lite_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/nested_builders_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/nested_extension.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/nested_extension_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/non_nested_extension.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/non_nested_extension_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/outer_class_name_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/outer_class_name_test2.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/outer_class_name_test3.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/packed_field_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto2_message.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto2_message_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto2_unknown_enum_values.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto3_message.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto3_message_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/test_bad_identifiers.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/test_check_utf8.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/test_check_utf8_size.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/wrappers_test.proto"/>
</exec>
</project>

25
deps/protobuf/java/lite/lite.awk vendored Normal file
View File

@ -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;
}

347
deps/protobuf/java/lite/pom.xml vendored Normal file
View File

@ -0,0 +1,347 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>3.20.3</version>
</parent>
<artifactId>protobuf-javalite</artifactId>
<packaging>bundle</packaging>
<name>Protocol Buffers [Lite]</name>
<description>
Lite version of Protocol Buffers library. This version is optimized for code size, but does
not guarantee API/ABI stability.
</description>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- Include core protos in the bundle as resources -->
<resources>
<resource>
<directory>${protobuf.source.dir}</directory>
<includes>
<include>google/protobuf/any.proto</include>
<include>google/protobuf/api.proto</include>
<include>google/protobuf/duration.proto</include>
<include>google/protobuf/empty.proto</include>
<include>google/protobuf/field_mask.proto</include>
<include>google/protobuf/source_context.proto</include>
<include>google/protobuf/struct.proto</include>
<include>google/protobuf/timestamp.proto</include>
<include>google/protobuf/type.proto</include>
<include>google/protobuf/wrappers.proto</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>${protobuf.source.dir}</directory>
<includes>
<include>google/protobuf/testdata/golden_message_oneof_implemented</include>
<include>google/protobuf/testdata/golden_packed_fields_message</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-source-files</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${generated.sources.dir}/com/google/protobuf</outputDirectory>
<resources>
<resource>
<directory>${basedir}/../core/src/main/java/com/google/protobuf</directory>
<includes>
<!-- Keep in sync with //java/core:BUILD -->
<include>AbstractMessageLite.java</include>
<include>AbstractParser.java</include>
<include>AbstractProtobufList.java</include>
<include>AllocatedBuffer.java</include>
<include>Android.java</include>
<include>ArrayDecoders.java</include>
<include>BinaryReader.java</include>
<include>BinaryWriter.java</include>
<include>BooleanArrayList.java</include>
<include>BufferAllocator.java</include>
<include>ByteBufferWriter.java</include>
<include>ByteOutput.java</include>
<include>ByteString.java</include>
<include>CanIgnoreReturnValue.java</include>
<include>CheckReturnValue.java</include>
<include>CodedInputStream.java</include>
<include>CodedInputStreamReader.java</include>
<include>CodedOutputStream.java</include>
<include>CodedOutputStreamWriter.java</include>
<include>CompileTimeConstant.java</include>
<include>DoubleArrayList.java</include>
<include>ExperimentalApi.java</include>
<include>ExtensionLite.java</include>
<include>ExtensionRegistryFactory.java</include>
<include>ExtensionRegistryLite.java</include>
<include>ExtensionSchema.java</include>
<include>ExtensionSchemaLite.java</include>
<include>ExtensionSchemas.java</include>
<include>FieldInfo.java</include>
<include>FieldSet.java</include>
<include>FieldType.java</include>
<include>FloatArrayList.java</include>
<include>GeneratedMessageInfoFactory.java</include>
<include>GeneratedMessageLite.java</include>
<include>InlineMe.java</include>
<include>IntArrayList.java</include>
<include>Internal.java</include>
<include>InvalidProtocolBufferException.java</include>
<include>IterableByteBufferInputStream.java</include>
<include>Java8Compatibility.java</include>
<include>JavaType.java</include>
<include>LazyField.java</include>
<include>LazyFieldLite.java</include>
<include>LazyStringArrayList.java</include>
<include>LazyStringList.java</include>
<include>ListFieldSchema.java</include>
<include>LongArrayList.java</include>
<include>ManifestSchemaFactory.java</include>
<include>MapEntryLite.java</include>
<include>MapFieldLite.java</include>
<include>MapFieldSchema.java</include>
<include>MapFieldSchemaLite.java</include>
<include>MapFieldSchemas.java</include>
<include>MessageInfo.java</include>
<include>MessageInfoFactory.java</include>
<include>MessageLite.java</include>
<include>MessageLiteOrBuilder.java</include>
<include>MessageLiteToString.java</include>
<include>MessageSchema.java</include>
<include>MessageSetSchema.java</include>
<include>MutabilityOracle.java</include>
<include>NewInstanceSchema.java</include>
<include>NewInstanceSchemaLite.java</include>
<include>NewInstanceSchemas.java</include>
<include>NioByteString.java</include>
<include>OneofInfo.java</include>
<include>Parser.java</include>
<include>PrimitiveNonBoxingCollection.java</include>
<include>ProtoSyntax.java</include>
<include>Protobuf.java</include>
<include>ProtobufArrayList.java</include>
<include>ProtobufLists.java</include>
<include>ProtocolStringList.java</include>
<include>RawMessageInfo.java</include>
<include>Reader.java</include>
<include>RopeByteString.java</include>
<include>Schema.java</include>
<include>SchemaFactory.java</include>
<include>SchemaUtil.java</include>
<include>SmallSortedMap.java</include>
<include>StructuralMessageInfo.java</include>
<include>TextFormatEscaper.java</include>
<include>UninitializedMessageException.java</include>
<include>UnknownFieldSchema.java</include>
<include>UnknownFieldSetLite.java</include>
<include>UnknownFieldSetLiteSchema.java</include>
<include>UnmodifiableLazyStringList.java</include>
<include>UnsafeByteOperations.java</include>
<include>UnsafeUtil.java</include>
<include>Utf8.java</include>
<include>WireFormat.java</include>
<include>Writer.java</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-test-source-files</id>
<phase>generate-test-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${generated.testsources.dir}/com/google/protobuf</outputDirectory>
<resources>
<resource>
<directory>${basedir}/../core/src/test/java/com/google/protobuf</directory>
<!-- For sources, we want to be explicit about what we add so we don't accidentally
increase the size of the lite runtime library. For tests, we want to be defensive
and exclude only the full runtime exclusive tests so we don't accidentally miss
any test. -->
<excludes>
<!-- Keep in sync with //java/core:lite_tests BUILD rule. -->
<exclude>AbstractMessageTest.java</exclude>
<exclude>AbstractProto2SchemaTest.java</exclude>
<exclude>AnyTest.java</exclude>
<exclude>CodedInputStreamTest.java</exclude>
<exclude>DeprecatedFieldTest.java</exclude>
<exclude>DescriptorsTest.java</exclude>
<exclude>DiscardUnknownFieldsTest.java</exclude>
<exclude>DynamicMessageTest.java</exclude>
<exclude>ExtensionRegistryFactoryTest.java</exclude>
<exclude>FieldPresenceTest.java</exclude>
<exclude>ForceFieldBuildersPreRun.java</exclude>
<exclude>GeneratedMessageTest.java</exclude>
<exclude>LazyFieldTest.java</exclude>
<exclude>LazyStringEndToEndTest.java</exclude>
<exclude>MapForProto2Test.java</exclude>
<exclude>MapTest.java</exclude>
<exclude>MessageTest.java</exclude>
<exclude>NestedBuildersTest.java</exclude>
<exclude>PackedFieldTest.java</exclude>
<exclude>ParserTest.java</exclude>
<exclude>ParseExceptionsTest.java</exclude>
<exclude>Proto2ExtensionLookupSchemaTest.java</exclude>
<exclude>Proto2SchemaTest.java</exclude>
<exclude>Proto2UnknownEnumValueTest.java</exclude>
<exclude>RepeatedFieldBuilderV3Test.java</exclude>
<exclude>ServiceTest.java</exclude>
<exclude>SingleFieldBuilderV3Test.java</exclude>
<exclude>TestBadIdentifiers.java</exclude>
<exclude>TextFormatParseInfoTreeTest.java</exclude>
<exclude>TextFormatParseLocationTest.java</exclude>
<exclude>TextFormatTest.java</exclude>
<exclude>TestUtil.java</exclude>
<exclude>TypeRegistryTest.java</exclude>
<exclude>UnknownEnumValueTest.java</exclude>
<exclude>UnknownFieldSetLiteTest.java</exclude>
<exclude>UnknownFieldSetPerformanceTest.java</exclude>
<exclude>UnknownFieldSetTest.java</exclude>
<exclude>WellKnownTypesTest.java</exclude>
<exclude>WireFormatTest.java</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Use Antrun plugin to generate sources with protoc -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!-- Generate core protos -->
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<target>
<ant antfile="generate-sources-build.xml"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<!-- Generate the test protos -->
<execution>
<id>generate-test-sources</id>
<phase>generate-test-sources</phase>
<configuration>
<target>
<ant antfile="generate-test-sources-build.xml"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>process-lite-sources</id>
<phase>generate-test-sources</phase>
<configuration>
<target>
<ant antfile="process-lite-sources-build.xml"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-generated-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.sources.dir}</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-generated-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.testsources.dir}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!-- OSGI bundle configuration -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Automatic-Module-Name>com.google.protobuf</Automatic-Module-Name> <!-- Java9+ Jigsaw module name -->
<Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
<Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName>
<Export-Package>com.google.protobuf;version=${project.version}</Export-Package>
<Import-Package>sun.misc;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>{groupId}</groupId>
<artifactId>protobuf-parent</artifactId>
<version>{version}</version>
</parent>
<artifactId>{artifactId}</artifactId>
<packaging>{type}</packaging>
<name>Protocol Buffers [Lite]</name>
<description>
Lite version of Protocol Buffers library. This version is optimized for code size, but does
not guarantee API/ABI stability.
</description>
</project>

View File

@ -0,0 +1,7 @@
<project name="process-lite-sources">
<exec executable="awk" output="${generated.testsources.dir}/com/google/protobuf/TestUtil.java">
<arg value="-f" />
<arg value="${basedir}/lite.awk" />
<arg value="${basedir}/../core/src/test/java/com/google/protobuf/TestUtil.java" />
</exec>
</project>

View File

@ -0,0 +1,8 @@
# Skip runtime check for isOnAndroidDevice().
# One line to make it easy to remove with sed.
-assumevalues class com.google.protobuf.Android { static boolean ASSUME_ANDROID return true; }
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
<fields>;
}

File diff suppressed because it is too large Load Diff