GithubHelp home page GithubHelp logo

leofuso / argo Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 586 KB

A Gradle plugin aimed to help working with Apache Avro. It supports code generation for JSON schema declaration files(.avsc), JSON protocol declaration files(.avpr), and Avro IDL files. In the future, it should support Schema Registry integration, as well.

License: Apache License 2.0

Kotlin 92.17% Java 7.83%
avro avro-schema avro-schema-registry gradle gradle-plugin groovy kotlin

argo's Introduction

Of Argo

Analysis Compatibility Publish Plugin to Portal Publish CLI to Sonatype License

A Gradle plugin aimed to help working with Apache Avro. It supports Java code generation from JSON schema declaration files(.avsc), JSON protocol declaration files(.avpr), and Avro IDL files.

In the future, it should support Schema Registry integration, as well.

Of Quick Facts

If you're looking for examples of how to set up this plugin, there are a few use-cases available for you to look.

There are two use-cases covered by this plugin, Code Generation and Schema Registry integration. Those are segregated into two separated namespaces: Columba and Navis.

At this moment, just the Columba portion has some functionalities ready for use.

Of Columba

You can learn about Columba in more depth here.

Add the following to your build files. Substitute the desired version based on your needs.

settings.gradle

pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
    }
}

build.gradle

plugins {
    id 'io.github.leofuso.argo' version 'VERSION'
}

... and that's it!

Of Kotlin DSL Support

Special notes relevant to using this plugin via the Gradle Kotlin DSL:

  • Apply the plugin declaratively using the plugins {} block. Otherwise, various features mayn't work as intended.
  • See Configuring Plugins in the Gradle Kotlin DSL for more details.
  • Configuration in the avro {} block must be applied differently than in the Groovy DSL.

Of License

This plugin is licensed under the Apache-2.0 License. See the License file for details.

argo's People

Contributors

leofuso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

argo's Issues

Implement InputChanges functionality

Since we're dealing with a Gradle task that may or not need to be run accordingly to its Source files track history, we can optimize the primary task to only run on Source files update.

GitHub Pages

CONTEXT

Instead of using markdown to document the plugin usage, one can use the GitHub pages to do so.

PROBLEM / SOLUTION

It can be done using MkDocs.

Setup Portal publication

... preferably using the already implemented workflows

  • Register to Portal
  • Settle on Plugin ID
  • Get Publication Keys
  • ... figure out best workflow for publications

SchemaParser (final?) implementation

I found the parser implementation to be the most challenging part of the project. There's already a version that seems to be working fine, but I need to cover all scenarios to be safe (obviously).

It's time to learn how to unit-test in Gradle!

... also I'll be borrowing all use cases from: https://github.com/davidmc24/gradle-avro-plugin

Scenarios:

  • A simple Schema. No dependencies;
  • A Schema containing dependencies from somewhere up the chain;
  • A Schema containing dependencies from immediately up the chain;
  • A Schema containing dependencies from immediately down the chain;
  • A Schema containing dependencies from somewhere down the chain;
  • A Schema containing unresolved dependencies;
  • A Schema containing several dependencies, in reverse order (to stress the iterator);
  • A simple Protocol. No dependencies;
  • ... can a Protocol have dependencies? Discovery time!

Multiple classpaths as Sources

I've found a Gradle Plugin built on top of David's plugin that enables dependencies as sources for code generation. It seems like a useful feature so I'm going to try to implement it.

I also need to modify the IDL task to accept multiple classpath configs (why not?).

Documentation

Update the README.md with actual relevant information regarding the project.

  • Ref. to original Avro Plugin
  • Guide to Groovy DSL
  • Guide to Kotlin DSL
  • Ref. to use-cases
  • Ref. to supporting different Avro Compiler versions (need to be tested, btw)
  • Update all Templates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.