Skip to content

Commit

Permalink
feat: output relative paths for the merged report files in the log
Browse files Browse the repository at this point in the history
Signed-off-by: Art Shendrik <[email protected]>
  • Loading branch information
amal committed Mar 6, 2024
1 parent 986bfd8 commit 21eb22d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
### Changed
- return the plugin artifact shrinking with R8 (saved 32.719%, 265.9 KB).
- update compatibility methods `NamedDomainObjectSet<T>.named*` for Gradle 8.6+ and older.
- output relative paths for the merged report files in the log.

### Added
- self-apply the plugin to itself immediately with included build.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ internal abstract class MergeDetektBaselinesTask : DefaultTask() {

val outputFile = outputFile.ioFile
bp.write(targetPath = outputFile.toPath(), baseline = sorted)
logger.l("Merged Detekt baseline files to ${outputFile.absolutePath}")
val fileRelative = outputFile.absoluteFile.relativeTo(project.projectDir)
logger.l("Merged Detekt baseline files to $fileRelative")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,17 @@ internal abstract class TestReportsMergeTask : DefaultTask() {
val now = System.currentTimeMillis()
val totalSuccesses = totalTests - totalFailures - totalSkipped
val status = getStatusFrom(totalFailures, totalSuccesses)
val summary = "Overall tests result: $status (" +
val fileRelative = outputFile.absoluteFile.relativeTo(project.projectDir)
val summary = "Overall tests result: $status" +
" in ${TimeCategory.minus(Date(now), Date(now - totalTimeMillis))}" +
"\n(" +
"$totalTests tests, " +
"$totalSuccesses successes, " +
"$totalFailures failures, " +
"$totalSkipped skipped, " +
"${kmpTargets.size} KMP targets" +
") " +
"in ${TimeCategory.minus(Date(now), Date(now - totalTimeMillis))}" +
"\n" +
"Merged XML tests report to $outputFile"
")\n" +
"Merged XML tests report to $fileRelative"

logger.lifecycle(formatSummary(summary, fails))

Expand Down

0 comments on commit 21eb22d

Please sign in to comment.