can't be indexed twice - testSourceDirectory and sourceDirectory are same

后端 未结 4 896
执笔经年
执笔经年 2021-01-03 21:05

I have created performance test as a maven submodule to my main module. All the test classes are written under src/main/java and not src/test

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-03 21:43

    I was seeing this can't be indexed twice error when running sonarqube Gradle task on an Android project. The issue related to files stored in app/src/debug/assets.

    I tried setting sonar.sources and sonar.tests properties to use disjointed sets but I wasn’t able to resolve the error.

    To fix the error I changed:

    property "sonar.coverage.exclusions", "**/assets/**, ..."
    

    to:

    property "sonar.exclusions", "**/assets/**, ..."
    

    in order to ignore the /assets/ directory completely.

提交回复
热议问题