0

I am trying to Implement Report State with gRPC for the Smart Home module on the Actions on Google. But I can not do all imports for my *.proto file (as official documentation said): https://developers.google.com/actions/smarthome/report-state
What do I do wrong?
my protofile:

syntax = "proto3";

package google.home.graph.v1;

import "google/home/graph/v1/device.proto"; // --> file not found
...

build.gradle:

buildscript {
  repositories {
    mavenCentral()
    jcenter()
  }
  dependencies {
    classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE'
    classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
  }
}


group 'pro.company'
version '1.0-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'com.google.protobuf'

protobuf {
protoc {
    artifact = "com.google.protobuf:protoc:3.5.1-1"
}
plugins {
    grpc {
        artifact = 'io.grpc:protoc-gen-grpc-java:1.12.0'
    }
}
generateProtoTasks {
    all()*.plugins {
        grpc {}
    }
  }
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
  mavenCentral()
  jcenter()
}

jar {
  baseName = 'test'
  version = ''
}

springBoot {
  mainClass = "pro.foreway.Application"
  executable = true
}

dependencies {
  compile 'org.springframework.boot:spring-boot-starter-web'

  compile 'io.grpc:grpc-netty:1.12.0'
  compile 'io.grpc:grpc-protobuf:1.12.0'
  compile 'io.grpc:grpc-stub:1.12.0'

  compile 'com.google.api.grpc:googleapis-common-protos:0.0.3'
}

structure

1 Answers1

0

All of the protos that you need have been added to the googleapis repository, so you should be able to take device.proto and drop it in. We also added some new APIs related to querying and syncing data from the home graph to make it easier to verify the data that it has.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35