aboutsummaryrefslogtreecommitdiff
path: root/build-logic/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'build-logic/src/main')
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinJVMLibrary.kt28
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt18
2 files changed, 28 insertions, 18 deletions
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinJVMLibrary.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinJVMLibrary.kt
new file mode 100644
index 00000000..253c7aed
--- /dev/null
+++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinJVMLibrary.kt
@@ -0,0 +1,28 @@
+/*
+ * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+package app.passwordstore.gradle
+
+import app.passwordstore.gradle.LintConfig.configureLint
+import com.android.build.api.dsl.Lint
+import com.android.build.gradle.LintPlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.kotlin.dsl.apply
+import org.gradle.kotlin.dsl.configure
+import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
+
+@Suppress("Unused")
+class KotlinJVMLibrary : Plugin<Project> {
+
+ override fun apply(project: Project) {
+ project.pluginManager.run {
+ apply(KotlinPluginWrapper::class)
+ apply(LintPlugin::class)
+ apply(KotlinCommonPlugin::class)
+ }
+ project.extensions.configure<Lint> { configureLint(project) }
+ }
+}
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt
deleted file mode 100644
index e9c9d1d3..00000000
--- a/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinLibraryPlugin.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
- * SPDX-License-Identifier: GPL-3.0-only
- */
-
-package app.passwordstore.gradle
-
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.kotlin.dsl.apply
-
-@Suppress("Unused")
-class KotlinLibraryPlugin : Plugin<Project> {
-
- override fun apply(project: Project) {
- project.pluginManager.apply(KotlinCommonPlugin::class)
- }
-}