0.4.0 has been released
Changes:
- Options are per-sourceSet, so you can configure a sourceSet to
generate normal Java, and another sourceSet to generate nano. protobufCodeGenPlugins
andprotobufNativeCodeGenPluginDeps
will no longer apply all plugins automatically. Plugins need to be
configured in thesourceSets
explicitly.
Example:
sourceSets {
main {
proto {
// Configure built-in outputs.
builtins {
// 'java' is added by default. If you don't want additional
// options,
// you don't need to write this block.
java {
// Options added to --java_out
option 'option1=true'
}
}
}
}
nano {
proto {
// Configure built-in outputs. Default is 'java'. Here we only
// build javanano.
builtins {
remove java
javanano {
// Options added to --javanano_out
option 'java_multiple_files=true'
option 'option2=false'
}
}
// Apply the 'grpc' plugin
plugins {
grpc {
// Options added to --grpc_out
option 'nano=true'
option 'option2=false'
}
// Apply the 'xrpc' plugin without options
xrpc { }
}
}
}
}