feat: create repository
This commit is contained in:
20
src/main/groovy/di9/gradle/githooks/GitHooksPlugin.groovy
Normal file
20
src/main/groovy/di9/gradle/githooks/GitHooksPlugin.groovy
Normal file
@@ -0,0 +1,20 @@
|
||||
package di9.gradle.githooks
|
||||
|
||||
import org.gradle.api.NamedDomainObjectContainer
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
class GitHooksPlugin implements Plugin<Project> {
|
||||
|
||||
@Override
|
||||
void apply(Project project) {
|
||||
NamedDomainObjectContainer<GitHook> container = project.container(GitHook)
|
||||
project.extensions.add("githooks", container)
|
||||
|
||||
project.tasks.register("githooks", GitHooksTask, {
|
||||
group = "other"
|
||||
description = "setup git hooks"
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user