WireExtension

open class WireExtension(project: Project)

Constructors

Link copied to clipboard
constructor(project: Project)

Types

Link copied to clipboard

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).

Properties

Link copied to clipboard
val dryRun: Property<Boolean>

True to not write generated types to disk, but emit the names of the source files that would otherwise be generated.

Link copied to clipboard
val outputs: ListProperty<WireOutput>

Specified what types to output where. Maps to com.squareup.wire.schema.Target

Link copied to clipboard
val protoLibrary: Property<Boolean>

True to emit .proto files into the output resources. Use this when your .jar file can be used as a library for other proto or Wire projects.

Link copied to clipboard

If true, Wire will fail if not all roots and prunes are used when tree-shaking the schema. This can help discover incorrect configurations early and avoid misexpectations about the built schema. See treeShakingRoots and treeShakingRubbish.

Link copied to clipboard
val rules: Property<String>

A user-provided file listing roots and prunes.

Functions

Link copied to clipboard
fun custom(action: Action<CustomOutput>)

Defines a Custom target. See com.squareup.wire.schema.CustomTarget.

Link copied to clipboard
fun eventListenerFactories(): Set<EventListener.Factory?>
Link copied to clipboard
fun eventListenerFactory(eventListenerFactory: EventListener.Factory)

Add a EventListener.Factory.

Link copied to clipboard
fun eventListenerFactoryClass(eventListenerFactoryClass: String)

Add a EventListener.Factory by name. The referred class must have a no-arguments constructor.

Link copied to clipboard
fun java(action: Action<JavaOutput>)

Defines a Java target. See com.squareup.wire.schema.JavaTarget.

Link copied to clipboard
fun kotlin(action: Action<KotlinOutput>)

Defines a Kotlin target. See com.squareup.wire.schema.KotlinTarget.

Link copied to clipboard

fun loadExhaustively(loadExhaustively: Boolean)

See com.squareup.wire.schema.WireRun.loadExhaustively.

Link copied to clipboard
fun move(action: Action<Move>)

See com.squareup.wire.schema.WireRun.moves.

Link copied to clipboard
fun moves(): List<Move?>
Link copied to clipboard
fun onlyVersion(): @Nullable String?

fun onlyVersion(onlyVersion: String)

See com.squareup.wire.schema.WireRun.onlyVersion.

Link copied to clipboard
fun opaque(vararg opaques: String)

See com.squareup.wire.schema.WireRun.opaqueTypes.

Link copied to clipboard
fun opaques(): Set<String?>
Link copied to clipboard

fun permitPackageCycles(permitPackageCycles: Boolean)

See com.squareup.wire.schema.WireRun.permitPackageCycles.

Link copied to clipboard
fun proto(action: Action<ProtoOutput>)

Defines a Proto target. See com.squareup.wire.schema.ProtoTarget.

Link copied to clipboard

Proto paths for local file trees, backed by a org.gradle.api.file.SourceDirectorySet. Must provide at least a org.gradle.api.file.SourceDirectorySet.srcDir.

fun protoPath(vararg protoPaths: String)

Proto paths for local jars and directories, as well as remote binary dependencies

Link copied to clipboard
fun prune(vararg prunes: String)

See com.squareup.wire.schema.WireRun.treeShakingRubbish.

Link copied to clipboard
fun prunes(): Set<String?>
Link copied to clipboard
fun root(vararg roots: String)

See com.squareup.wire.schema.WireRun.treeShakingRoots.

Link copied to clipboard
fun roots(): Set<String?>
Link copied to clipboard
fun setDryRun(value: Boolean)

For Groovy DSL assignment: dryRun = true.

Link copied to clipboard

For Groovy DSL assignment: protoLibrary = true.

Link copied to clipboard

For Groovy DSL assignment: rejectUnusedRootsOrPrunes = false.

Link copied to clipboard
fun setRules(value: String?)

For Groovy DSL assignment: rules = "path/to/rules.txt".

Link copied to clipboard
fun sinceVersion(): @Nullable String?

fun sinceVersion(sinceVersion: String)

See com.squareup.wire.schema.WireRun.sinceVersion.

Link copied to clipboard

Source paths for local file trees, backed by a org.gradle.api.file.SourceDirectorySet. Must provide at least a org.gradle.api.file.SourceDirectorySet.srcDir.

fun sourcePath(vararg sourcePaths: String)

Source paths for local jars and directories, as well as remote binary dependencies

Link copied to clipboard
fun untilVersion(): @Nullable String?

fun untilVersion(untilVersion: String)

See com.squareup.wire.schema.WireRun.untilVersion.