{"id":17931125,"url":"https://github.com/andrewkroh/gradle-protobuf-plugin","last_synced_at":"2025-03-24T04:31:37.594Z","repository":{"id":8962382,"uuid":"10702315","full_name":"andrewkroh/gradle-protobuf-plugin","owner":"andrewkroh","description":"Gradle plugin for Google Protocol Buffers","archived":false,"fork":false,"pushed_at":"2015-11-09T05:42:23.000Z","size":386,"stargazers_count":36,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T02:11:25.185Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewkroh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-15T04:56:32.000Z","updated_at":"2022-05-29T02:39:53.000Z","dependencies_parsed_at":"2022-08-26T19:01:37.897Z","dependency_job_id":null,"html_url":"https://github.com/andrewkroh/gradle-protobuf-plugin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewkroh%2Fgradle-protobuf-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewkroh%2Fgradle-protobuf-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewkroh%2Fgradle-protobuf-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewkroh%2Fgradle-protobuf-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewkroh","download_url":"https://codeload.github.com/andrewkroh/gradle-protobuf-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245211259,"owners_count":20578381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T21:19:46.164Z","updated_at":"2025-03-24T04:31:37.363Z","avatar_url":"https://github.com/andrewkroh.png","language":"Groovy","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Plugin\"\u003e\u003c/A\u003ePlugin"],"readme":"Gradle Protobuf Plugin\n=====================\n- Author: Andrew Kroh\n- Download: See [maven central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.andrewkroh.gradle%22)\n- License: Apache License, Version 2.0\n- Requirements: Java 1.5+\n- Google Protocol Buffer Compiler (protoc): Any version\n\nWhat is it?\n-----------\nThis is a plugin for Gradle that enables compiling Google Protocol Buffer .proto files into data access classes. It generates Java, CPP, and Python source files from the .proto files in src/main/proto.\n\nThis plugin adds a dependency on the Java plugin so that it can compile the generated Java source files.\n\nThis plugin generates a sources jar that contains all of the Java sources (including those generated from the .proto files) in this project.\n\nThe Protocol Buffer compiler must be on the path for the plugin to work. If the protocol buffer is in a different location then specify the full path to the compiler in your build.gradle file using protobuf.compiler = '/full/path/protoc'.\n\nUsage\n-----\n```groovy\napply plugin: 'protobuf'\n```\n\nThe plugin JAR needs to be defined in the classpath of your build script. It is available from maven central.\n\n```groovy\nbuildscript {\n    repositories {\n        mavenCentral()\n    }\n\n    dependencies {\n        classpath 'com.andrewkroh.gradle:gradle-protobuf-plugin:0.5.0'\n    }\n}\n```\n\nThe plugin automatically adds a dependency on the google protobuf jars so all you need to do is specify what repository(s) to use.\n\n```groovy\nrepositories {\n    mavenCentral()\n}\n```\n\nProject Layout\n--------------\n\nSimply put your .proto files in `src/main/proto`.\n\nTasks\n-----\n\nThe protobuf plugin defines the following task:\n\n* `compileProto` - Generates source files by compiling .proto files.\n\nExtensions\n----------\n\nThe protobuf plugin adds a `protobuf` extension to the project which allows you to override the default configuration of the plugin.\n\n* `version` - Protocol Buffers version that your project requires. By specifying this value the plugin will verify that it is using specified version of the compiler.\n* `src` - Source directory for your .proto files. The value is relative to the project root.\n* `compiler` - Name (or full path) of the Google Protocol Buffer compiler that the plugin will execute.\n* `outputCpp` - Output directory for generated CPP source files. The value is relative to the project build directory.\n* `outputJava` - Output directory for generated java source files. The value is relative to the project build directory.\n* `outputPython` - Output directory for generated python source files. The value is relative to the project build directory.\n* `outputToProjectDir` - Output generated files relative to project root directory instead of relative to build directory. Defaults to false.\n* `autoDependency` - Activate or deactivate automatic dependency creation. If true, a compile time dependency on `com.google.protobuf:protobuf-java` is added automatically based on the Protocol Buffers version number. Defaults to true.\n\nExample\n-------\n\nSee the example directory in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewkroh%2Fgradle-protobuf-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewkroh%2Fgradle-protobuf-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewkroh%2Fgradle-protobuf-plugin/lists"}