Package com.diffplug.spotless
Class GitPrePushHookInstallerGradle
java.lang.Object
com.diffplug.spotless.GitPrePushHookInstaller
com.diffplug.spotless.GitPrePushHookInstallerGradle
Implementation of
GitPrePushHookInstaller
specifically for Gradle-based projects.
This class installs a Git pre-push hook that uses Gradle's `gradlew` executable to check and apply Spotless formatting.-
Nested Class Summary
Nested classes/interfaces inherited from class com.diffplug.spotless.GitPrePushHookInstaller
GitPrePushHookInstaller.Executor, GitPrePushHookInstaller.GitPreHookLogger
-
Field Summary
Fields inherited from class com.diffplug.spotless.GitPrePushHookInstaller
logger, root
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Provides the content of the hook that should be inserted into the pre-push script.Methods inherited from class com.diffplug.spotless.GitPrePushHookInstaller
install, preHookTemplate
-
Constructor Details
-
GitPrePushHookInstallerGradle
-
-
Method Details
-
preHookContent
Provides the content of the hook that should be inserted into the pre-push script.- Specified by:
preHookContent
in classGitPrePushHookInstaller
- Returns:
- A string representing the content to include in the pre-push script.
-