title: Using protobuf with Gradle (IntelliJ)
body: <p>I am trying to generate code for a simple protobuf <a href="https://github.com/grpc/grpc-java/blob/master/README.md" rel="noreferrer">example</a> using the build instructions given <a href="https://github.com/grpc/grpc-java/blob/master/COMPILING.md" rel="noreferrer">here</a>. I have been trying for awhile but I am not able to see any auto generated code in my source root. </p>
  
  <p>The following is my <code>build.gradle</code> file</p>
  
  <pre><code>buildscript {
      ext {
          springBootVersion = '2.0.4.RELEASE'
      }
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
          classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE"
          classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.5'
      }
  }
  
  apply plugin: 'java'
  apply plugin: 'eclipse'
  apply plugin: 'idea'
  apply plugin: 'org.springframework.boot'
  apply plugin: 'io.spring.dependency-management'
  apply plugin: 'com.google.protobuf'
  
  group = 'io.ai.vivid'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = 1.8
  
  repositories {
      mavenCentral()
  }
  
  dependencyManagement {
      imports {
          mavenBom 'com.amazonaws:aws-java-sdk-bom:1.11.228'
      }
  }
  
  protobuf {
      protoc {
          artifact = "com.google.protobuf:protoc:3.5.1-1"
      }
  
      generateProtoTasks.generatedFilesBaseDir = 'generated-sources'
  
      plugins {
          grpc {
              artifact = 'io.grpc:protoc-gen-grpc-java:1.14.0'
          }
      }
      generateProtoTasks {
          all()*.plugins {
              grpc {}
          }
      }
  }
  
  dependencies {
      compile 'io.grpc:grpc-netty-shaded:1.14.0'
      compile 'io.grpc:grpc-protobuf:1.14.0'
      compile 'io.grpc:grpc-stub:1.14.0'
  }
  </code></pre>
  
  <p>Also in my <code>build.gradle</code> file IntelliJ complains that it cannot resolve name <code>protobuf</code></p>
  
  <p>Things I have tried</p>
  
  <ul>
  <li><p>Sync gradle tool in IntelliJ. This is the most prominent solution<br>
  given in SO </p></li>
  <li><p>Setting Build tools -> Gradle -> Runner -> Delelgate IDE    build/run
  actions on gradle to true </p></li>
  <li><p>Clean rebuilding of the gradle    project.</p></li>
  </ul>
  
  <p>From my understanding of the GitHub post, when you use the protobuf plugin, the stub will be automatically generated for you. What am I missing?</p>