From 9e6c033e03b41924e7df109652b46ae7f87cd104 Mon Sep 17 00:00:00 2001 From: Swordsteel Date: Thu, 31 Oct 2024 11:47:15 +0000 Subject: [PATCH] add plugin library --- README.md | 6 ++++++ build.gradle.kts | 1 + settings.gradle.kts | 1 + ...in.hlaeja-common-plugin.library.gradle.kts | 19 +++++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 src/main/kotlin/ltd.hlaeja.plugin.hlaeja-common-plugin.library.gradle.kts diff --git a/README.md b/README.md index de40dd7..7bb02c3 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,12 @@ id `ltd.hlaeja.plugin.hlaeja-common-plugin.common-ktlint` Ktlint enforces consistent code style and formatting across Kotlin codebases. +### Plugin Library + +id `ltd.hlaeja.plugin.hlaeja-common-plugin.library` + +Default setting and tasks for libraries. + ## Releasing plugin Run `release.sh` script from `master` branch. diff --git a/build.gradle.kts b/build.gradle.kts index c5129c1..a03eb44 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,6 +16,7 @@ dependencies { implementation(hlaeja.ltd.hlaeja.plugin.core) implementation(hlaeja.org.jetbrains.kotlin.gradle.plugin) implementation(hlaeja.org.jlleitschuh.ktlint.gradle.plugin) + implementation(hlaeja.org.springframework.springboot.gradle.plugin) } description = "Hlæja Common Plugin" diff --git a/settings.gradle.kts b/settings.gradle.kts index 9f658ca..e36c463 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -24,6 +24,7 @@ dependencyResolutionManagement { mavenLocal() hlaejaRepository(this) gradlePluginPortal() + mavenCentral() } versionCatalogs.create("hlaeja").from("ltd.hlaeja.catalog:hlaeja-version-catalog:${getProperty("catalog")}") } diff --git a/src/main/kotlin/ltd.hlaeja.plugin.hlaeja-common-plugin.library.gradle.kts b/src/main/kotlin/ltd.hlaeja.plugin.hlaeja-common-plugin.library.gradle.kts new file mode 100644 index 0000000..b5d7240 --- /dev/null +++ b/src/main/kotlin/ltd.hlaeja.plugin.hlaeja-common-plugin.library.gradle.kts @@ -0,0 +1,19 @@ +import org.springframework.boot.gradle.tasks.bundling.BootJar + +plugins { + id("ltd.hlaeja.plugin.hlaeja-common-plugin.common") + id("org.springframework.boot") +} + +java { + withSourcesJar() +} + +tasks { + named("jar") { + archiveClassifier.set("") + } + withType { + enabled = false + } +}