mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 00:07:05 +05:30
fix(ci): run Detekt separately
This commit is contained in:
parent
0904740980
commit
394558d634
2 changed files with 6 additions and 7 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -29,6 +29,12 @@ jobs:
|
|||
arguments: check -PslimTests
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
- name: Run Detekt
|
||||
uses: gradle/gradle-build-action@v2.3.2
|
||||
with:
|
||||
arguments: detektMain
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
- name: (Fail-only) Upload test report
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
|
|
|
@ -4,7 +4,6 @@ import io.gitlab.arturbosch.detekt.DetektPlugin
|
|||
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.language.base.plugins.LifecycleBasePlugin
|
||||
|
||||
object Detekt {
|
||||
private const val TWITTER_RULES_VERSION = "0.0.18"
|
||||
|
@ -22,12 +21,6 @@ object Detekt {
|
|||
.file("${project.name}.xml")
|
||||
.asFile
|
||||
}
|
||||
project.pluginManager.withPlugin("base") {
|
||||
project.tasks.named(LifecycleBasePlugin.CHECK_TASK_NAME).configure {
|
||||
val task = project.tasks.findByPath("detektMain") ?: project.tasks.findByPath("detekt")
|
||||
if (task != null) dependsOn(task)
|
||||
}
|
||||
}
|
||||
project.dependencies.add(
|
||||
"detektPlugins",
|
||||
"com.twitter.compose.rules:detekt:$TWITTER_RULES_VERSION",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue