diff --git a/.gitignore b/.gitignore index 60fb509d..dc35b061 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ lint/tmp/ # Mirakle mirakle_local.properties + +.android/ diff --git a/feature/calendar/public/src/main/kotlin/ru/pixnews/feature/calendar/CalendarViewModel.kt b/feature/calendar/public/src/main/kotlin/ru/pixnews/feature/calendar/CalendarViewModel.kt index fc3ebd6d..1f67be52 100644 --- a/feature/calendar/public/src/main/kotlin/ru/pixnews/feature/calendar/CalendarViewModel.kt +++ b/feature/calendar/public/src/main/kotlin/ru/pixnews/feature/calendar/CalendarViewModel.kt @@ -31,7 +31,7 @@ import ru.pixnews.feature.calendar.model.CalendarScreenStateLoaded import ru.pixnews.feature.calendar.model.InitialLoad import ru.pixnews.foundation.featuretoggles.FeatureManager -@Suppress("UnusedPrivateMember", "UNUSED_PARAMETER") +@Suppress("UnusedPrivateMember", "UNUSED_PARAMETER", "KDOC_NO_CONSTRUCTOR_PROPERTY_WITH_COMMENT") @ContributesViewModel internal class CalendarViewModel( featureManager: FeatureManager, diff --git a/feature/featuretoggles/public/src/main/kotlin/ru/pixnews/feature/featuretoggles/ui/FeatureToggleListPopulated.kt b/feature/featuretoggles/public/src/main/kotlin/ru/pixnews/feature/featuretoggles/ui/FeatureToggleListPopulated.kt index e68bd420..13a3ee82 100644 --- a/feature/featuretoggles/public/src/main/kotlin/ru/pixnews/feature/featuretoggles/ui/FeatureToggleListPopulated.kt +++ b/feature/featuretoggles/public/src/main/kotlin/ru/pixnews/feature/featuretoggles/ui/FeatureToggleListPopulated.kt @@ -272,7 +272,7 @@ private fun FeatureTogglesComposablePreviewPopulated( @Preview @Composable -private fun FeatureTogglesDropdownMenu() { +private fun PreviewFeatureTogglesDropdownMenu() { val variants = FeatureTogglePreviewFixtures.homeScreenGameCardModel.variants PixnewsTheme { Card( diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dd784fd0..6c9910c8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ android-tools-common = "31.4.0-alpha04" anvil = "2.4.9" bmversions = "0.50.0" detekt = "1.23.4" -diktat = "1.2.5" +diktat = "2.0.0" detekt-compose-rules = "0.3.10" dagger = "2.50" kotlin = "1.9.22" @@ -268,7 +268,7 @@ kotlin-jvm-plugin = { module = "org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jv kotlinx-serialization-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" } ksp-plugin = { group = "com.google.devtools.ksp", name = "symbol-processing-gradle-plugin", version.ref = "ksp" } detekt-plugin = { group = "io.gitlab.arturbosch.detekt", name = "detekt-gradle-plugin", version.ref = "detekt" } -diktat-plugin = { group = "org.cqfn.diktat", name = "diktat-gradle-plugin", version.ref = "diktat" } +diktat-plugin = { group = "com.saveourtool.diktat", name = "diktat-gradle-plugin", version.ref = "diktat" } detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" } detekt-compose-rules = { group = "io.nlopez.compose.rules", name = "detekt", version.ref = "detekt-compose-rules" } firebase-crashlitycs-plugin = { group = "com.google.firebase", name = "firebase-crashlytics-gradle", version.ref = "firebase-crashlytics-plugin" } @@ -298,17 +298,11 @@ anvil = { id = "com.squareup.anvil", version.ref = "anvil" } android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } android-test = { id = "com.android.test", version.ref = "agp" } -androidx-room = { id = "androidx.room", version.ref = "androidx-room" } firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics-plugin" } fbase-options-gradle-plugin = { id = "ru.pixnews.gradle.fbase", version.ref = "fbase-gradle-plugin" } -detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } -diktat = { id = "org.cqfn.diktat.diktat-gradle-plugin", version.ref = "diktat" } -kermit = { id = "co.touchlab.kermit", version.ref = "kermit" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } ben-manes-versions = { id = "com.github.ben-manes.versions", version.ref = "bmversions" } kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } -paparazzi = { id = "app.cash.paparazzi", version.ref = "paparazzi" } prefiller = { id = "io.github.simonschiller.prefiller", version.ref = "prefiller" } -spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } wire = { id = "com.squareup.wire", version.ref = "wire" } diff --git a/gradle/plugin/project/lint/convention/ru.pixnews.gradle.lint.detekt.gradle.kts b/gradle/plugin/project/lint/convention/ru.pixnews.gradle.lint.detekt.gradle.kts index a7f85be1..26ef3f79 100644 --- a/gradle/plugin/project/lint/convention/ru.pixnews.gradle.lint.detekt.gradle.kts +++ b/gradle/plugin/project/lint/convention/ru.pixnews.gradle.lint.detekt.gradle.kts @@ -48,10 +48,7 @@ val detektCheck = tasks.register("detektCheck", Detekt::class) { } } -// https://github.com/gradle/gradle/issues/22468 -if (project.name != "gradle-kotlin-dsl-accessors") { - dependencies { - detektPlugins(versionCatalog.findLibrary("detekt.formatting").get()) - detektPlugins(versionCatalog.findLibrary("detekt.compose.rules").get()) - } +dependencies { + detektPlugins(versionCatalog.findLibrary("detekt.formatting").get()) + detektPlugins(versionCatalog.findLibrary("detekt.compose.rules").get()) } diff --git a/gradle/plugin/project/lint/convention/ru.pixnews.gradle.lint.diktat.gradle.kts b/gradle/plugin/project/lint/convention/ru.pixnews.gradle.lint.diktat.gradle.kts index 7216da86..9b940cdf 100644 --- a/gradle/plugin/project/lint/convention/ru.pixnews.gradle.lint.diktat.gradle.kts +++ b/gradle/plugin/project/lint/convention/ru.pixnews.gradle.lint.diktat.gradle.kts @@ -10,7 +10,7 @@ import ru.pixnews.gradle.lint.excludeNonLintedDirectories * Convention plugin that configures Diktat */ plugins { - id("org.cqfn.diktat.diktat-gradle-plugin") + id("com.saveourtool.diktat") } diktat { @@ -20,10 +20,17 @@ diktat { include("**/*.gradle.kts") excludeNonLintedDirectories() } - githubActions = false + reporters { + plain() + sarif() + } debug = false } -tasks.withType().configureEach { +tasks.withType().configureEach { notCompatibleWithConfigurationCache("invocation of 'Task.project' at execution time is unsupported") } + +tasks.named("mergeDiktatReports").configure { + enabled = false +} diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 47c7c534..52d1a8bd 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -429,6 +429,11 @@ + + + + +