I am currently setting up a new project using Dete...
# detekt
t
I am currently setting up a new project using Detekt
2.0.0-alpha.5
. Its a multi module multi platform project and I'm having trouble setting up report Merging. When I just put this code from the Detekt docs in the top level build.gradle.kts, and i run the reportMerging task, nothing happens. When i put this code in the convention plugin i use to apply detekt, reportMerging is executed but twice, which results in the report only containing a part of the findings. My Project setup is similar to the Now In Android App , where i currently have set up a
core
module containing three submodules
ui
,
data
, etc. and a
sharedUi
module which comes from Terrakok's CMP Wizard
It seems, that the double merging was caused by me not setting detekt basePath properly. However, i still only get the findings from only the sharedUI gradle module in the merged output file
c
I think the
reportMerge
logic would have to go in the root build.gradle.kts file while everything else in your convention plugin would remain where it is. Don't know if you need the finalizedBy logic, but it would also go in the root Gradle script. My guess is the ReportMergeTask is running for each project and since they're all writing to the same output file, last writer overwrites the other modules.