Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. }
  5. dependencies {
  6. classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10'
  7. }
  8. }
  9.  
  10. plugins {
  11. ...
  12. id 'com.google.protobuf' version "0.8.10"
  13. }
  14. ...
  15. sourceSets {
  16. main {
  17. java {
  18. srcDir 'src/main/protoGen'
  19. }
  20. }
  21. }
  22.  
  23. protobuf {
  24. ...
  25. generateProtoTasks {
  26. ofSourceSet('main').each { task ->
  27. task.builtins {
  28. java {
  29. outputSubDir = 'protoGen'
  30. }
  31. }
  32. task.plugins {
  33. grpc {
  34. outputSubDir = 'protoGen'
  35. }
  36. }
  37. }
  38. }
  39. generatedFilesBaseDir = "$projectDir/src/"
  40. }
  41. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement