Fork me on GitHub

wire:generate-sources

Full name:

de.m3y.maven:wire-maven-plugin:1.3:generate-sources

Description:

A maven mojo that executes Wire's JavaGenerator.

Based on original plugin which got dropped by the project.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: generate-sources.

Required Parameters

Name Type Since Description
<protoFiles> String[] - List of proto files to compile relative to ${protoPaths}.
User property is: wire.protoFiles.

Optional Parameters

Name Type Since Description
<emitAndroid> boolean - True for emitted types to implement android.os.Parcelable.
See also: Customizing Output
Default value is: false.
User property is: wire.android.
<emitAndroidAnnotations> boolean - True to enable the androidx.annotation.Nullable annotation where applicable.
See also: Customizing Output
Default value is: false.
User property is: wire.androidAnnotations.
<emitCompact> boolean - True to emit code that uses reflection for reading, writing, and toString methods which are normally implemented with generated code.
See also: Customizing Output
Default value is: false.
User property is: wire.compact.
<excludes> String[] - Configures Wire compiler Proto types pruning 'parts to be removed' of the generated sources.

This list should contain package names (suffixed with `.*`) and type names only. It should not contain member names.

Example: 'com.example.sales.*'


See also: Pruning
User property is: wire.excludes.
<generatedSourceDirectory> String - Location for the wire compiler generated sources.
Default value is: ${project.build.directory}/generated-sources/wire.
User property is: wire.generatedSourceDirectory.
<includes> String[] - Configures Wire compiler Proto types pruning 'parts to be kept' of the generated sources.

This list should contain package names (suffixed with `.*`) and type names only. It should not contain member names.

Example: 'com.example.pizza.*'


See also: Pruning
User property is: wire.includes.
<protoPaths> String[] - The root of one or more proto source directories.

Only used if wire.protoSourceDirectory is not configured!


User property is: wire.protoPaths.
<protoSourceDirectory> String - The root of the proto source directory.

If configured, wire.protoPaths will be ignored!


Default value is: ${project.basedir}/src/main/proto.
User property is: wire.protoSourceDirectory.

Parameter Details

<emitAndroid>

True for emitted types to implement android.os.Parcelable.
See also: Customizing Output
  • Type: boolean
  • Required: No
  • User Property: wire.android
  • Default: false

<emitAndroidAnnotations>

True to enable the androidx.annotation.Nullable annotation where applicable.
See also: Customizing Output
  • Type: boolean
  • Required: No
  • User Property: wire.androidAnnotations
  • Default: false

<emitCompact>

True to emit code that uses reflection for reading, writing, and toString methods which are normally implemented with generated code.
See also: Customizing Output
  • Type: boolean
  • Required: No
  • User Property: wire.compact
  • Default: false

<excludes>

Configures Wire compiler Proto types pruning 'parts to be removed' of the generated sources.

This list should contain package names (suffixed with `.*`) and type names only. It should not contain member names.

Example: 'com.example.sales.*'


See also: Pruning
  • Type: java.lang.String[]
  • Required: No
  • User Property: wire.excludes

<generatedSourceDirectory>

Location for the wire compiler generated sources.
  • Type: java.lang.String
  • Required: No
  • User Property: wire.generatedSourceDirectory
  • Default: ${project.build.directory}/generated-sources/wire

<includes>

Configures Wire compiler Proto types pruning 'parts to be kept' of the generated sources.

This list should contain package names (suffixed with `.*`) and type names only. It should not contain member names.

Example: 'com.example.pizza.*'


See also: Pruning
  • Type: java.lang.String[]
  • Required: No
  • User Property: wire.includes

<protoFiles>

List of proto files to compile relative to ${protoPaths}.
  • Type: java.lang.String[]
  • Required: Yes
  • User Property: wire.protoFiles

<protoPaths>

The root of one or more proto source directories.

Only used if wire.protoSourceDirectory is not configured!

  • Type: java.lang.String[]
  • Required: No
  • User Property: wire.protoPaths

<protoSourceDirectory>

The root of the proto source directory.

If configured, wire.protoPaths will be ignored!

  • Type: java.lang.String
  • Required: No
  • User Property: wire.protoSourceDirectory
  • Default: ${project.basedir}/src/main/proto