Can I use gradle to apply some styling rules

Hi all,
I’m not an expert in gradle but I’ve used it quite a bit, in the end I always seem to find a way to do what I need but I never feel comfortable with it.
Anyway I’m working in a project where we use gradle mainly for the packaging of our software, scripts and other things, but we do not have any java code.

I created this question in stackoverflow but I thought maybe I would ask here instead.

I was looking into the checkstyle plugin and the checkstyle project and I really like the concept of being able to define rules as xmls and patterns that then can apply to all my sources.
Unfortunately for me it seems that plugin and all the examples I have found are very based on java which is not what I’m using.

So if you had to define some styling rules and using gradle to ensure that the files in your package would follow those rules what would be the best way to go at it?
Is there any examples of existing plugins or something you would recommend me taking a look at?

I tried googling but did not find much, maybe I’m just missing some keywords in my google searches to get to the right results.

Thanks for any feedback and best regards,
Miguel