ProtoRootSet

Aggregates inputs for a run of Wire. Instances of this are either proto sources (these emit code) or proto paths (these are only used to resolve references).

This uses a Gradle configuration for the library and project dependencies that we need Gradle to resolve. It uses a basic MutableList<String> for paths to files and .jar files.

This also keeps track of includes and excludes that apply only to the referenced file trees. A single run of Wire may use many ProtoRootSets, each with their own sets of includes and excludes.

Functions

Link copied to clipboard
fun exclude(vararg excludePaths: String)

If set, all the files defined as excluded will be ignored. Example: "com/example/irrelevant.proto".

Link copied to clipboard
fun include(vararg includePaths: String)

If set, only the files defined as included will be processed. Example: "com/example/important.proto".

Link copied to clipboard
fun srcDir(fileCollection: Any)

Adds a set of source. The given paths are evaluated as per Project.files.

fun srcDir(dir: String)

Sets a directory. Example: "src/main/proto".

Link copied to clipboard
fun srcDirs(vararg dirs: String)

Sets one or more directories.

Link copied to clipboard
fun srcJar(jar: String)

Sets a local or a remote jar. Examples: "libs/protos.jar", or "com.example:protos:1.0.0".

fun srcJar(convertible: ProviderConvertible<MinimalExternalModuleDependency>)
fun srcJar(provider: Provider<MinimalExternalModuleDependency>)

Sets a local or a remote jar.

Link copied to clipboard
fun srcProject(projectPath: String)

Sets a project. Example: ":protos".

fun srcProject(project: ProjectDependency)

Sets a project.