Skip to content

Boot tasks for fetching google protobuf protoc binary and compiling proto file

Notifications You must be signed in to change notification settings

ajchemist/boot-protobuf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boot-protobuf

https://img.shields.io/clojars/v/boot-protobuf.svg https://jarkeeper.com/ajchemist/boot-protobuf/downloads.svg https://travis-ci.org/aJchemist/boot-protobuf.svg?branch=master

Boot tasks for fetching google protobuf protoc binary and compiling proto file.

Usage

(set-env!
 :dependencies
 '[[com.google.protobuf/protobuf-java "3.0.2"] ;; needed to compile *.java
   [boot-protobuf "0.3.0" :scope "test"]])

(require '[boot-protobuf.core :refer [compile-protobuf-java]])

compile-protobuf-java task do following jobs.

  1. Fetch google protobuf protoc(protobuf compiler) binary files.
  2. Caching protoc binary file for next trampoline.
  3. Execute protoc for compiling `*.proto` file to java.
  4. `add-resource` above generated java source file.
(boot
 (compile-protobuf-java :proto "message.proto")
 (javac :options ["-Xlint:none"])
 (sift :include #{#".*/.*.java$"} :invert true) ; optional
 )

CHANGES

0.3.0

Deprecated boot-protobuf single segment ns, use boot-protobuf.core instead.

About

Boot tasks for fetching google protobuf protoc binary and compiling proto file

Resources

Stars

Watchers

Forks

Packages

No packages published