top | item 35709730

(no title)

bedatadriven | 2 years ago

I work with a large project built with gradle that includes a lot of custom code generation and other automation very specific to our project. Strong disagree with this article.

One thing that makes my gradle experience more pleasant I think is that I assiduously avoid plugins, and just write the meat of my tasks in Java. Adding a new source set is a one-liner, then just put your code generation logic in src/generator/java.

Add a JavaExec task to run your main class and, optionally define inputs and outputs to enable up-to-date checking. Painless, simple, powerful.

Here's an example: https://gist.github.com/akbertram/1d543c8648ddf322f9866c3738...

discuss

order

No comments yet.