salesforce / grpc-java-contrib

Useful extensions for the grpc-java library
BSD 3-Clause "New" or "Revised" License
220 stars 34 forks source link

Canteen Gradle Plugin #122

Open rmichela opened 5 years ago

rmichela commented 5 years ago

Write a Canteen build plugin for Gradle that mirrors the Maven plugin.

marcoferrer commented 4 years ago

I’m working on sorting out some time to tackle an initial implementation of this. I do have a Gradle script in this project to manually add support until a proper plugin is published. I don’t think the actual plugin should follow what’s done in this script, but it could potentially hold others over in the mean time.

https://github.com/marcoferrer/kroto-plus/pull/87/files

rmichela commented 4 years ago

Thanks for the pointer! I know nothing about writing Gradle plugins, so this is a great seed. Do you think it's worth moving the jar packaging logic out of the Maven plugin into a shared lib both Maven and Gradle can use?

marcoferrer commented 4 years ago

That was the first thing that came to mind. The packaging logic should definitely be shared between the two plugins. The actual Gradle plugin is pretty simple and straight forward. I don’t think it would take me long to put together. One thing to consider is behavior. Should the plugin implicitly lookup the jar artifact configuration or should it be a configurable value? Plenty of Gradle project have multiple publishable artifacts. For instance I’m my case I wanted to bundle the spring bootJar and not the default. Specifically because I need spring to do some of its unpacking magic at startup.