Remove errorprone dependency from kotlin protos.

PiperOrigin-RevId: 512960332
pull/11696/head
Deanna Garcia 2 years ago committed by Copybara-Service
parent 2dc5338ea2
commit 7b6e828215
  1. 1
      java/kotlin/BUILD.bazel
  2. 5
      java/kotlin/pom.xml
  3. 6
      src/google/protobuf/compiler/java/message.cc
  4. 6
      src/google/protobuf/compiler/java/message_lite.cc

@ -25,7 +25,6 @@ kt_jvm_library(
deps = [
":only_for_use_in_proto_generated_code_its_generator_and_tests",
"//java/lite",
"@maven//:com_google_errorprone_error_prone_annotations",
],
)

@ -34,11 +34,6 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>

@ -1305,9 +1305,6 @@ void ImmutableMessageGenerator::GenerateKotlinMembers(
"camelcase_name",
name_resolver_->GetKotlinFactoryName(descriptor_));
if (!context_->options().opensource_runtime) {
printer->Print("@com.google.errorprone.annotations.CheckReturnValue\n");
}
printer->Print(
"public inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> "
@ -1340,9 +1337,6 @@ void ImmutableMessageGenerator::GenerateTopLevelKotlinMembers(
io::Printer* printer) const {
printer->Print("@kotlin.jvm.JvmSynthetic\n");
if (context_->options().opensource_runtime) {
printer->Print("@com.google.errorprone.annotations.CheckReturnValue\n");
}
printer->Print(
"public inline fun $message$.copy(block: $message_kt$.Dsl.() -> "

@ -816,9 +816,6 @@ void ImmutableMessageLiteGenerator::GenerateKotlinMembers(
"camelcase_name",
name_resolver_->GetKotlinFactoryName(descriptor_));
if (!context_->options().opensource_runtime) {
printer->Print("@com.google.errorprone.annotations.CheckReturnValue\n");
}
printer->Print(
"public inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): $message$ =\n"
@ -846,9 +843,6 @@ void ImmutableMessageLiteGenerator::GenerateKotlinMembers(
void ImmutableMessageLiteGenerator::GenerateTopLevelKotlinMembers(
io::Printer* printer) const {
if (!context_->options().opensource_runtime) {
printer->Print("@com.google.errorprone.annotations.CheckReturnValue\n");
}
printer->Print(
"public inline fun $message$.copy(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): $message$ =\n"

Loading…
Cancel
Save