From 589b133d16c0f2fd5f666d83970241d10bf4008e Mon Sep 17 00:00:00 2001 From: Rob Murdock Date: Fri, 13 Dec 2024 21:53:40 -0500 Subject: [PATCH] Revert "disabling kotlinter until fixes are in for new kotlin" This reverts commit 7c04f1955051eb1ec74e7b57c412425bcaf6cf7c. --- convention-plugins/build.gradle.kts | 20 ++++----- .../zegreatrob/jsmints/plugins/js2.gradle.kts | 2 +- .../jsmints/plugins/lint.gradle.kts | 2 +- libraries/dependency-bom/build.gradle.kts | 4 +- .../minreact-plugin-test/build.gradle.kts | 41 ++++++++++--------- libraries/react-data-loader/build.gradle.kts | 41 ++++++++++--------- .../react-testing-library/build.gradle.kts | 40 +++++++++--------- .../wdio-testing-library/build.gradle.kts | 40 +++++++++--------- .../wrapper-plugin-test/build.gradle.kts | 41 ++++++++++--------- plugins/plugins/build.gradle.kts | 14 +++---- 10 files changed, 124 insertions(+), 121 deletions(-) diff --git a/convention-plugins/build.gradle.kts b/convention-plugins/build.gradle.kts index e8399c7c..de34371f 100644 --- a/convention-plugins/build.gradle.kts +++ b/convention-plugins/build.gradle.kts @@ -1,6 +1,6 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask -//import org.jmailen.gradle.kotlinter.tasks.FormatTask -//import org.jmailen.gradle.kotlinter.tasks.LintTask +import org.jmailen.gradle.kotlinter.tasks.FormatTask +import org.jmailen.gradle.kotlinter.tasks.LintTask repositories { maven { url = uri("https://plugins.gradle.org/m2/") } @@ -13,7 +13,7 @@ plugins { id("java-gradle-plugin") alias(libs.plugins.com.github.ben.manes.versions) alias(libs.plugins.nl.littlerobots.version.catalog.update) -// alias(libs.plugins.org.jmailen.kotlinter) + alias(libs.plugins.org.jmailen.kotlinter) } kotlin { @@ -26,7 +26,7 @@ dependencies { implementation(libs.org.jetbrains.kotlin.kotlin.stdlib) implementation(libs.org.jetbrains.kotlin.kotlin.gradle.plugin) implementation(libs.com.github.ben.manes.gradle.versions.plugin) -// implementation(libs.org.jmailen.gradle.kotlinter.gradle) + implementation(libs.org.jmailen.gradle.kotlinter.gradle) implementation(libs.com.fasterxml.jackson.core.jackson.databind) implementation(platform(libs.com.zegreatrob.testmints.testmints.bom)) implementation("com.zegreatrob.testmints:mint-logs-plugin") @@ -46,12 +46,12 @@ tasks { .matches(candidate.version) } } -// withType(FormatTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// withType(LintTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } + withType(FormatTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + withType(LintTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } clean { delete(rootProject.layout.buildDirectory) dependsOn(provider { (getTasksByName("clean", true) - this).toList() }) diff --git a/convention-plugins/src/main/kotlin/com/zegreatrob/jsmints/plugins/js2.gradle.kts b/convention-plugins/src/main/kotlin/com/zegreatrob/jsmints/plugins/js2.gradle.kts index 3f0f65a1..c6295867 100644 --- a/convention-plugins/src/main/kotlin/com/zegreatrob/jsmints/plugins/js2.gradle.kts +++ b/convention-plugins/src/main/kotlin/com/zegreatrob/jsmints/plugins/js2.gradle.kts @@ -5,7 +5,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi plugins { kotlin("multiplatform") id("com.zegreatrob.jsmints.plugins.reports") -// id("org.jmailen.kotlinter") + id("org.jmailen.kotlinter") } repositories { diff --git a/convention-plugins/src/main/kotlin/com/zegreatrob/jsmints/plugins/lint.gradle.kts b/convention-plugins/src/main/kotlin/com/zegreatrob/jsmints/plugins/lint.gradle.kts index e1e554a1..f85cc275 100644 --- a/convention-plugins/src/main/kotlin/com/zegreatrob/jsmints/plugins/lint.gradle.kts +++ b/convention-plugins/src/main/kotlin/com/zegreatrob/jsmints/plugins/lint.gradle.kts @@ -1,5 +1,5 @@ package com.zegreatrob.jsmints.plugins plugins { -// id("org.jmailen.kotlinter") + id("org.jmailen.kotlinter") } diff --git a/libraries/dependency-bom/build.gradle.kts b/libraries/dependency-bom/build.gradle.kts index 5a3e6009..998a6594 100644 --- a/libraries/dependency-bom/build.gradle.kts +++ b/libraries/dependency-bom/build.gradle.kts @@ -2,7 +2,7 @@ plugins { `java-platform` id("com.zegreatrob.jsmints.plugins.versioning") id("com.zegreatrob.jsmints.plugins.publish") -// id("org.jmailen.kotlinter") + id("org.jmailen.kotlinter") id("com.zegreatrob.jsmints.plugins.ncu") } @@ -49,4 +49,4 @@ afterEvaluate { dependsOn("publishKotlinMultiplatformPublicationToSonatypeRepository") } } -} +} \ No newline at end of file diff --git a/libraries/minreact-plugin-test/build.gradle.kts b/libraries/minreact-plugin-test/build.gradle.kts index 0185215e..6f4cb41d 100644 --- a/libraries/minreact-plugin-test/build.gradle.kts +++ b/libraries/minreact-plugin-test/build.gradle.kts @@ -1,6 +1,6 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi -//import org.jmailen.gradle.kotlinter.tasks.FormatTask -//import org.jmailen.gradle.kotlinter.tasks.LintTask +import org.jmailen.gradle.kotlinter.tasks.FormatTask +import org.jmailen.gradle.kotlinter.tasks.LintTask plugins { id("com.zegreatrob.jsmints.plugins.minreact") @@ -54,22 +54,23 @@ dependencies { } tasks { -// formatKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// formatKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } -// withType(FormatTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// withType(LintTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// lintKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// lintKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } + formatKotlinJsMain { + dependsOn("kspKotlinJs") + } + formatKotlinJsTest { + dependsOn("kspTestKotlinJs") + } + withType(FormatTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + withType(LintTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + lintKotlinJsMain { + dependsOn("kspKotlinJs") + } + lintKotlinJsTest { + dependsOn("kspTestKotlinJs") + } + } diff --git a/libraries/react-data-loader/build.gradle.kts b/libraries/react-data-loader/build.gradle.kts index 4cbbbedf..3de2d4e2 100644 --- a/libraries/react-data-loader/build.gradle.kts +++ b/libraries/react-data-loader/build.gradle.kts @@ -1,5 +1,5 @@ -//import org.jmailen.gradle.kotlinter.tasks.FormatTask -//import org.jmailen.gradle.kotlinter.tasks.LintTask +import org.jmailen.gradle.kotlinter.tasks.FormatTask +import org.jmailen.gradle.kotlinter.tasks.LintTask plugins { id("com.zegreatrob.jsmints.plugins.minreact") @@ -43,22 +43,23 @@ dependencies { } tasks { -// formatKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// formatKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } -// withType(FormatTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// withType(LintTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// lintKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// lintKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } + formatKotlinJsMain { + dependsOn("kspKotlinJs") + } + formatKotlinJsTest { + dependsOn("kspTestKotlinJs") + } + withType(FormatTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + withType(LintTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + lintKotlinJsMain { + dependsOn("kspKotlinJs") + } + lintKotlinJsTest { + dependsOn("kspTestKotlinJs") + } + } diff --git a/libraries/react-testing-library/build.gradle.kts b/libraries/react-testing-library/build.gradle.kts index 6d9dfec3..1c2daca6 100644 --- a/libraries/react-testing-library/build.gradle.kts +++ b/libraries/react-testing-library/build.gradle.kts @@ -1,5 +1,5 @@ -//import org.jmailen.gradle.kotlinter.tasks.FormatTask -//import org.jmailen.gradle.kotlinter.tasks.LintTask +import org.jmailen.gradle.kotlinter.tasks.FormatTask +import org.jmailen.gradle.kotlinter.tasks.LintTask plugins { id("com.zegreatrob.jsmints.plugins.wrapper") @@ -43,22 +43,22 @@ dependencies { } tasks { -// formatKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// formatKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } -// withType(FormatTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// withType(LintTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// lintKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// lintKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } + formatKotlinJsMain { + dependsOn("kspKotlinJs") + } + formatKotlinJsTest { + dependsOn("kspTestKotlinJs") + } + withType(FormatTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + withType(LintTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + lintKotlinJsMain { + dependsOn("kspKotlinJs") + } + lintKotlinJsTest { + dependsOn("kspTestKotlinJs") + } } diff --git a/libraries/wdio-testing-library/build.gradle.kts b/libraries/wdio-testing-library/build.gradle.kts index 34fdb8ea..f4215d7e 100644 --- a/libraries/wdio-testing-library/build.gradle.kts +++ b/libraries/wdio-testing-library/build.gradle.kts @@ -1,5 +1,5 @@ -//import org.jmailen.gradle.kotlinter.tasks.FormatTask -//import org.jmailen.gradle.kotlinter.tasks.LintTask +import org.jmailen.gradle.kotlinter.tasks.FormatTask +import org.jmailen.gradle.kotlinter.tasks.LintTask plugins { id("com.zegreatrob.jsmints.plugins.wrapper") @@ -38,23 +38,23 @@ tasks { named("jsTestTestDevelopmentExecutableCompileSync") { enabled = false } -// formatKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// formatKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } -// withType(FormatTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// withType(LintTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// lintKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// lintKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } + formatKotlinJsMain { + dependsOn("kspKotlinJs") + } + formatKotlinJsTest { + dependsOn("kspTestKotlinJs") + } + withType(FormatTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + withType(LintTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + lintKotlinJsMain { + dependsOn("kspKotlinJs") + } + lintKotlinJsTest { + dependsOn("kspTestKotlinJs") + } } diff --git a/libraries/wrapper-plugin-test/build.gradle.kts b/libraries/wrapper-plugin-test/build.gradle.kts index c609cd72..b6bda92e 100644 --- a/libraries/wrapper-plugin-test/build.gradle.kts +++ b/libraries/wrapper-plugin-test/build.gradle.kts @@ -1,6 +1,6 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi -//import org.jmailen.gradle.kotlinter.tasks.FormatTask -//import org.jmailen.gradle.kotlinter.tasks.LintTask +import org.jmailen.gradle.kotlinter.tasks.FormatTask +import org.jmailen.gradle.kotlinter.tasks.LintTask plugins { id("com.zegreatrob.jsmints.plugins.wrapper") @@ -48,22 +48,23 @@ dependencies { } tasks { -// formatKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// formatKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } -// withType(FormatTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// withType(LintTask::class) { -// exclude { spec -> spec.file.absolutePath.contains("generated") } -// } -// lintKotlinJsMain { -// dependsOn("kspKotlinJs") -// } -// lintKotlinJsTest { -// dependsOn("kspTestKotlinJs") -// } + formatKotlinJsMain { + dependsOn("kspKotlinJs") + } + formatKotlinJsTest { + dependsOn("kspTestKotlinJs") + } + withType(FormatTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + withType(LintTask::class) { + exclude { spec -> spec.file.absolutePath.contains("generated") } + } + lintKotlinJsMain { + dependsOn("kspKotlinJs") + } + lintKotlinJsTest { + dependsOn("kspTestKotlinJs") + } + } diff --git a/plugins/plugins/build.gradle.kts b/plugins/plugins/build.gradle.kts index 045aa1d7..ec934acb 100644 --- a/plugins/plugins/build.gradle.kts +++ b/plugins/plugins/build.gradle.kts @@ -7,7 +7,7 @@ plugins { `java-gradle-plugin` `kotlin-dsl` alias(libs.plugins.com.gradle.plugin.publish) -// alias(libs.plugins.org.jmailen.kotlinter) + alias(libs.plugins.org.jmailen.kotlinter) id("org.jetbrains.kotlin.jvm") version (embeddedKotlinVersion) signing } @@ -80,12 +80,12 @@ kotlin { } tasks { -// formatKotlinMain { -// exclude { spec -> spec.file.absolutePath.contains("generated-sources") } -// } -// lintKotlinMain { -// exclude { spec -> spec.file.absolutePath.contains("generated-sources") } -// } + formatKotlinMain { + exclude { spec -> spec.file.absolutePath.contains("generated-sources") } + } + lintKotlinMain { + exclude { spec -> spec.file.absolutePath.contains("generated-sources") } + } val copyTemplates by registering(Copy::class) { inputs.property("version", rootProject.version) filteringCharset = "UTF-8"