All Projects → gregwhitaker → gradle-flatbuffers-plugin

gregwhitaker / gradle-flatbuffers-plugin

Licence: Apache-2.0 license
Gradle plugin for generating code from Google FlatBuffers schemas

Programming Languages

groovy
2714 projects
shell
77523 projects

Projects that are alternatives of or similar to gradle-flatbuffers-plugin

CppSerialization
Performance comparison of the most popular C++ serialization protocols such as Cap'n'Proto, FastBinaryEncoding, Flatbuffers, Protobuf, JSON
Stars: ✭ 89 (+345%)
Mutual labels:  serialization, flatbuffers
moko-network
Network components with codegeneration of rest api for mobile (android & ios) Kotlin Multiplatform development
Stars: ✭ 107 (+435%)
Mutual labels:  serialization, gradle-plugin
FlexBuffersSwift
Swift implementation of FlexBuffers - a sub project of FlatBuffers
Stars: ✭ 24 (+20%)
Mutual labels:  serialization, flatbuffers
Flatbuffers
FlatBuffers: Memory Efficient Serialization Library
Stars: ✭ 17,180 (+85800%)
Mutual labels:  serialization, flatbuffers
codeartifact-gradle-plugin
Codeartifact gradle plugin
Stars: ✭ 14 (-30%)
Mutual labels:  gradle-plugin
dubbo-hessian-lite
Hessian Lite for Apache Dubbo
Stars: ✭ 45 (+125%)
Mutual labels:  serialization
gradle-natives
Gradle plugin to aid in managing native libraries associated with Java-based projects.
Stars: ✭ 32 (+60%)
Mutual labels:  gradle-plugin
haskell-flatbuffers
An implementation of the flatbuffers protocol in Haskell.
Stars: ✭ 32 (+60%)
Mutual labels:  flatbuffers
zkar
ZKar is a Java serialization protocol analysis tool implement in Go.
Stars: ✭ 435 (+2075%)
Mutual labels:  serialization
jacoco-gradle-testkit-plugin
Gradle plugin for JaCoCo code coverage in tests using Gradle TestKit
Stars: ✭ 37 (+85%)
Mutual labels:  gradle-plugin
avro-serde-php
Avro Serialisation/Deserialisation (SerDe) library for PHP 7.3+ & 8.0 with a Symfony Serializer integration
Stars: ✭ 43 (+115%)
Mutual labels:  serialization
pony-capnp
Cap’n Proto plugin for generating serializable Pony classes. 🐴 - 🎩'n 🅿️
Stars: ✭ 19 (-5%)
Mutual labels:  serialization
serialization-parcelable
Android Parcelable support for the Kotlinx Serialization library.
Stars: ✭ 53 (+165%)
Mutual labels:  serialization
iris
Lightweight Component Model and Messaging Framework based on ØMQ
Stars: ✭ 50 (+150%)
Mutual labels:  serialization
blowdryer
Keep your gradle builds dry 干
Stars: ✭ 22 (+10%)
Mutual labels:  gradle-plugin
raster
A micro server framework, support coroutine, and parallel-computing, used for building flatbuffers/thrift/protobuf/http protocol service.
Stars: ✭ 19 (-5%)
Mutual labels:  flatbuffers
badass-runtime-plugin
Create a custom runtime image of your non-modular application
Stars: ✭ 143 (+615%)
Mutual labels:  gradle-plugin
ConfigDroid
Gradle plugin to generate config classes for your Android projects
Stars: ✭ 31 (+55%)
Mutual labels:  gradle-plugin
serdepp
c++ serialize and deserialize adaptor library like rust serde.rs
Stars: ✭ 70 (+250%)
Mutual labels:  serialization
ZFFramework
cross-platform C++ application framework, do 80% work at 20% cost
Stars: ✭ 65 (+225%)
Mutual labels:  serialization

gradle-flatbuffers-plugin

Build Status

Gradle plugin for generating code from Google FlatBuffers schemas.

Requirements

This plugin requires that the FlatBuffers compiler be installed on the system.

For information on building and installing the compiler please refer to the FlatBuffers Documentation.

Usage

Please see the Gradle Plugin Portal for instructions on including this plugin in your project.

Extension Properties

The plugin defines the following extension properties in the flatbuffers closure:

Property Type Default Value Required Description
flatcPath String flatc False The path to the flatc compiler.
language String null False The language to use when compiling the FlatBuffers.
flatBuffersVersion String 1.10.0 False The version of the java maven binaries to include.

Note: Please see the Supported Languages section for valid language values.

Custom Task Types

The plugin provides the following custom task types for generating FlatBuffers:

Type Description
FlatBuffers Compiles FlatBuffers schemas.

FlatBuffers

This task type compiles FlatBuffers schemas.

    task createFlatBuffers(type: FlatBuffers) {
        inputDir = file("src/main/flatbuffers")
        outputDir = file("src/generated/flatbuffers")
        language = 'java'
        extraArgs = '--grpc'
    }
Property Type Default Value Required Description
inputDir File src/main/flatbuffers False The path to the schemas directory.
outputDir File null True The path to the directory for compiled FlatBuffers.
language String value in extension False The language to use when compiling the schemas.
extraArgs String null False Any additional arguments to flatc (e.g., --grpc)

Note: Please see the Supported Languages section for valid language values.

Supported Languages

The plugin supports generating code in all languages currently supported by FlatBuffers:

Language Property Value
C++ cpp
C# csharp
Go go
GRPC grpc
Java java
Javascript js
Kotlin kotlin
PHP php
Python python

Example

This example generates Java FlatBuffers from the schema files in the default src/main/flatbuffers directory and places the generated code in src/generated/flatbuffers.

    import io.netifi.flatbuffers.plugin.tasks.FlatBuffers
    
    plugins {
      id "io.netifi.flatbuffers" version "1.0.6"
    }

    flatbuffers {
        flatcPath = '/Users/greg/bin/flatc'
        language = 'java'
    }
    
    task createFlatBuffers(type: FlatBuffers) {
        outputDir = file("src/generated/flatbuffers")
    }

Bugs and Feedback

For bugs, questions, and discussions please use the Github Issues.

License

Copyright 2020 Original Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].