stelios
11/02/2023, 10:52 PMPoisonedYouth
11/03/2023, 6:21 AMstelios
11/03/2023, 9:23 AMbuild
task depend on it, something like preBuild.dependsOn konsistTask
?PoisonedYouth
11/03/2023, 10:37 AMigor.wojda
11/04/2023, 5:47 PMbuild
task dependent on custom konsistTask
(I personally I prefer to have all check isolated in CI - separate checks for tests, konsistTest, detek, ktlint.... so I would go with optional dependency task that will not trigger Konsist test on CI)
2. githook running this Konsist task Before each commit
For the future I am hoping to K2 Compiler
support and this should enable faster feedback
BTW
Thx @stelios I am glad you like it 🙏
I would love to see another community driven article 🙂PoisonedYouth
11/04/2023, 6:32 PMPoisonedYouth
11/05/2023, 1:02 PM@Tag("Konsist")
• Exclude the Konsist tests for the default test task.
tasks.test {
useJUnitPlatform(){
excludeTags("Konsist")
}
}
• Create a custom test task.
val konsistTask = "konsist"
tasks.register<Test>(konsistTask) {
description = "Runs the Konsist Check...."
group = LifecycleBasePlugin.VERIFICATION_GROUP
useJUnitPlatform {
includeTags("Konsist")
}
}
• Let the check task depend on the newly created custom konsist task.
tasks.check{
dependsOn(tasks.named(konsistTask))
}
With this the konsist task can be executed separately in the ci pipeline and still is executed with the check task.igor.wojda
11/06/2023, 11:12 AM