From c3279e65b74c0fc7c38cdf13a4b98e69b5241254 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 14 Nov 2021 12:10:53 +0530 Subject: build-logic: add automation convention plugins --- .../com.github.android-password-store.git-hooks.gradle.kts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.git-hooks.gradle.kts (limited to 'build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.git-hooks.gradle.kts') diff --git a/build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.git-hooks.gradle.kts b/build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.git-hooks.gradle.kts new file mode 100644 index 00000000..6f661a6a --- /dev/null +++ b/build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.git-hooks.gradle.kts @@ -0,0 +1,12 @@ +/* + * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ + +import tasks.GitHooks + +tasks.register("installGitHooks") { + val projectDirectory = layout.projectDirectory + hookScript.set(projectDirectory.file("scripts/pre-push-hook.sh").asFile.readText()) + hookOutput.set(projectDirectory.file(".git/hooks/pre-push").asFile) +} -- cgit v1.2.3