jakemarsden / git-hooks-gradle-plugin

Configure shared Git hooks right from your Gradle buildscript
MIT License
18 stars 1 forks source link

Can you build for Java 1.8? #2

Closed dalewking closed 4 years ago

dalewking commented 4 years ago

Working on Android and it only supports up to 1.8 so I run gradle with 1.8. But I can't use your plugin because it targets later

java.lang.UnsupportedClassVersionError: com/github/jakemarsden/githooksgradleplugin/GitHooksPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

com/github/jakemarsden/githooksgradleplugin/GitHooksPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

dalewking commented 4 years ago

Note that in your commit you removed the vars, but that probably was not necessary because that was a compiler only feature. You could have set the target compatibility to 1.8, without changing the source compatibility.

Any way, I am moving on to implement more sophisticated githooks because I want to execute on what is staged, not on the current workspace which might have changes that are not part of the commit.