File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
buildSrc/src/main/kotlin/scripts Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ tasks.register("jacocoReport", JacocoReport::class) {
2727 dependsOn(" test${Default .BUILD_VARIANT } UnitTest" )
2828
2929 val buildVariantClassPath = " ${Default .BUILD_FLAVOR }${Default .BUILD_TYPE .capitalize()} "
30- val outputDir = " ${project.buildDir} /testCoverage/html "
30+ val outputDir = " ${project.buildDir} /testCoverage"
3131
3232 reports {
3333 xml.isEnabled = true
@@ -77,24 +77,31 @@ tasks.register("runTestCoverage") {
7777
7878val detektAll by tasks.registering(Detekt ::class ) {
7979 group = " Quality"
80- description = " Runs a detekt code analysis ruleset on the Android codebase."
80+ description = " Runs a detekt code analysis on the Android codebase."
8181 parallel = true
8282 buildUponDefaultConfig = true
8383
84+ val outputFile = " ${project.buildDir} /staticAnalysis/index.html"
85+
8486 setSource(files(rootProject.projectDir))
85- config.setFrom(project.rootDir.resolve( " config/detekt/detekt.yml" ) )
87+ config.setFrom(" ${ project.rootDir} / config/detekt/detekt.yml" )
8688
8789 include(" **/*.kt" )
8890 exclude(" **/*.kts" , " */build/*" , " /buildSrc" )
8991
9092 reports {
91- xml.enabled = true
9293 html.enabled = true
94+ html.destination = file(outputFile)
95+ xml.enabled = false
9396 txt.enabled = false
9497 }
98+
99+ doLast {
100+ println (" Static Analysis Report: $outputFile " )
101+ }
95102}
96103
97- tasks.register(" runStaticCodeAnalysis " ) {
104+ tasks.register(" runStaticAnalysis " ) {
98105 description = " Run static analysis on the Android codebase."
99106 dependsOn(detektAll)
100107}
You can’t perform that action at this time.
0 commit comments