I am getting (using: api 'com.squareup.wire:wire-runtime:3.0.2')
Execution failed for task ':app:generateProtos'.
unable to resolve 1 imports: testing/tastes/tastes.proto
searching 0 proto paths:
My understanding is that I do not need to define anything in gradle for looking for imports?
But when it says searching 0 proto paths
, it makes me wonder....
My gradle is:
wire { kotlin { android = true } }
File Structure is
-> proto
-> testing
-> people
-> person.proto
-> tastes
-> tastes.proto
my import line in person.proto
is: import "testing/tastes/tastes.proto";
syntax = "proto2";
package testing.people;
option java_package = "com.testing.people";
import "testing/tastes/tastes.proto";
message WirePerson {
optional string name = 1;
repeated string picture_urls = 2;
optional testing.tastes.WirePersonTaste period = 5;
}
syntax = "proto2";
package testing.tastes;
option java_package = "com.testing.tastes";
message WirePersonTaste {
optional string taste = 1;
repeated string picture_urls = 2;
}
I would be very grateful for any assistance :)
Be sure the protos are in
src/main/proto
. Otherwise the plugin won't detect it. If moving it around is a problem, you can specify the path as an option in thekotlin {}
configuration.