-
Notifications
You must be signed in to change notification settings - Fork 569
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
Can you help with example? Wire (android studio). #441
Comments
+1. I'm trying to find the compiler-with-dependencies jar, I can't find it anywhere. |
when you use maven, just run the command |
I'm use GRADLE, not maven. may I run this command in Android Studio (Gradle)? Update: I've found solution, but it's so inconvenient... |
You can either invoke the command-line interface using a JavaExec task or add the Wire compiler as a buildscript classpath dependency and use its API directly. We're currently doing the former. We are (slowly) working on a Gradle plugin: https://github.com/square/wire-gradle-plugin, but it's not really ready yet. |
Nothing particularly actionable here. Let's get that new Gradle plugin done. |
@Gilb007 What is the solution? |
If it's not helpfull, I've will elaborate. |
If you're like me and not super comfortable with gradle, here's a quick overview of specifically what you can do in your build.gradle to auto-generate java from your *.proto files using the wire compiler. Change the protoPath and wireGeneratedPath based on your source layout.
|
The example by @stuckj works a treat. I modified it a bit so the classes are only built when any
|
I made the task incremental.
Put this in
This requires latest gradle wrapper. I'm using 5.4.1 |
Sorry for inconvenience, but second day don't understand how to use wire library in my android studio project (gradle). Would you give example project? I want to see how to complete my project for use awesome protobuf. Please!
The text was updated successfully, but these errors were encountered: