jguttman94 / pre-commit-gradle

Some custom gradle hooks for pre-commit.
MIT License
17 stars 7 forks source link

Use generic spotless target #8

Closed manuelprinz closed 3 years ago

manuelprinz commented 4 years ago

Hi Jack,

thanks for providing pre-commit hooks for Gradle! Because the target for Spotless is specific to Java I could not use it on my Kotlin projects so I changed it to use the generic targets. It seems to work fine for both types of projects.

Best,

Manuel

pignacio commented 3 years ago

+1. Can we please merge this/move this forward?, I'm having the same issue with Kotlin sources and the branch manuelprinz provided works flawlessly

atychang commented 3 years ago

Hi, I also need this patch so I forked this repo and merged @manuelprinz's PR. If you also need this patch before this PR merging, you can use my forked repo first. You can change the repo name in .pre-commit-config.yaml to atychang/pre-commit-gradle.

repos:
  - repo: https://github.com/atychang/pre-commit-gradle # <-- use this repo
    rev: v0.2.3 # <-- use this tag
    hooks:
      - id: gradle-spotless
        args: [--wrapper, --output]
jguttman94 commented 3 years ago

Sorry about the delay, everyone! I've been away for the holiday season. I'll be validating the changes ASAP, although I see no issue. I'm surprised I missed this in the initial versions, apologies!