Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle plugin #176

Closed
JakeWharton opened this issue Dec 18, 2014 · 3 comments
Closed

Gradle plugin #176

JakeWharton opened this issue Dec 18, 2014 · 3 comments

Comments

@JakeWharton
Copy link
Collaborator

Since this implementation of protobuf was written with Android in mind, it's fitting that we provide a first-party plugin for Gradle.

The plugin will be released to Maven central along with the other Wire artifacts as wire-gradle-plugin. The plugin ID would be com.squareup.wire. We should also look at deploying to Gradle's new plugin registry which might allow skipping the actual dependency declaration in the future.

Compiler options will be exposed through an extension object named wire. Examples of this would be generating code for options, extension registry name, etc. For example:

wire {
  generateOptions true
  extensionRegistry 'com.example.protos.Extensions'
}

Open questions:

  • Would we only target protos which were hosted in-module (e.g., src/main/proto) and not ones pulled in from external sources either on the classpath or via HTTP, etc.?
jpd236 added a commit to jpd236/wire that referenced this issue Dec 18, 2014
This plugin adds support for generating Java code from .protos using
the Wire compiler to Android library/application projects.

For basic usage, add .proto files to src/main/proto and apply the
'com.squareup.wire' plugin. More customization is available via the
'wire' extension on any sourceSet.

Fixes square#176
@JakeWharton
Copy link
Collaborator Author

EddieRingle pushed a commit to EddieRingle/wire that referenced this issue Jan 31, 2016
This plugin adds support for generating Java code from .protos using
the Wire compiler to Android library/application projects.

For basic usage, add .proto files to src/main/proto and apply the
'com.squareup.wire' plugin. More customization is available via the
'wire' extension on any sourceSet.

Fixes square#176
@devesh
Copy link

devesh commented Oct 25, 2016

Are there any plans to publish this plugin to Gradle's plugin registry?

@JakeWharton
Copy link
Collaborator Author

Not at this time.

On Tue, Oct 25, 2016, 2:41 PM Devesh Parekh notifications@github.com
wrote:

Are there any plans to publish this plugin to Gradle's plugin registry?


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#176 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAEEEWUPVlJPl0PeACXx30g-6EvAn60zks5q3k1NgaJpZM4DJ4kR
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants