@@ -11,15 +11,15 @@ For more information about the Protobuf Compiler, please refer to
11
11
[ Google Developers Site] ( https://developers.google.com/protocol-buffers/docs/reference/java-generated?csw=1 ) .
12
12
13
13
## Latest Version
14
- The latest version is `` 0.6.1 `` . It is available on Maven Central. To add
14
+ The latest version is `` 0.7.0 `` . It is available on Maven Central. To add
15
15
dependency to it:
16
16
``` gradle
17
17
buildscript {
18
18
repositories {
19
19
mavenCentral()
20
20
}
21
21
dependencies {
22
- classpath 'com.google.protobuf:protobuf-gradle-plugin:0.6.1 '
22
+ classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.0 '
23
23
}
24
24
}
25
25
```
@@ -33,7 +33,7 @@ buildscript {
33
33
}
34
34
}
35
35
dependencies {
36
- classpath 'com.google.protobuf:protobuf-gradle-plugin:0.6.2 -SNAPSHOT'
36
+ classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.1 -SNAPSHOT'
37
37
}
38
38
}
39
39
```
@@ -47,7 +47,7 @@ buildscript {
47
47
mavenLocal()
48
48
}
49
49
dependencies {
50
- classpath 'com.google.protobuf:protobuf-gradle-plugin:0.6 .1-SNAPSHOT'
50
+ classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7 .1-SNAPSHOT'
51
51
}
52
52
}
53
53
```
@@ -311,6 +311,8 @@ The task also provides following options:
311
311
}
312
312
```
313
313
314
+ #### Change where the generated files are
315
+
314
316
By default generated Java files are under
315
317
`` $generatedFilesBaseDir/$sourceSet/$builtinPluginName `` , where
316
318
`` $generatedFilesBaseDir `` is `` $buildDir/generated/source/proto `` by default,
@@ -323,6 +325,23 @@ protobuf {
323
325
}
324
326
```
325
327
328
+ The subdirectory name, which is by default `` $builtinPluginName `` , can also be
329
+ changed by setting the `` outputSubDir `` property in the `` builtins `` or
330
+ `` plugins `` block of a task configuration within `` generateProtoTasks `` block
331
+ (see previous section). E.g.,
332
+
333
+ ``` gradle
334
+ { task ->
335
+ task.plugins {
336
+ grpc {
337
+ // Write the generated files under
338
+ // "$generatedFilesBaseDir/$sourceSet/grpcjava"
339
+ outputSubDir = 'grpcjava'
340
+ }
341
+ }
342
+ }
343
+ ```
344
+
326
345
### Protos in dependencies
327
346
328
347
If a Java project contains proto files, they will be packaged in the jar files
0 commit comments