Skip to content

Releases: google/protobuf-gradle-plugin

0.7.1 released

06 Nov 18:26
Compare
Choose a tag to compare

Just a small change: GenerateProtoTask's builtins and plugins properties are now readable. This resolves #49.

0.7.0 has been released

13 Aug 21:25
Compare
Choose a tag to compare

This is a minor feature and bug fix release.

  • Added outputSubDir property that changes the subdirectory name of the generated files (example).
  • Fixed an issue that the plugin cannot run on Java 1.7

0.6.1 has been released

30 Jul 21:06
Compare
Choose a tag to compare

0.6.1 is a minor feature release. It has better dependency support and supports a new protoc option.

  1. Import protos from dependencies without recompiling them (Resolves #15).
    • If a project compiles proto files, they are packaged as resources in
      the compiled jar along with the class files. protobuf-java artifacts
      have already been including proto definitions for built-in types such
      as Any. This is only done for Java. There is a TODO for Android.
    • proto files from dependencies are extracted into a temporary
      directory, which is added to the --proto_path argument of the protoc
      command line, so that they can be imported in the proto files of this
      project, but won't be compiled again.
  2. The protobuf dependencies now works for Android projects too.
  3. Added an option generateDescriptorSet to GenerateProtoTask to support --descriptor_set_out

(0.6.0 should be skipped as it contains an issue which was fixed in 0.6.1).

0.5.0 is released

06 Jul 23:01
Compare
Choose a tag to compare

0.5.0 is a major feature release of the plugin. DSL is overhauled. Most of the code has been re-written. Please refer to README.md for usage.

Major changes:

  • Supports Android projects (resolves #11). Interacts well with Android build elements, e.g., variants, buildTypes and flavors.
  • Moved protoc builtins and plugins configuration from sourceSets to tasks in order to work in Android projects.
  • All Protobuf code-gen options are moved into the top-level protobuf block (resolves #14)
  • Generated files of different builtins and plugins are in different sub-directories (resolves #13)

Minor changes:

  • extractedProtosDir option is removed
  • Released artifacts are now compatible with Java 6 and up

0.4.0 has been released

07 May 23:21
Compare
Choose a tag to compare

Changes:

  • Options are per-sourceSet, so you can configure a sourceSet to
    generate normal Java, and another sourceSet to generate nano.
  • protobufCodeGenPlugins and protobufNativeCodeGenPluginDeps
    will no longer apply all plugins automatically. Plugins need to be
    configured in the sourceSets 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 { }
      }
    }
  }
}