jknair0 / GitHooksTeam

Automate the setup of git hooks as part of gradle lifecycle.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHooksTeam

  • Gradle Plugin that helps you automate setting up git hooks.
  • Using a folder not associated with .git helps you share setup with your team on VCS.

Setup

Using the plugins DSL:

plugins {
  id "tech.jknair.githooksteam" version "1.2.0"
}

Using legacy plugin:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.tech.jknair.githooksteam:githooksteamplugin:1.2.0"
  }
}

apply plugin: "tech.jknair.githooksteam"

Setup hooks path (Optional)

By default plugin takes ${project.rootDir}/.githooks as hooks directory.

You can setup your custom path as follows:

build.gradle[.kts]

gitHooksTeamPlugin {
    srcDir = "your custom path here"
}

Plugin set up reference: https://plugins.gradle.org/plugin/tech.jknair.githooksteam

License

   Copyright 2020 JayaKrishnan Nair

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

About

Automate the setup of git hooks as part of gradle lifecycle.

License:Apache License 2.0


Languages

Language:Kotlin 100.0%