From 1cb83c0ed4a7581b6337d5a33aeaf495d370b2ca Mon Sep 17 00:00:00 2001 From: Ryan O'Neill Date: Thu, 12 Oct 2023 10:51:36 -0400 Subject: [PATCH 1/2] Cleanup Kotlin build function --- .../kotlin/squareup/wire/alltypes/AllTypes.kt | 3 +++ .../squareup/wire/boxedoneof/BoxedOneOfs.kt | 2 ++ .../squareup/wire/buildersonly/SomeMessage.kt | 3 +++ .../dinosaurs/javainteropkotlin/Dinosaur.kt | 2 ++ .../squareup/proto2/keywords/KeywordKotlin.kt | 2 ++ .../com/squareup/wire/kotlin/KotlinGenerator.kt | 16 ++++++++++++++-- .../squareup/wire/kotlin/KotlinGeneratorTest.kt | 11 +++++++---- .../dinosaurs/javainteropkotlin/Dinosaur.kt | 2 ++ .../proto2/person/javainteropkotlin/Person.kt | 3 +++ .../squareup/proto2/keywords/KeywordKotlin.kt | 2 ++ .../kotlin/redacted/buildersonly/NotRedacted.kt | 2 ++ .../redacted/buildersonly/RedactedChild.kt | 2 ++ .../redacted/buildersonly/RedactedCycleA.kt | 2 ++ .../redacted/buildersonly/RedactedCycleB.kt | 2 ++ .../redacted/buildersonly/RedactedExtension.kt | 2 ++ .../redacted/buildersonly/RedactedFields.kt | 2 ++ .../redacted/buildersonly/RedactedRepeated.kt | 2 ++ .../redacted/buildersonly/RedactedRequired.kt | 2 ++ .../kotlin/simple/buildersonly/SimpleMessage.kt | 3 +++ .../squareup/wire/proto2/alltypes/AllTypes.kt | 3 +++ .../squareup/wire/proto3/alltypes/AllTypes.kt | 3 +++ .../proto-kotlin/squareup/proto3/All32.kt | 2 ++ .../proto-kotlin/squareup/proto3/All64.kt | 2 ++ .../proto-kotlin/squareup/proto3/AllStructs.kt | 2 ++ .../proto-kotlin/squareup/proto3/AllWrappers.kt | 2 ++ .../squareup/proto3/BuyOneGetOnePromotion.kt | 2 ++ .../proto-kotlin/squareup/proto3/CamelCase.kt | 3 +++ .../squareup/proto3/FreeDrinkPromotion.kt | 2 ++ .../squareup/proto3/FreeGarlicBreadPromotion.kt | 2 ++ .../proto-kotlin/squareup/proto3/MapTypes.kt | 2 ++ .../proto-kotlin/squareup/proto3/Pizza.kt | 2 ++ .../squareup/proto3/PizzaDelivery.kt | 2 ++ .../proto-kotlin/ModelEvaluation.kt | 2 ++ .../wire/protos/custom_options/FooBar.kt | 4 ++++ .../protos/custom_options/MessageWithOptions.kt | 2 ++ .../wire/protos/kotlin/DeprecatedProto.kt | 2 ++ .../com/squareup/wire/protos/kotlin/Form.kt | 14 ++++++++++++++ .../protos/kotlin/MessageUsingMultipleEnums.kt | 2 ++ .../wire/protos/kotlin/MessageWithStatus.kt | 2 ++ .../com/squareup/wire/protos/kotlin/NoFields.kt | 2 ++ .../squareup/wire/protos/kotlin/OneOfMessage.kt | 2 ++ .../wire/protos/kotlin/OtherMessageWithStatus.kt | 2 ++ .../com/squareup/wire/protos/kotlin/Percents.kt | 2 ++ .../wire/protos/kotlin/alltypes/AllTypes.kt | 3 +++ .../wire/protos/kotlin/foreign/ForeignMessage.kt | 2 ++ .../com/squareup/wire/protos/kotlin/map/Mappy.kt | 2 ++ .../squareup/wire/protos/kotlin/map/MappyTwo.kt | 2 ++ .../com/squareup/wire/protos/kotlin/map/Thing.kt | 2 ++ .../squareup/wire/protos/kotlin/person/Person.kt | 3 +++ .../wire/protos/kotlin/redacted/RedactedOneOf.kt | 2 ++ .../wire/protos/kotlin/repeated/Repeated.kt | 2 ++ .../wire/protos/kotlin/repeated/Thing.kt | 2 ++ .../kotlin/services/all_flags_on/SomeRequest.kt | 2 ++ .../kotlin/services/all_flags_on/SomeResponse.kt | 2 ++ .../wire/protos/kotlin/simple/ExternalMessage.kt | 2 ++ .../wire/protos/kotlin/simple/SimpleMessage.kt | 3 +++ .../kotlin/unknownfields/NestedVersionOne.kt | 2 ++ .../kotlin/unknownfields/NestedVersionTwo.kt | 2 ++ .../protos/kotlin/unknownfields/VersionOne.kt | 2 ++ .../protos/kotlin/unknownfields/VersionTwo.kt | 2 ++ .../com/squareup/wire/protos/usesany/UsesAny.kt | 2 ++ .../protos/packed_encoding/EmbeddedMessage.kt | 2 ++ .../protos/packed_encoding/OuterMessage.kt | 2 ++ 63 files changed, 167 insertions(+), 6 deletions(-) diff --git a/wire-golden-files/src/main/kotlin/squareup/wire/alltypes/AllTypes.kt b/wire-golden-files/src/main/kotlin/squareup/wire/alltypes/AllTypes.kt index c6c8ce39db..7ac4550673 100644 --- a/wire-golden-files/src/main/kotlin/squareup/wire/alltypes/AllTypes.kt +++ b/wire-golden-files/src/main/kotlin/squareup/wire/alltypes/AllTypes.kt @@ -60,6 +60,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString import okio.ByteString.Companion.decodeBase64 @@ -4498,6 +4499,7 @@ public class AllTypes private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): AllTypes = Builder().apply(body).build() } @@ -4633,6 +4635,7 @@ public class AllTypes private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedMessage = Builder().apply(body).build() } diff --git a/wire-golden-files/src/main/kotlin/squareup/wire/boxedoneof/BoxedOneOfs.kt b/wire-golden-files/src/main/kotlin/squareup/wire/boxedoneof/BoxedOneOfs.kt index c87b319562..92e1dfbfcf 100644 --- a/wire-golden-files/src/main/kotlin/squareup/wire/boxedoneof/BoxedOneOfs.kt +++ b/wire-golden-files/src/main/kotlin/squareup/wire/boxedoneof/BoxedOneOfs.kt @@ -19,6 +19,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Set +import kotlin.jvm.JvmSynthetic import okio.ByteString public class BoxedOneOfs( @@ -152,6 +153,7 @@ public class BoxedOneOfs( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): BoxedOneOfs = Builder().apply(body).build() } } diff --git a/wire-golden-files/src/main/kotlin/squareup/wire/buildersonly/SomeMessage.kt b/wire-golden-files/src/main/kotlin/squareup/wire/buildersonly/SomeMessage.kt index 0920a7e03e..06e3f74af8 100644 --- a/wire-golden-files/src/main/kotlin/squareup/wire/buildersonly/SomeMessage.kt +++ b/wire-golden-files/src/main/kotlin/squareup/wire/buildersonly/SomeMessage.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class SomeMessage private constructor( @@ -125,6 +126,7 @@ public class SomeMessage private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): SomeMessage = Builder().apply(body).build() } @@ -234,6 +236,7 @@ public class SomeMessage private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedMessage = Builder().apply(body).build() } diff --git a/wire-gson-support/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt b/wire-gson-support/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt index 302949a3b4..c98ec28089 100644 --- a/wire-gson-support/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt +++ b/wire-gson-support/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt @@ -23,6 +23,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class Dinosaur( @@ -261,6 +262,7 @@ public class Dinosaur( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Dinosaur = Builder().apply(body).build() } } diff --git a/wire-gson-support/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt b/wire-gson-support/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt index 720c994c53..687714144a 100644 --- a/wire-gson-support/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt +++ b/wire-gson-support/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt @@ -27,6 +27,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -269,6 +270,7 @@ public class KeywordKotlin( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): KeywordKotlin = Builder().apply(body).build() } diff --git a/wire-kotlin-generator/src/main/java/com/squareup/wire/kotlin/KotlinGenerator.kt b/wire-kotlin-generator/src/main/java/com/squareup/wire/kotlin/KotlinGenerator.kt index 799cdf825d..f05f93ab98 100644 --- a/wire-kotlin-generator/src/main/java/com/squareup/wire/kotlin/KotlinGenerator.kt +++ b/wire-kotlin-generator/src/main/java/com/squareup/wire/kotlin/KotlinGenerator.kt @@ -550,7 +550,7 @@ class KotlinGenerator private constructor( addDefaultFields(type, companionBuilder, nameAllocator) addAdapter(type, companionBuilder) - if (buildersOnly || javaInterOp) addBuildClosure(type, companionBuilder, builderClassName) + if (buildersOnly || javaInterOp) addBuildFunction(type, companionBuilder, builderClassName) val classBuilder = TypeSpec.classBuilder(className) .apply { @@ -1971,9 +1971,21 @@ class KotlinGenerator private constructor( } } - private fun addBuildClosure(type: MessageType, companionBuilder: TypeSpec.Builder, builderClassName: ClassName) { + /** + * Adds a closure into the [companionBuilder] allowing the creation of an instance via the Kotlin + * DSL. + * + * Example + * ``` + * companion object { + * public inline fun build(body: Builder.() -> Unit): AllTypes = Builder().apply(body).build() + * } + * ``` + */ + private fun addBuildFunction(type: MessageType, companionBuilder: TypeSpec.Builder, builderClassName: ClassName) { val buildFn = FunSpec.builder("build") .addModifiers(INLINE) + .addAnnotation(JvmSynthetic::class) .addParameter( "body", LambdaTypeName.get( diff --git a/wire-kotlin-generator/src/test/java/com/squareup/wire/kotlin/KotlinGeneratorTest.kt b/wire-kotlin-generator/src/test/java/com/squareup/wire/kotlin/KotlinGeneratorTest.kt index d544312de3..75b5507a51 100644 --- a/wire-kotlin-generator/src/test/java/com/squareup/wire/kotlin/KotlinGeneratorTest.kt +++ b/wire-kotlin-generator/src/test/java/com/squareup/wire/kotlin/KotlinGeneratorTest.kt @@ -1979,11 +1979,14 @@ class KotlinGeneratorTest { .generateKotlin("SomeMessage", buildersOnly = false, javaInterop = false) assertThat(code).doesNotContain("inline fun build(body: Builder.() -> Unit): SomeMessage") val buildersOnlyCode = KotlinWithProfilesGenerator(schema) - .generateKotlin("SomeMessage", buildersOnly = true) - assertThat(buildersOnlyCode).contains("inline fun build(body: Builder.() -> Unit): SomeMessage") + .generateKotlin("SomeMessage", buildersOnly = true, javaInterop = false) + assertThat(buildersOnlyCode).contains("@JvmSynthetic\n public inline fun build(body: Builder.() -> Unit): SomeMessage") val javaInteropCode = KotlinWithProfilesGenerator(schema) - .generateKotlin("SomeMessage", javaInterop = true) - assertThat(javaInteropCode).contains("inline fun build(body: Builder.() -> Unit): SomeMessage") + .generateKotlin("SomeMessage", buildersOnly = false, javaInterop = true) + assertThat(javaInteropCode).contains("@JvmSynthetic\n public inline fun build(body: Builder.() -> Unit): SomeMessage") + val bothCode = KotlinWithProfilesGenerator(schema) + .generateKotlin("SomeMessage", buildersOnly = true, javaInterop = true) + assertThat(bothCode).contains("@JvmSynthetic\n public inline fun build(body: Builder.() -> Unit): SomeMessage") } @Test diff --git a/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt b/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt index 302949a3b4..c98ec28089 100644 --- a/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt +++ b/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt @@ -23,6 +23,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class Dinosaur( @@ -261,6 +262,7 @@ public class Dinosaur( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Dinosaur = Builder().apply(body).build() } } diff --git a/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/person/javainteropkotlin/Person.kt b/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/person/javainteropkotlin/Person.kt index 949693875d..296851ec71 100644 --- a/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/person/javainteropkotlin/Person.kt +++ b/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/person/javainteropkotlin/Person.kt @@ -26,6 +26,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString /** @@ -251,6 +252,7 @@ public class Person( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Person = Builder().apply(body).build() } @@ -443,6 +445,7 @@ public class Person( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): PhoneNumber = Builder().apply(body).build() } } diff --git a/wire-moshi-adapter/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt b/wire-moshi-adapter/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt index 720c994c53..687714144a 100644 --- a/wire-moshi-adapter/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt +++ b/wire-moshi-adapter/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt @@ -27,6 +27,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -269,6 +270,7 @@ public class KeywordKotlin( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): KeywordKotlin = Builder().apply(body).build() } diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/NotRedacted.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/NotRedacted.kt index a267c09d4a..b19c3167da 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/NotRedacted.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/NotRedacted.kt @@ -18,6 +18,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class NotRedacted private constructor( @@ -150,6 +151,7 @@ public class NotRedacted private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NotRedacted = Builder().apply(body).build() } } diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedChild.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedChild.kt index 52f5a652fe..61e739f7e3 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedChild.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedChild.kt @@ -18,6 +18,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedChild private constructor( @@ -176,6 +177,7 @@ public class RedactedChild private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): RedactedChild = Builder().apply(body).build() } } diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleA.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleA.kt index 598c22d90e..59275225b8 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleA.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleA.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedCycleA private constructor( @@ -126,6 +127,7 @@ public class RedactedCycleA private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): RedactedCycleA = Builder().apply(body).build() } diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleB.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleB.kt index b36e9cde31..c878b78dd3 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleB.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleB.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedCycleB private constructor( @@ -126,6 +127,7 @@ public class RedactedCycleB private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): RedactedCycleB = Builder().apply(body).build() } diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedExtension.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedExtension.kt index f4bd5651d7..ee6c531dff 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedExtension.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedExtension.kt @@ -18,6 +18,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedExtension private constructor( @@ -152,6 +153,7 @@ public class RedactedExtension private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): RedactedExtension = Builder().apply(body).build() } diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedFields.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedFields.kt index f96e8173a1..49a295036e 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedFields.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedFields.kt @@ -18,6 +18,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedFields private constructor( @@ -204,6 +205,7 @@ public class RedactedFields private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): RedactedFields = Builder().apply(body).build() } diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRepeated.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRepeated.kt index a028479f9a..7d1b5cd1b0 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRepeated.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRepeated.kt @@ -21,6 +21,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedRepeated private constructor( @@ -170,6 +171,7 @@ public class RedactedRepeated private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): RedactedRepeated = Builder().apply(body).build() } diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRequired.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRequired.kt index 8c813a15bb..6138b9d7fd 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRequired.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRequired.kt @@ -18,6 +18,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.UnsupportedOperationException +import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedRequired private constructor( @@ -126,6 +127,7 @@ public class RedactedRequired private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): RedactedRequired = Builder().apply(body).build() } diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/buildersonly/SimpleMessage.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/buildersonly/SimpleMessage.kt index e79e43f3e7..0c6239faea 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/buildersonly/SimpleMessage.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/buildersonly/SimpleMessage.kt @@ -28,6 +28,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString /** @@ -507,6 +508,7 @@ public class SimpleMessage private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): SimpleMessage = Builder().apply(body).build() } @@ -622,6 +624,7 @@ public class SimpleMessage private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedMessage = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto2/alltypes/AllTypes.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto2/alltypes/AllTypes.kt index 8d40718eb7..07ecd6a1cd 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto2/alltypes/AllTypes.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto2/alltypes/AllTypes.kt @@ -30,6 +30,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString import okio.ByteString.Companion.decodeBase64 @@ -4586,6 +4587,7 @@ public class AllTypes( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): AllTypes = Builder().apply(body).build() } @@ -4721,6 +4723,7 @@ public class AllTypes( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedMessage = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto3/alltypes/AllTypes.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto3/alltypes/AllTypes.kt index 1c41d5f9e5..438d07d4b5 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto3/alltypes/AllTypes.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto3/alltypes/AllTypes.kt @@ -29,6 +29,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -2425,6 +2426,7 @@ public class AllTypes( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): AllTypes = Builder().apply(body).build() } @@ -2561,6 +2563,7 @@ public class AllTypes( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedMessage = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All32.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All32.kt index 08620921f7..875c1e60ff 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All32.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All32.kt @@ -22,6 +22,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -867,6 +868,7 @@ public class All32( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): All32 = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All64.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All64.kt index 613868784c..9bc983fbd7 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All64.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All64.kt @@ -22,6 +22,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -871,6 +872,7 @@ public class All64( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): All64 = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllStructs.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllStructs.kt index c168cdb3be..88089ef7ac 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllStructs.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllStructs.kt @@ -25,6 +25,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -762,6 +763,7 @@ public class AllStructs( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): AllStructs = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllWrappers.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllWrappers.kt index af314e148e..399cd55068 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllWrappers.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllWrappers.kt @@ -24,6 +24,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -1044,6 +1045,7 @@ public class AllWrappers( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): AllWrappers = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/BuyOneGetOnePromotion.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/BuyOneGetOnePromotion.kt index 60434d419e..71af9fa9d5 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/BuyOneGetOnePromotion.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/BuyOneGetOnePromotion.kt @@ -18,6 +18,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class BuyOneGetOnePromotion( @@ -128,6 +129,7 @@ public class BuyOneGetOnePromotion( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): BuyOneGetOnePromotion = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/CamelCase.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/CamelCase.kt index 958c927048..287486e97a 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/CamelCase.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/CamelCase.kt @@ -22,6 +22,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -247,6 +248,7 @@ public class CamelCase( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): CamelCase = Builder().apply(body).build() } @@ -359,6 +361,7 @@ public class CamelCase( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedCamelCase = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeDrinkPromotion.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeDrinkPromotion.kt index b70404db94..97bb81fdd8 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeDrinkPromotion.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeDrinkPromotion.kt @@ -20,6 +20,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class FreeDrinkPromotion( @@ -134,6 +135,7 @@ public class FreeDrinkPromotion( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): FreeDrinkPromotion = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeGarlicBreadPromotion.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeGarlicBreadPromotion.kt index cea50ba6be..6896cec729 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeGarlicBreadPromotion.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeGarlicBreadPromotion.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class FreeGarlicBreadPromotion( @@ -133,6 +134,7 @@ public class FreeGarlicBreadPromotion( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): FreeGarlicBreadPromotion = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/MapTypes.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/MapTypes.kt index 0baaa8d50e..e5d4f43cf3 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/MapTypes.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/MapTypes.kt @@ -19,6 +19,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -491,6 +492,7 @@ public class MapTypes( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): MapTypes = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/Pizza.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/Pizza.kt index 31dbe713eb..a9733d9713 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/Pizza.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/Pizza.kt @@ -21,6 +21,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class Pizza( @@ -133,6 +134,7 @@ public class Pizza( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Pizza = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/PizzaDelivery.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/PizzaDelivery.kt index c43ca90534..1d03e0f724 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/PizzaDelivery.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/PizzaDelivery.kt @@ -27,6 +27,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import okio.ByteString public class PizzaDelivery( @@ -333,6 +334,7 @@ public class PizzaDelivery( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): PizzaDelivery = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/ModelEvaluation.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/ModelEvaluation.kt index a2306436a4..c034c9b410 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/ModelEvaluation.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/ModelEvaluation.kt @@ -20,6 +20,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -207,6 +208,7 @@ public class ModelEvaluation( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): ModelEvaluation = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/FooBar.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/FooBar.kt index 602ec58199..cd3037b162 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/FooBar.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/FooBar.kt @@ -32,6 +32,7 @@ import kotlin.`annotation`.AnnotationTarget import kotlin.`annotation`.Retention import kotlin.`annotation`.Target import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class FooBar( @@ -434,6 +435,7 @@ public class FooBar( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): FooBar = Builder().apply(body).build() } @@ -548,6 +550,7 @@ public class FooBar( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Nested = Builder().apply(body).build() } } @@ -662,6 +665,7 @@ public class FooBar( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): More = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/MessageWithOptions.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/MessageWithOptions.kt index a7af992a78..88d540f8ca 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/MessageWithOptions.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/MessageWithOptions.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString @MyMessageOptionTwoOption(91011.0f) @@ -98,6 +99,7 @@ public class MessageWithOptions( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): MessageWithOptions = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/DeprecatedProto.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/DeprecatedProto.kt index f07f0cd306..5842069ea8 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/DeprecatedProto.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/DeprecatedProto.kt @@ -19,6 +19,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class DeprecatedProto( @@ -129,6 +130,7 @@ public class DeprecatedProto( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): DeprecatedProto = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Form.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Form.kt index f637527274..5b25695047 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Form.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Form.kt @@ -22,6 +22,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Set +import kotlin.jvm.JvmSynthetic import okio.ByteString public class Form( @@ -258,6 +259,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Form = Builder().apply(body).build() } @@ -327,6 +329,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): ButtonElement = Builder().apply(body).build() } @@ -399,6 +402,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): LocalImageElement = Builder().apply(body).build() } @@ -471,6 +475,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): RemoteImageElement = Builder().apply(body).build() } @@ -542,6 +547,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): MoneyElement = Builder().apply(body).build() } @@ -613,6 +619,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): SpacerElement = Builder().apply(body).build() } @@ -724,6 +731,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): TextElement = Builder().apply(body).build() } } @@ -795,6 +803,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): CustomizedCardElement = Builder().apply(body).build() } @@ -866,6 +875,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): AddressElement = Builder().apply(body).build() } @@ -937,6 +947,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): TextInputElement = Builder().apply(body).build() } @@ -1009,6 +1020,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): OptionPickerElement = Builder().apply(body).build() } @@ -1080,6 +1092,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): DetailRowElement = Builder().apply(body).build() } @@ -1154,6 +1167,7 @@ public class Form( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): CurrencyConversionFlagsElement = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageUsingMultipleEnums.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageUsingMultipleEnums.kt index 3d9f146338..9cbc10f47d 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageUsingMultipleEnums.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageUsingMultipleEnums.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString /** @@ -168,6 +169,7 @@ public class MessageUsingMultipleEnums( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): MessageUsingMultipleEnums = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageWithStatus.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageWithStatus.kt index 3fb50b23fa..d61a7fb6b9 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageWithStatus.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageWithStatus.kt @@ -19,6 +19,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class MessageWithStatus( @@ -87,6 +88,7 @@ public class MessageWithStatus( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): MessageWithStatus = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/NoFields.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/NoFields.kt index 865902d8c9..04e5e5247b 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/NoFields.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/NoFields.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString @Deprecated(message = "NoFields is deprecated") @@ -86,6 +87,7 @@ public class NoFields( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NoFields = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OneOfMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OneOfMessage.kt index 2f898e686d..ce1e775288 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OneOfMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OneOfMessage.kt @@ -19,6 +19,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString /** @@ -219,6 +220,7 @@ public class OneOfMessage( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): OneOfMessage = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OtherMessageWithStatus.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OtherMessageWithStatus.kt index c924a5ed36..8570f14b02 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OtherMessageWithStatus.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OtherMessageWithStatus.kt @@ -19,6 +19,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class OtherMessageWithStatus( @@ -88,6 +89,7 @@ public class OtherMessageWithStatus( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): OtherMessageWithStatus = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Percents.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Percents.kt index 235de41d79..4f171961cc 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Percents.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Percents.kt @@ -18,6 +18,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class Percents( @@ -132,6 +133,7 @@ public class Percents( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Percents = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/alltypes/AllTypes.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/alltypes/AllTypes.kt index d6ddc8650b..7c25914fa2 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/alltypes/AllTypes.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/alltypes/AllTypes.kt @@ -61,6 +61,7 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString import okio.ByteString.Companion.decodeBase64 @@ -4919,6 +4920,7 @@ public class AllTypes( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): AllTypes = Builder().apply(body).build() } @@ -5054,6 +5056,7 @@ public class AllTypes( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedMessage = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/foreign/ForeignMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/foreign/ForeignMessage.kt index f94a43e734..c2cf95a091 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/foreign/ForeignMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/foreign/ForeignMessage.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class ForeignMessage( @@ -157,6 +158,7 @@ public class ForeignMessage( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): ForeignMessage = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Mappy.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Mappy.kt index 93fbf75913..3a8b890a87 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Mappy.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Mappy.kt @@ -20,6 +20,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -136,6 +137,7 @@ public class Mappy( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Mappy = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/MappyTwo.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/MappyTwo.kt index 2159fab071..755d3c3811 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/MappyTwo.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/MappyTwo.kt @@ -23,6 +23,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Map +import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString @@ -241,6 +242,7 @@ public class MappyTwo( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): MappyTwo = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Thing.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Thing.kt index 4ccbcbb0fd..25472dc25d 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Thing.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Thing.kt @@ -18,6 +18,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class Thing( @@ -126,6 +127,7 @@ public class Thing( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Thing = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/person/Person.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/person/Person.kt index 799f9fc9a9..ec449ab8a4 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/person/Person.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/person/Person.kt @@ -26,6 +26,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString /** @@ -282,6 +283,7 @@ public class Person( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Person = Builder().apply(body).build() } @@ -474,6 +476,7 @@ public class Person( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): PhoneNumber = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/RedactedOneOf.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/RedactedOneOf.kt index d6df7ffc54..dd51a348a5 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/RedactedOneOf.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/RedactedOneOf.kt @@ -18,6 +18,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedOneOf( @@ -167,6 +168,7 @@ public class RedactedOneOf( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): RedactedOneOf = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Repeated.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Repeated.kt index 4b2b2a1c4b..1c4d9e62d1 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Repeated.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Repeated.kt @@ -21,6 +21,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class Repeated( @@ -134,6 +135,7 @@ public class Repeated( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Repeated = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Thing.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Thing.kt index 43e98e11ed..6f0c2702f3 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Thing.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Thing.kt @@ -18,6 +18,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class Thing( @@ -126,6 +127,7 @@ public class Thing( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): Thing = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeRequest.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeRequest.kt index dcd5546d84..c8f810649e 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeRequest.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeRequest.kt @@ -16,6 +16,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class SomeRequest private constructor( @@ -86,6 +87,7 @@ public class SomeRequest private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): SomeRequest = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeResponse.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeResponse.kt index 6236bcff12..b5d6f0f4e0 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeResponse.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeResponse.kt @@ -16,6 +16,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class SomeResponse private constructor( @@ -86,6 +87,7 @@ public class SomeResponse private constructor( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): SomeResponse = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/ExternalMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/ExternalMessage.kt index f59efcdae1..8c866bd29d 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/ExternalMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/ExternalMessage.kt @@ -21,6 +21,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class ExternalMessage( @@ -295,6 +296,7 @@ public class ExternalMessage( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): ExternalMessage = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/SimpleMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/SimpleMessage.kt index c44eac2157..2bea487759 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/SimpleMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/SimpleMessage.kt @@ -28,6 +28,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString /** @@ -543,6 +544,7 @@ public class SimpleMessage( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): SimpleMessage = Builder().apply(body).build() } @@ -658,6 +660,7 @@ public class SimpleMessage( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedMessage = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionOne.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionOne.kt index f707c12f3c..45128fb641 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionOne.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionOne.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class NestedVersionOne( @@ -125,6 +126,7 @@ public class NestedVersionOne( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedVersionOne = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionTwo.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionTwo.kt index 479297a265..60b83bf9ec 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionTwo.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionTwo.kt @@ -21,6 +21,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class NestedVersionTwo( @@ -270,6 +271,7 @@ public class NestedVersionTwo( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): NestedVersionTwo = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionOne.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionOne.kt index 0a6f227045..7616536afd 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionOne.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionOne.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class VersionOne( @@ -186,6 +187,7 @@ public class VersionOne( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): VersionOne = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionTwo.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionTwo.kt index eb82855368..a1be5fdd23 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionTwo.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionTwo.kt @@ -21,6 +21,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class VersionTwo( @@ -329,6 +330,7 @@ public class VersionTwo( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): VersionTwo = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/usesany/UsesAny.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/usesany/UsesAny.kt index ec12d02fa1..7ca1d26093 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/usesany/UsesAny.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/usesany/UsesAny.kt @@ -22,6 +22,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class UsesAny( @@ -165,6 +166,7 @@ public class UsesAny( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): UsesAny = Builder().apply(body).build() } } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/EmbeddedMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/EmbeddedMessage.kt index 0ed762b69c..92a45fe05f 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/EmbeddedMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/EmbeddedMessage.kt @@ -20,6 +20,7 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List +import kotlin.jvm.JvmSynthetic import okio.ByteString public class EmbeddedMessage( @@ -172,6 +173,7 @@ public class EmbeddedMessage( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): EmbeddedMessage = Builder().apply(body).build() } diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/OuterMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/OuterMessage.kt index c39a144d72..f9282d1e41 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/OuterMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/OuterMessage.kt @@ -17,6 +17,7 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit +import kotlin.jvm.JvmSynthetic import okio.ByteString public class OuterMessage( @@ -155,6 +156,7 @@ public class OuterMessage( private const val serialVersionUID: Long = 0L + @JvmSynthetic public inline fun build(body: Builder.() -> Unit): OuterMessage = Builder().apply(body).build() } } From 64cbd6afa431056b90d8c77c513b74da739dd4f7 Mon Sep 17 00:00:00 2001 From: Benoit Quenaudon Date: Mon, 16 Oct 2023 10:31:51 +0100 Subject: [PATCH 2/2] Create MPP JvmSynthetic we can use on all platforms --- .../src/main/kotlin/squareup/wire/alltypes/AllTypes.kt | 2 +- .../main/kotlin/squareup/wire/boxedoneof/BoxedOneOfs.kt | 2 +- .../main/kotlin/squareup/wire/buildersonly/SomeMessage.kt | 2 +- .../wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt | 2 +- .../test/java/squareup/proto2/keywords/KeywordKotlin.kt | 2 +- .../main/java/com/squareup/wire/kotlin/KotlinGenerator.kt | 8 +++++--- .../wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt | 2 +- .../wire/proto2/person/javainteropkotlin/Person.kt | 2 +- .../test/java/squareup/proto2/keywords/KeywordKotlin.kt | 2 +- .../kotlin/com/squareup/wire/internal/-Platform.kt | 2 ++ .../jsMain/kotlin/com/squareup/wire/internal/-Platform.kt | 3 +++ .../kotlin/com/squareup/wire/internal/-Platform.kt | 2 ++ .../kotlin/com/squareup/wire/internal/-Platform.kt | 3 +++ .../protos/kotlin/redacted/buildersonly/NotRedacted.kt | 2 +- .../protos/kotlin/redacted/buildersonly/RedactedChild.kt | 2 +- .../protos/kotlin/redacted/buildersonly/RedactedCycleA.kt | 2 +- .../protos/kotlin/redacted/buildersonly/RedactedCycleB.kt | 2 +- .../kotlin/redacted/buildersonly/RedactedExtension.kt | 2 +- .../protos/kotlin/redacted/buildersonly/RedactedFields.kt | 2 +- .../kotlin/redacted/buildersonly/RedactedRepeated.kt | 2 +- .../kotlin/redacted/buildersonly/RedactedRequired.kt | 2 +- .../protos/kotlin/simple/buildersonly/SimpleMessage.kt | 2 +- .../com/squareup/wire/proto2/alltypes/AllTypes.kt | 2 +- .../com/squareup/wire/proto3/alltypes/AllTypes.kt | 2 +- .../proto-kotlin/squareup/proto3/All32.kt | 2 +- .../proto-kotlin/squareup/proto3/All64.kt | 2 +- .../proto-kotlin/squareup/proto3/AllStructs.kt | 2 +- .../proto-kotlin/squareup/proto3/AllWrappers.kt | 2 +- .../proto-kotlin/squareup/proto3/BuyOneGetOnePromotion.kt | 2 +- .../proto-kotlin/squareup/proto3/CamelCase.kt | 2 +- .../proto-kotlin/squareup/proto3/FreeDrinkPromotion.kt | 2 +- .../squareup/proto3/FreeGarlicBreadPromotion.kt | 2 +- .../proto-kotlin/squareup/proto3/MapTypes.kt | 2 +- .../proto-kotlin/squareup/proto3/Pizza.kt | 2 +- .../proto-kotlin/squareup/proto3/PizzaDelivery.kt | 2 +- .../jvmKotlinInteropTest/proto-kotlin/ModelEvaluation.kt | 2 +- .../com/squareup/wire/protos/custom_options/FooBar.kt | 2 +- .../wire/protos/custom_options/MessageWithOptions.kt | 2 +- .../com/squareup/wire/protos/kotlin/DeprecatedProto.kt | 2 +- .../proto-kotlin/com/squareup/wire/protos/kotlin/Form.kt | 2 +- .../wire/protos/kotlin/MessageUsingMultipleEnums.kt | 2 +- .../com/squareup/wire/protos/kotlin/MessageWithStatus.kt | 2 +- .../com/squareup/wire/protos/kotlin/NoFields.kt | 2 +- .../com/squareup/wire/protos/kotlin/OneOfMessage.kt | 2 +- .../squareup/wire/protos/kotlin/OtherMessageWithStatus.kt | 2 +- .../com/squareup/wire/protos/kotlin/Percents.kt | 2 +- .../com/squareup/wire/protos/kotlin/alltypes/AllTypes.kt | 2 +- .../squareup/wire/protos/kotlin/foreign/ForeignMessage.kt | 2 +- .../com/squareup/wire/protos/kotlin/map/Mappy.kt | 2 +- .../com/squareup/wire/protos/kotlin/map/MappyTwo.kt | 2 +- .../com/squareup/wire/protos/kotlin/map/Thing.kt | 2 +- .../com/squareup/wire/protos/kotlin/person/Person.kt | 2 +- .../squareup/wire/protos/kotlin/redacted/RedactedOneOf.kt | 2 +- .../com/squareup/wire/protos/kotlin/repeated/Repeated.kt | 2 +- .../com/squareup/wire/protos/kotlin/repeated/Thing.kt | 2 +- .../protos/kotlin/services/all_flags_on/SomeRequest.kt | 2 +- .../protos/kotlin/services/all_flags_on/SomeResponse.kt | 2 +- .../squareup/wire/protos/kotlin/simple/ExternalMessage.kt | 2 +- .../squareup/wire/protos/kotlin/simple/SimpleMessage.kt | 2 +- .../wire/protos/kotlin/unknownfields/NestedVersionOne.kt | 2 +- .../wire/protos/kotlin/unknownfields/NestedVersionTwo.kt | 2 +- .../wire/protos/kotlin/unknownfields/VersionOne.kt | 2 +- .../wire/protos/kotlin/unknownfields/VersionTwo.kt | 2 +- .../com/squareup/wire/protos/usesany/UsesAny.kt | 2 +- .../squareup/protos/packed_encoding/EmbeddedMessage.kt | 2 +- .../squareup/protos/packed_encoding/OuterMessage.kt | 2 +- 66 files changed, 76 insertions(+), 64 deletions(-) diff --git a/wire-golden-files/src/main/kotlin/squareup/wire/alltypes/AllTypes.kt b/wire-golden-files/src/main/kotlin/squareup/wire/alltypes/AllTypes.kt index 7ac4550673..521d1c860c 100644 --- a/wire-golden-files/src/main/kotlin/squareup/wire/alltypes/AllTypes.kt +++ b/wire-golden-files/src/main/kotlin/squareup/wire/alltypes/AllTypes.kt @@ -17,6 +17,7 @@ import com.squareup.wire.`internal`.FloatArrayList import com.squareup.wire.`internal`.IntArrayList import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.LongArrayList import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.decodePrimitive_double @@ -60,7 +61,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString import okio.ByteString.Companion.decodeBase64 diff --git a/wire-golden-files/src/main/kotlin/squareup/wire/boxedoneof/BoxedOneOfs.kt b/wire-golden-files/src/main/kotlin/squareup/wire/boxedoneof/BoxedOneOfs.kt index 92e1dfbfcf..12f056cc2c 100644 --- a/wire-golden-files/src/main/kotlin/squareup/wire/boxedoneof/BoxedOneOfs.kt +++ b/wire-golden-files/src/main/kotlin/squareup/wire/boxedoneof/BoxedOneOfs.kt @@ -12,6 +12,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int @@ -19,7 +20,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Set -import kotlin.jvm.JvmSynthetic import okio.ByteString public class BoxedOneOfs( diff --git a/wire-golden-files/src/main/kotlin/squareup/wire/buildersonly/SomeMessage.kt b/wire-golden-files/src/main/kotlin/squareup/wire/buildersonly/SomeMessage.kt index 06e3f74af8..81da4478ef 100644 --- a/wire-golden-files/src/main/kotlin/squareup/wire/buildersonly/SomeMessage.kt +++ b/wire-golden-files/src/main/kotlin/squareup/wire/buildersonly/SomeMessage.kt @@ -11,13 +11,13 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class SomeMessage private constructor( diff --git a/wire-gson-support/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt b/wire-gson-support/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt index c98ec28089..6f57e87db2 100644 --- a/wire-gson-support/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt +++ b/wire-gson-support/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.sanitize @@ -23,7 +24,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class Dinosaur( diff --git a/wire-gson-support/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt b/wire-gson-support/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt index 687714144a..5b077896dd 100644 --- a/wire-gson-support/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt +++ b/wire-gson-support/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt @@ -15,6 +15,7 @@ import com.squareup.wire.WireEnumConstant import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.missingRequiredFields @@ -27,7 +28,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-kotlin-generator/src/main/java/com/squareup/wire/kotlin/KotlinGenerator.kt b/wire-kotlin-generator/src/main/java/com/squareup/wire/kotlin/KotlinGenerator.kt index f05f93ab98..bac6843fff 100644 --- a/wire-kotlin-generator/src/main/java/com/squareup/wire/kotlin/KotlinGenerator.kt +++ b/wire-kotlin-generator/src/main/java/com/squareup/wire/kotlin/KotlinGenerator.kt @@ -1978,14 +1978,16 @@ class KotlinGenerator private constructor( * Example * ``` * companion object { + * @JvmSynthetic * public inline fun build(body: Builder.() -> Unit): AllTypes = Builder().apply(body).build() * } * ``` */ private fun addBuildFunction(type: MessageType, companionBuilder: TypeSpec.Builder, builderClassName: ClassName) { - val buildFn = FunSpec.builder("build") + val buildFunction = FunSpec.builder("build") .addModifiers(INLINE) - .addAnnotation(JvmSynthetic::class) + // We hide it to Java callers. + .addAnnotation(ClassName("com.squareup.wire.internal", "JvmSynthetic")) .addParameter( "body", LambdaTypeName.get( @@ -1997,7 +1999,7 @@ class KotlinGenerator private constructor( .returns(generatedTypeName(type)) .build() - companionBuilder.addFunction(buildFn) + companionBuilder.addFunction(buildFunction) } private fun redactFun(message: MessageType): FunSpec { diff --git a/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt b/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt index c98ec28089..6f57e87db2 100644 --- a/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt +++ b/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/dinosaurs/javainteropkotlin/Dinosaur.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.sanitize @@ -23,7 +24,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class Dinosaur( diff --git a/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/person/javainteropkotlin/Person.kt b/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/person/javainteropkotlin/Person.kt index 296851ec71..404c86c0d6 100644 --- a/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/person/javainteropkotlin/Person.kt +++ b/wire-moshi-adapter/src/test/java/com/squareup/wire/proto2/person/javainteropkotlin/Person.kt @@ -14,6 +14,7 @@ import com.squareup.wire.WireEnum import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.missingRequiredFields @@ -26,7 +27,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString /** diff --git a/wire-moshi-adapter/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt b/wire-moshi-adapter/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt index 687714144a..5b077896dd 100644 --- a/wire-moshi-adapter/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt +++ b/wire-moshi-adapter/src/test/java/squareup/proto2/keywords/KeywordKotlin.kt @@ -15,6 +15,7 @@ import com.squareup.wire.WireEnumConstant import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.missingRequiredFields @@ -27,7 +28,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-runtime/src/commonMain/kotlin/com/squareup/wire/internal/-Platform.kt b/wire-runtime/src/commonMain/kotlin/com/squareup/wire/internal/-Platform.kt index 427ed97449..6b533aae07 100644 --- a/wire-runtime/src/commonMain/kotlin/com/squareup/wire/internal/-Platform.kt +++ b/wire-runtime/src/commonMain/kotlin/com/squareup/wire/internal/-Platform.kt @@ -31,6 +31,8 @@ expect annotation class JvmDefaultWithCompatibility() expect annotation class JvmField() +expect annotation class JvmSynthetic() + expect annotation class JvmStatic() expect abstract class ObjectStreamException : IOException diff --git a/wire-runtime/src/jsMain/kotlin/com/squareup/wire/internal/-Platform.kt b/wire-runtime/src/jsMain/kotlin/com/squareup/wire/internal/-Platform.kt index f82328d58b..0275f1e978 100644 --- a/wire-runtime/src/jsMain/kotlin/com/squareup/wire/internal/-Platform.kt +++ b/wire-runtime/src/jsMain/kotlin/com/squareup/wire/internal/-Platform.kt @@ -22,6 +22,9 @@ actual interface Serializable /** This annotation is an empty placeholder. */ actual annotation class JvmField +/** This annotation is an empty placeholder. */ +actual annotation class JvmSynthetic + /** This annotation is an empty placeholder. */ actual annotation class JvmStatic diff --git a/wire-runtime/src/jvmMain/kotlin/com/squareup/wire/internal/-Platform.kt b/wire-runtime/src/jvmMain/kotlin/com/squareup/wire/internal/-Platform.kt index ca894628b2..7bc5dee9f9 100644 --- a/wire-runtime/src/jvmMain/kotlin/com/squareup/wire/internal/-Platform.kt +++ b/wire-runtime/src/jvmMain/kotlin/com/squareup/wire/internal/-Platform.kt @@ -25,6 +25,8 @@ actual typealias JvmDefaultWithCompatibility = kotlin.jvm.JvmDefaultWithCompatib actual typealias JvmField = kotlin.jvm.JvmField +actual typealias JvmSynthetic = kotlin.jvm.JvmSynthetic + actual typealias JvmStatic = kotlin.jvm.JvmStatic actual typealias ObjectStreamException = java.io.ObjectStreamException diff --git a/wire-runtime/src/nativeMain/kotlin/com/squareup/wire/internal/-Platform.kt b/wire-runtime/src/nativeMain/kotlin/com/squareup/wire/internal/-Platform.kt index f82328d58b..0275f1e978 100644 --- a/wire-runtime/src/nativeMain/kotlin/com/squareup/wire/internal/-Platform.kt +++ b/wire-runtime/src/nativeMain/kotlin/com/squareup/wire/internal/-Platform.kt @@ -22,6 +22,9 @@ actual interface Serializable /** This annotation is an empty placeholder. */ actual annotation class JvmField +/** This annotation is an empty placeholder. */ +actual annotation class JvmSynthetic + /** This annotation is an empty placeholder. */ actual annotation class JvmStatic diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/NotRedacted.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/NotRedacted.kt index b19c3167da..aaf150af11 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/NotRedacted.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/NotRedacted.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -18,7 +19,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class NotRedacted private constructor( diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedChild.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedChild.kt index 61e739f7e3..3f3cc92731 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedChild.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedChild.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -18,7 +19,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedChild private constructor( diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleA.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleA.kt index 59275225b8..e9ad805591 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleA.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleA.kt @@ -11,13 +11,13 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedCycleA private constructor( diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleB.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleB.kt index c878b78dd3..60fb31094d 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleB.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedCycleB.kt @@ -11,13 +11,13 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedCycleB private constructor( diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedExtension.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedExtension.kt index ee6c531dff..6e68657082 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedExtension.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedExtension.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -18,7 +19,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedExtension private constructor( diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedFields.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedFields.kt index 49a295036e..dbcca9dc1e 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedFields.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedFields.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -18,7 +19,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedFields private constructor( diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRepeated.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRepeated.kt index 7d1b5cd1b0..7c359ad571 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRepeated.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRepeated.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.redactElements @@ -21,7 +22,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedRepeated private constructor( diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRequired.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRequired.kt index 6138b9d7fd..a8ae3a1f8c 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRequired.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/buildersonly/RedactedRequired.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int @@ -18,7 +19,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.UnsupportedOperationException -import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedRequired private constructor( diff --git a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/buildersonly/SimpleMessage.kt b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/buildersonly/SimpleMessage.kt index 0c6239faea..3cb880726a 100644 --- a/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/buildersonly/SimpleMessage.kt +++ b/wire-tests/src/commonTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/buildersonly/SimpleMessage.kt @@ -14,6 +14,7 @@ import com.squareup.wire.WireEnum import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.sanitize @@ -28,7 +29,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString /** diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto2/alltypes/AllTypes.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto2/alltypes/AllTypes.kt index 07ecd6a1cd..8c8985d198 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto2/alltypes/AllTypes.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto2/alltypes/AllTypes.kt @@ -14,6 +14,7 @@ import com.squareup.wire.WireEnum import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.countNonNull import com.squareup.wire.`internal`.immutableCopyOf @@ -30,7 +31,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString import okio.ByteString.Companion.decodeBase64 diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto3/alltypes/AllTypes.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto3/alltypes/AllTypes.kt index 438d07d4b5..3554e49c03 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto3/alltypes/AllTypes.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/com/squareup/wire/proto3/alltypes/AllTypes.kt @@ -14,6 +14,7 @@ import com.squareup.wire.WireEnum import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.countNonNull import com.squareup.wire.`internal`.immutableCopyOf @@ -29,7 +30,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All32.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All32.kt index 875c1e60ff..a9e59f9365 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All32.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All32.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.countNonNull import com.squareup.wire.`internal`.immutableCopyOf @@ -22,7 +23,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All64.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All64.kt index 9bc983fbd7..75d6f09612 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All64.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/All64.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.countNonNull import com.squareup.wire.`internal`.immutableCopyOf @@ -22,7 +23,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllStructs.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllStructs.kt index 88089ef7ac..69e21eeb5a 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllStructs.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllStructs.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.countNonNull import com.squareup.wire.`internal`.immutableCopyOfMapWithStructValues @@ -25,7 +26,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllWrappers.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllWrappers.kt index 399cd55068..38c923d427 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllWrappers.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/AllWrappers.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.redactElements @@ -24,7 +25,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/BuyOneGetOnePromotion.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/BuyOneGetOnePromotion.kt index 71af9fa9d5..fcd4f61426 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/BuyOneGetOnePromotion.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/BuyOneGetOnePromotion.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -18,7 +19,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class BuyOneGetOnePromotion( diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/CamelCase.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/CamelCase.kt index 287486e97a..257441bc7b 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/CamelCase.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/CamelCase.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.sanitize @@ -22,7 +23,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeDrinkPromotion.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeDrinkPromotion.kt index 97bb81fdd8..c147bfc5fc 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeDrinkPromotion.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeDrinkPromotion.kt @@ -14,13 +14,13 @@ import com.squareup.wire.WireEnum import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class FreeDrinkPromotion( diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeGarlicBreadPromotion.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeGarlicBreadPromotion.kt index 6896cec729..8f35d0f410 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeGarlicBreadPromotion.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/FreeGarlicBreadPromotion.kt @@ -11,13 +11,13 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class FreeGarlicBreadPromotion( diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/MapTypes.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/MapTypes.kt index e5d4f43cf3..f15803db4f 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/MapTypes.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/MapTypes.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.immutableCopyOf import kotlin.Any import kotlin.Boolean @@ -19,7 +20,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/Pizza.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/Pizza.kt index a9733d9713..56d3819621 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/Pizza.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/Pizza.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.sanitize @@ -21,7 +22,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class Pizza( diff --git a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/PizzaDelivery.kt b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/PizzaDelivery.kt index 1d03e0f724..7941cfe8e2 100644 --- a/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/PizzaDelivery.kt +++ b/wire-tests/src/jvmJsonKotlinTest/proto-kotlin/squareup/proto3/PizzaDelivery.kt @@ -14,6 +14,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_3 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.immutableCopyOfStruct @@ -27,7 +28,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import okio.ByteString public class PizzaDelivery( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/ModelEvaluation.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/ModelEvaluation.kt index c034c9b410..f653bb7436 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/ModelEvaluation.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/ModelEvaluation.kt @@ -9,6 +9,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.redactElements import com.squareup.wire.`internal`.sanitize @@ -20,7 +21,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/FooBar.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/FooBar.kt index cd3037b162..2c2cae26dc 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/FooBar.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/FooBar.kt @@ -14,6 +14,7 @@ import com.squareup.wire.WireEnum import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.sanitize @@ -32,7 +33,6 @@ import kotlin.`annotation`.AnnotationTarget import kotlin.`annotation`.Retention import kotlin.`annotation`.Target import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class FooBar( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/MessageWithOptions.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/MessageWithOptions.kt index 88d540f8ca..cb8cf2688a 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/MessageWithOptions.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/custom_options/MessageWithOptions.kt @@ -10,6 +10,7 @@ import com.squareup.wire.ProtoWriter import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.protos.kotlin.foreign.ForeignEnum import kotlin.Any import kotlin.Boolean @@ -17,7 +18,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString @MyMessageOptionTwoOption(91011.0f) diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/DeprecatedProto.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/DeprecatedProto.kt index 5842069ea8..082f8195c8 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/DeprecatedProto.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/DeprecatedProto.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -19,7 +20,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class DeprecatedProto( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Form.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Form.kt index 5b25695047..68ef9b33c3 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Form.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Form.kt @@ -13,6 +13,7 @@ import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -22,7 +23,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Set -import kotlin.jvm.JvmSynthetic import okio.ByteString public class Form( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageUsingMultipleEnums.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageUsingMultipleEnums.kt index 9cbc10f47d..8f2262a4ef 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageUsingMultipleEnums.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageUsingMultipleEnums.kt @@ -11,13 +11,13 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString /** diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageWithStatus.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageWithStatus.kt index d61a7fb6b9..c8b578581b 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageWithStatus.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/MessageWithStatus.kt @@ -13,13 +13,13 @@ import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireEnum import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class MessageWithStatus( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/NoFields.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/NoFields.kt index 04e5e5247b..184e689242 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/NoFields.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/NoFields.kt @@ -10,6 +10,7 @@ import com.squareup.wire.ProtoWriter import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Deprecated @@ -17,7 +18,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString @Deprecated(message = "NoFields is deprecated") diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OneOfMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OneOfMessage.kt index ce1e775288..d16c881dc5 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OneOfMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OneOfMessage.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.countNonNull import com.squareup.wire.`internal`.sanitize import kotlin.Any @@ -19,7 +20,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString /** diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OtherMessageWithStatus.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OtherMessageWithStatus.kt index 8570f14b02..325fbb5e1d 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OtherMessageWithStatus.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/OtherMessageWithStatus.kt @@ -13,13 +13,13 @@ import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireEnum import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class OtherMessageWithStatus( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Percents.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Percents.kt index 4f171961cc..b35139f977 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Percents.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/Percents.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -18,7 +19,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class Percents( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/alltypes/AllTypes.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/alltypes/AllTypes.kt index 7c25914fa2..3f452ac85b 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/alltypes/AllTypes.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/alltypes/AllTypes.kt @@ -17,6 +17,7 @@ import com.squareup.wire.`internal`.FloatArrayList import com.squareup.wire.`internal`.IntArrayList import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.LongArrayList import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.decodePrimitive_double @@ -61,7 +62,6 @@ import kotlin.String import kotlin.Unit import kotlin.collections.List import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString import okio.ByteString.Companion.decodeBase64 diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/foreign/ForeignMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/foreign/ForeignMessage.kt index c2cf95a091..aa5c8ffd28 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/foreign/ForeignMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/foreign/ForeignMessage.kt @@ -11,13 +11,13 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class ForeignMessage( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Mappy.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Mappy.kt index 3a8b890a87..0d22df3b67 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Mappy.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Mappy.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.redactElements import kotlin.Any @@ -20,7 +21,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/MappyTwo.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/MappyTwo.kt index 755d3c3811..7d45bb0d46 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/MappyTwo.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/MappyTwo.kt @@ -14,6 +14,7 @@ import com.squareup.wire.WireEnum import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.redactElements import kotlin.Any @@ -23,7 +24,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.Map -import kotlin.jvm.JvmSynthetic import kotlin.lazy import okio.ByteString diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Thing.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Thing.kt index 25472dc25d..0d1c43153a 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Thing.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/map/Thing.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -18,7 +19,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class Thing( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/person/Person.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/person/Person.kt index ec449ab8a4..468436c50b 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/person/Person.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/person/Person.kt @@ -14,6 +14,7 @@ import com.squareup.wire.WireEnum import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.missingRequiredFields @@ -26,7 +27,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString /** diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/RedactedOneOf.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/RedactedOneOf.kt index dd51a348a5..61e47e885e 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/RedactedOneOf.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/redacted/RedactedOneOf.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.countNonNull import kotlin.Any import kotlin.Boolean @@ -18,7 +19,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class RedactedOneOf( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Repeated.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Repeated.kt index 1c4d9e62d1..5a2c1f7510 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Repeated.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Repeated.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.redactElements @@ -21,7 +22,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class Repeated( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Thing.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Thing.kt index 6f0c2702f3..563b8194cd 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Thing.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/repeated/Thing.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.sanitize import kotlin.Any import kotlin.Boolean @@ -18,7 +19,6 @@ import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class Thing( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeRequest.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeRequest.kt index c8f810649e..db6c6d3811 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeRequest.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeRequest.kt @@ -10,13 +10,13 @@ import com.squareup.wire.ProtoWriter import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class SomeRequest private constructor( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeResponse.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeResponse.kt index b5d6f0f4e0..c8a41b8f00 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeResponse.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/services/all_flags_on/SomeResponse.kt @@ -10,13 +10,13 @@ import com.squareup.wire.ProtoWriter import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class SomeResponse private constructor( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/ExternalMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/ExternalMessage.kt index 8c866bd29d..7bb79ffecb 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/ExternalMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/ExternalMessage.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import kotlin.Any @@ -21,7 +22,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class ExternalMessage( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/SimpleMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/SimpleMessage.kt index 2bea487759..f3b27ab3ff 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/SimpleMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/simple/SimpleMessage.kt @@ -14,6 +14,7 @@ import com.squareup.wire.WireEnum import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField import com.squareup.wire.`internal`.JvmStatic +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.missingRequiredFields @@ -28,7 +29,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString /** diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionOne.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionOne.kt index 45128fb641..9189f177eb 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionOne.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionOne.kt @@ -11,13 +11,13 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class NestedVersionOne( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionTwo.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionTwo.kt index 60b83bf9ec..1e606757cb 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionTwo.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/NestedVersionTwo.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.sanitize @@ -21,7 +22,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class NestedVersionTwo( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionOne.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionOne.kt index 7616536afd..0b2caa8111 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionOne.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionOne.kt @@ -11,13 +11,13 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class VersionOne( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionTwo.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionTwo.kt index a1be5fdd23..50e4a4295f 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionTwo.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/kotlin/unknownfields/VersionTwo.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.sanitize @@ -21,7 +22,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class VersionTwo( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/usesany/UsesAny.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/usesany/UsesAny.kt index 7ca1d26093..1493e318e5 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/usesany/UsesAny.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/com/squareup/wire/protos/usesany/UsesAny.kt @@ -12,6 +12,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import com.squareup.wire.`internal`.redactElements @@ -22,7 +23,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class UsesAny( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/EmbeddedMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/EmbeddedMessage.kt index 92a45fe05f..85a902a879 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/EmbeddedMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/EmbeddedMessage.kt @@ -11,6 +11,7 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import com.squareup.wire.`internal`.checkElementsNotNull import com.squareup.wire.`internal`.immutableCopyOf import kotlin.Any @@ -20,7 +21,6 @@ import kotlin.Long import kotlin.String import kotlin.Unit import kotlin.collections.List -import kotlin.jvm.JvmSynthetic import okio.ByteString public class EmbeddedMessage( diff --git a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/OuterMessage.kt b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/OuterMessage.kt index f9282d1e41..250ac4cdee 100644 --- a/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/OuterMessage.kt +++ b/wire-tests/src/jvmKotlinInteropTest/proto-kotlin/squareup/protos/packed_encoding/OuterMessage.kt @@ -11,13 +11,13 @@ import com.squareup.wire.ReverseProtoWriter import com.squareup.wire.Syntax.PROTO_2 import com.squareup.wire.WireField import com.squareup.wire.`internal`.JvmField +import com.squareup.wire.`internal`.JvmSynthetic import kotlin.Any import kotlin.Boolean import kotlin.Int import kotlin.Long import kotlin.String import kotlin.Unit -import kotlin.jvm.JvmSynthetic import okio.ByteString public class OuterMessage(