scapegoat icon indicating copy to clipboard operation
scapegoat copied to clipboard

Integration with Gradle

Open jackandjackadswithsm opened this issue 7 years ago • 12 comments

I am trying to integrate with my gradle build and included the following in build.gradle compile(group: 'io.jenner', name: 'gradle-scapegoat', version: '0.90.0')

I don't see tasks related to running scapegoat. Am I missing something? Or let me know how to run scapegoat using gradle and where to find output (reports)

jackandjackadswithsm avatar Apr 18 '18 16:04 jackandjackadswithsm

That will only provide you with the dependency, I wont run/create a scapegoat task. Once I find the solution I will add it here.

willis7 avatar May 23 '18 20:05 willis7

Hi @jackandjackadswithsm and @willis7, did you managed to make it work?

BalmungSan avatar Jul 12 '18 13:07 BalmungSan

Hi!

I was wondering, if there was any update on this? Are there any examples of how to get scapegoat working in Gradle?

Thanks! :)

carlspring avatar Dec 16 '18 19:12 carlspring

It turns out it's not that different from Maven-Scapegoat integration. I managed to get it working with basic scala library gradle project (generated with gradle init). The resulting build file is https://gist.github.com/eugene-sy/6d637290c9c178bbd8d156c69a51ff43

@jackandjackadswithsm , @willis7 , @BalmungSan , @carlspring could you check if it works for you? If it does, I'll provide an update for the README

eugene-sy avatar Dec 20 '18 13:12 eugene-sy

@Axblade unfortunately, I'm no longer working with the client or Scala. However, from what you have shared, it looks plausible. It also suggests this runs with every compile? Is that correct?

willis7 avatar Dec 20 '18 16:12 willis7

@willis7 yep, it run on every compile attempt. I guess the same happens with maven. Chances are, better integration requires a full-featured plugin.

eugene-sy avatar Dec 20 '18 16:12 eugene-sy

@eugene-sy ,

Your gist seems to no longer exist! Would you mind re-sharing it?

carlspring avatar Feb 23 '19 01:02 carlspring

@carlspring Ah, sorry, it was an unforeseen side effect of GitHub handle change Here is the updated link https://gist.github.com/eugene-sy/6d637290c9c178bbd8d156c69a51ff43

eugene-sy avatar Feb 25 '19 21:02 eugene-sy

@eugene-sy ,

Thanks a lot! I'll have a look! :)

carlspring avatar Feb 25 '19 21:02 carlspring

I'm currently working on a Gradle plugin for Scapegoat. It would be nice if someone could help me validating it and suggest missing/desired functionality. Obviously code contributions are welcome and encouraged. Here is the repo: https://github.com/eugene-sy/gradle-scapegoat-plugin And configurations examples are here: https://github.com/eugene-sy/gradle-scapegoat-plugin/tree/master/example The plugin is currently being processed by the Gradle team for publishing. Please, don't take it as a self-advertising :)

eugene-sy avatar May 12 '20 16:05 eugene-sy

The plugin was published some time ago: https://plugins.gradle.org/plugin/com.github.eugenesy.scapegoat

eugene-sy avatar May 24 '20 17:05 eugene-sy