Jerkar plugin for protobuffer

A Jerkar plugin for Google Protobuffer

License

License

Categories

Categories

Protobuf Data Data Structures
GroupId

GroupId

org.jerkar
ArtifactId

ArtifactId

protobuf-plugin
Last Version

Last Version

0.7.0.RC1
Release Date

Release Date

Type

Type

jar
Description

Description

Jerkar plugin for protobuffer
A Jerkar plugin for Google Protobuffer
Source Code Management

Source Code Management

https://github.com/jerkar/protobuf-plugin.git

Download protobuf-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/org.jerkar/protobuf-plugin/ -->
<dependency>
    <groupId>org.jerkar</groupId>
    <artifactId>protobuf-plugin</artifactId>
    <version>0.7.0.RC1</version>
</dependency>
// https://jarcasting.com/artifacts/org.jerkar/protobuf-plugin/
implementation 'org.jerkar:protobuf-plugin:0.7.0.RC1'
// https://jarcasting.com/artifacts/org.jerkar/protobuf-plugin/
implementation ("org.jerkar:protobuf-plugin:0.7.0.RC1")
'org.jerkar:protobuf-plugin:jar:0.7.0.RC1'
<dependency org="org.jerkar" name="protobuf-plugin" rev="0.7.0.RC1">
  <artifact name="protobuf-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jerkar', module='protobuf-plugin', version='0.7.0.RC1')
)
libraryDependencies += "org.jerkar" % "protobuf-plugin" % "0.7.0.RC1"
[org.jerkar/protobuf-plugin "0.7.0.RC1"]

Dependencies

runtime (1)

Group / Artifact Type Version
org.jerkar : core jar 0.7.0.RC1

Project Modules

There are no modules declared in this project.

Build Status Maven Central

Jerkar library for Protobuf

This provides a library to use the protobuf compiler in your Java builds.

How to use

Protobuff compiler must be installed on the hosting machine.

Programmatically

You can use the protocol Buffer wrapper programmatically as a vanilla library using static method dev.jeka.plugins.protobuf.JkProtobufWrapper#compile method.

Command line only

You can invoke this plugin from command line on a Jeka project without declaring it.

To compile .poto files jeka @dev.jeka.plugins:protobuf:[version] protobuf#compile or jeka protobuf#compile if you have annoted a def class with @JkDefClasspath annotation.

To get help and options : jeka protobuf#help

Using with JkPluginJava

The most common usage is to use it along Jeka java plugin. For such you only have to :

  • declare the plugin as shown below
  • update your IDE metadata jeka intellij#iml
  • that's all !
@JkDefClasspath("dev.jeka.plugins:protobuf:[version]")
public class Build extends JkCommandSet {
    
    JkPluginJava javaPlugin = getPlugin(JkPluginJava.class);
    
    JkPluginProtobuf protobufPlugin = getPlugin(JkPluginProtobuf.class);

    ...
}

The plugin takes care to :

  • add a pre-compilation task for generating .java files in jeka/output/geneated_sources/java. .proto source files are supposed to lie in src/main/protobuf.
  • append com.google.protobuf:protobuf-java library to project dependencies.

How to build this project

This project uses Jeka wrapper, you don't need to have Jeka installed on your machine. simply execute ./jekaw cleanPack from the root of this project.

org.jerkar

Jeka

Automate with plain Java code and nothing else.

Versions

Version
0.7.0.RC1
0.5