wire-compiler / com.squareup.wire.schema / KotlinTarget

KotlinTarget

data class KotlinTarget : Target

Generate .kt sources.

Constructors

<init>

KotlinTarget(includes: List<String> = listOf("*"), excludes: List<String> = listOf(), exclusive: Boolean = true, outDirectory: String, android: Boolean = false, javaInterop: Boolean = false, rpcCallStyle: RpcCallStyle = RpcCallStyle.SUSPENDING, rpcRole: RpcRole = RpcRole.CLIENT, singleMethodServices: Boolean = false)

Generate .kt sources.

Properties

android

val android: Boolean

True for emitted types to implement android.os.Parcelable.

excludes

val excludes: List<String>

Proto types to excluded generated sources for. Types listed here will not be generated for this target.

exclusive

val exclusive: Boolean

True if types emitted for this target should not also be emitted for other targets. Use this to cause multiple outputs to be emitted for the same input type.

includes

val includes: List<String>

Proto types to include generated sources for. Types listed here will be generated for this target and not for subsequent targets in the task.

javaInterop

val javaInterop: Boolean

True for emitted types to implement APIs for easier migration from the Java target.

outDirectory

val outDirectory: String

rpcCallStyle

val rpcCallStyle: RpcCallStyle

Blocking or suspending.

rpcRole

val rpcRole: RpcRole

Client or server.

singleMethodServices

val singleMethodServices: Boolean

True for emitted services to implement one interface per RPC.