ProtoSourceSet
Available in a dev version: 0․11․0-grpc-190
How to configure
Represents a source set for proto files.
Acts like a SourceDirectorySet but also allows configuring protoc plugins.
All source sets have kotlinMultiplatform and grpcKotlinMultiplatform plugins by default. Use includeDefaultProtobufPlugin and includeDefaultGrpcPlugin to opt out.
Example:
kotlin.sourceSets {
commonMain {
proto {
exclude("some.proto")
plugin { getByName("myPlugin") }
}
}
}Properties
BSR (Buf Schema Registry) module dependencies for this source set.
A collection of proto files that are imported by this source set but do not belong to any other source set.
List of all imported proto source sets.
Whether to include the default grpcKotlinMultiplatform protoc plugin for this source set.
Whether to include the default kotlinMultiplatform protoc plugin for this source set.
Protoc plugins that will be applied to proto files in this source set.
Functions
Configures the bsrDeps of this source set.
Proto source sets that this source set extends from. All proto files from protoSourceSet will be used for code generation. All imports from protoSourceSet will be included as well, along with its BSR module dependencies. Its buf.lock file, if set, is adopted by this source set.
Proto files from protoSourceSets will be available as import, but will not be used for code generation. Their BSR module dependencies are included as well, and the first buf.lock file found among them, if any, is adopted.
Proto files from protoSourceSet will be available as import, but will not be used for code generation. Its BSR module dependencies are included as well, and its buf.lock file, if set, is adopted.
Add a plugin to this source set and allows to configure it specifically for this source set.