diff options
Diffstat (limited to 'build-logic/automation-plugins/src/main/kotlin')
7 files changed, 23 insertions, 17 deletions
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 deleted file mode 100644 index 6f661a6a..00000000 --- a/build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.git-hooks.gradle.kts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved. - * SPDX-License-Identifier: GPL-3.0-only - */ - -import tasks.GitHooks - -tasks.register<GitHooks>("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) -} diff --git a/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/GitHooksPlugin.kt b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/GitHooksPlugin.kt new file mode 100644 index 00000000..3ddb656b --- /dev/null +++ b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/GitHooksPlugin.kt @@ -0,0 +1,18 @@ +package dev.msfjarvis.aps.gradle + +import dev.msfjarvis.aps.gradle.tasks.GitHooks +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.register + +@Suppress("Unused") +class GitHooksPlugin : Plugin<Project> { + + override fun apply(project: Project) { + project.tasks.register<GitHooks>("installGitHooks") { + val projectDirectory = project.layout.projectDirectory + hookScript.set(projectDirectory.file("scripts/pre-push-hook.sh").asFile.readText()) + hookOutput.set(projectDirectory.file(".git/hooks/pre-push").asFile) + } + } +} diff --git a/build-logic/automation-plugins/src/main/kotlin/crowdin/CrowdinExtension.kt b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/crowdin/CrowdinExtension.kt index 761267b5..7d32dc01 100644 --- a/build-logic/automation-plugins/src/main/kotlin/crowdin/CrowdinExtension.kt +++ b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/crowdin/CrowdinExtension.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: GPL-3.0-only */ -package crowdin +package dev.msfjarvis.aps.gradle.crowdin /** Extension for configuring [CrowdinDownloadPlugin] */ interface CrowdinExtension { diff --git a/build-logic/automation-plugins/src/main/kotlin/crowdin/CrowdinPlugin.kt b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/crowdin/CrowdinPlugin.kt index e147b42c..62d8e32d 100644 --- a/build-logic/automation-plugins/src/main/kotlin/crowdin/CrowdinPlugin.kt +++ b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/crowdin/CrowdinPlugin.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: GPL-3.0-only */ -package crowdin +package dev.msfjarvis.aps.gradle.crowdin import de.undercouch.gradle.tasks.download.Download import java.io.File diff --git a/build-logic/automation-plugins/src/main/kotlin/psl/PSLUpdateTask.kt b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/psl/PSLUpdateTask.kt index e8fdc498..7e137b2f 100644 --- a/build-logic/automation-plugins/src/main/kotlin/psl/PSLUpdateTask.kt +++ b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/psl/PSLUpdateTask.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: GPL-3.0-only */ -package psl +package dev.msfjarvis.aps.gradle.psl import okio.buffer import okio.sink diff --git a/build-logic/automation-plugins/src/main/kotlin/psl/PublicSuffixListPlugin.kt b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/psl/PublicSuffixListPlugin.kt index 9d4c3f63..775ec722 100644 --- a/build-logic/automation-plugins/src/main/kotlin/psl/PublicSuffixListPlugin.kt +++ b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/psl/PublicSuffixListPlugin.kt @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package psl +package dev.msfjarvis.aps.gradle.psl import java.io.Serializable import java.util.TreeSet diff --git a/build-logic/automation-plugins/src/main/kotlin/tasks/GitHooks.kt b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/tasks/GitHooks.kt index ec045227..1eb8540f 100644 --- a/build-logic/automation-plugins/src/main/kotlin/tasks/GitHooks.kt +++ b/build-logic/automation-plugins/src/main/kotlin/dev/msfjarvis/aps/gradle/tasks/GitHooks.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: GPL-3.0-only */ -package tasks +package dev.msfjarvis.aps.gradle.tasks import java.io.File import java.nio.file.Files |