grpc-java-contrib icon indicating copy to clipboard operation
grpc-java-contrib copied to clipboard

Canteen Gradle Plugin

Open rmichela opened this issue 4 years ago • 3 comments

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

rmichela avatar Aug 22 '19 15:08 rmichela

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

marcoferrer avatar Nov 15 '19 13:11 marcoferrer

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?

rmichela avatar Nov 15 '19 14:11 rmichela

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.

marcoferrer avatar Nov 15 '19 14:11 marcoferrer