From 2945e2d333909c75fa960fa672935cc3e5ca3758 Mon Sep 17 00:00:00 2001 From: Jeremy Mailen Date: Sun, 17 Mar 2024 22:16:56 -0700 Subject: [PATCH] Upgrade to ktlint 1.2.1 and release 4.3.0 Also - Improve plugin versionss - Configure dependabot --- .github/dependabot.yml | 10 ++++++++++ README.md | 10 +++++----- build.gradle.kts | 8 ++++---- gradle/libs.versions.toml | 11 +++++++++-- 4 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..519d912 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "weekly" diff --git a/README.md b/README.md index 55b1529..e94f5e9 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Available on the Gradle Plugins Portal: https://plugins.gradle.org/plugin/org.jm ```kotlin plugins { - id("org.jmailen.kotlinter") version "4.2.0" + id("org.jmailen.kotlinter") version "4.3.0" } ``` @@ -31,7 +31,7 @@ plugins { ```groovy plugins { - id "org.jmailen.kotlinter" version "4.2.0" + id "org.jmailen.kotlinter" version "4.3.0" } ``` @@ -45,7 +45,7 @@ Root `build.gradle.kts` ```kotlin plugins { - id("org.jmailen.kotlinter") version "4.2.0" apply false + id("org.jmailen.kotlinter") version "4.3.0" apply false } ``` @@ -65,7 +65,7 @@ Root `build.gradle` ```groovy plugins { - id 'org.jmailen.kotlinter' version "4.2.0" apply false + id 'org.jmailen.kotlinter' version "4.3.0" apply false } ``` @@ -319,7 +319,7 @@ Alternatively, if you have a custom build convention plugin that utilizes kotlin ```kotlin dependencies { implementation(platform("com.pinterest.ktlint:ktlint-bom:1.2.1")) - implementation("org.jmailen.gradle:kotlinter-gradle:4.2.0") + implementation("org.jmailen.gradle:kotlinter-gradle:4.3.0") } ``` diff --git a/build.gradle.kts b/build.gradle.kts index 48cbf2c..fad0de4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,12 +2,12 @@ import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version libs.versions.kotlin - id("com.gradle.plugin-publish") version "1.1.0" `java-gradle-plugin` `maven-publish` - id("org.jmailen.kotlinter") version "4.1.1" idea + alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.gradle.publish) + alias(libs.plugins.kotlinter) } repositories { @@ -20,7 +20,7 @@ val githubUrl = "https://github.com/jeremymailen/kotlinter-gradle" val webUrl = "https://github.com/jeremymailen/kotlinter-gradle" val projectDescription = "Lint and formatting for Kotlin using ktlint with configuration-free setup on JVM and Android projects" -version = "4.2.0" +version = "4.3.0" group = "org.jmailen.gradle" description = projectDescription diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1a5c80a..5908284 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,10 +1,12 @@ [versions] -kotlin = "1.9.22" -ktlint = "1.1.1" +kotlin = "1.9.23" +ktlint = "1.2.1" android-tools = "7.3.1" junit = "5.10.1" mockito = "4.1.0" commons-io = "2.15.1" +gradle-publish = "1.1.0" +kotlinter-check = "4.2.0" [libraries] ktlint-rule-engine = { group = "com.pinterest.ktlint", name = "ktlint-rule-engine", version.ref = "ktlint" } @@ -28,3 +30,8 @@ ktlint-engine = ["ktlint-rule-engine", "ktlint-rule-engine-core"] ktlint-reporters = ["ktlint-cli-reporter-core", "ktlint-cli-reporter-plain", "ktlint-cli-reporter-html", "ktlint-cli-reporter-checkstyle", "ktlint-cli-reporter-json", "ktlint-cli-reporter-sarif"] ktlint-rulesets = ["ktlint-ruleset-standard"] junit-jupiter = ["junit-jupiter-engine", "junit-jupiter-api", "junit-jupiter-params"] + +[plugins] +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +gradle-publish = { id = "com.gradle.plugin-publish", version.ref = "gradle-publish" } +kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter-check" }