Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Pull request Compare This branch is 14 commits behind aantono:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
gradle/wrapper
src/main
testProject
.gitignore
README.md
build.gradle
build.sh
gradlew
gradlew.bat

README.md

Protobuf Plugin for Gradle

The Protobuf plugin provides protobuf compilation to your project.

Latest Version

ws.antonov.gradle.plugins:gradle-plugin-protobuf:0.8 - Available on Maven Central

Usage

To use the protobuf plugin, include in your build script:

apply plugin: 'protobuf'

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'ws.antonov.gradle.plugins:gradle-plugin-protobuf:0.8'
    }
}

// Optional - defaults to 'protoc' searching through your PATH
protocPath = '/usr/local/bin/protoc'
// Optional - defaults to value below
extractedProtosDir = "${project.buildDir.path}/extracted-protos"
// Optional - defaults to "${project.buildDir}/generated-sources/${sourceSet.name}"
generatedFileDir = "${projectDir}/src" // This directory will get the current sourceSet.name appended to it. i.e. src/main or src/test

dependencies {
    // If you have your protos archived in a tar file, you can specify that as a dependency
    //   ... alternative archive types supported are: jar, tar, tar.gz, tar.bz2, zip
    protobuf files("lib/protos.tar.gz")
    // Different configuration fileSets are supported
    testProtobuf files("lib/protos.tar")
}
Something went wrong with that request. Please try again.