Open dinhthaidaica opened 4 years ago
Could you please show your androidAnalyzer { .. }
block? Didn't see this happen before. Perhaps you are importing Jacoco yourself, that's causing double indexing?
you can see it by the image below
And please be notice that longclickshift.feature
is my cucumber
file.
I have a feeling you are trying to execute androidAnalyzer
on a test config.
Could you try running the following command: ./gradlew {module}:androidAnalyzer
, where {module}
= your target module name (probably app
)?
If that doesn't work, could you still share how you invoke the task? I'm looking into Cucumber atm.
@AndroideRob a have a similar problem:
Execution failed for task ':app:sonarqube'.
> File src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files
adding customExclusions = ['src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker']
was solved, but I didn't understand why it was necessary
@AndroideRob I tried with both solutions(adding customExclusions = ['src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker'] or run ./gradlew {module}:androidAnalyzer
) but got no luck.
Even though, when I added a list of json files for mocking data in testing then got an other same error:
tests/unitTest/resources/punchclockapproval/punchClockApprovalNonDefaultShiftType.json can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files
My updated config:
customExclusions = ['tests/instrumentationTest/**', 'tests/unitTest/**', 'tests/unitTest/resources/**', 'src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker', 'libs/**', '*.feature', '*.json', "tests/instrumentationTest/assets/scenarios/longclickshift.feature"]
I'm trying to integrate this plug in to my existing project but seems I still miss some things.
I got this message when execute Gradle command :
I even tried with
customExclusions
but seems doesn't help. Still get the same message. Here is my setup:customExclusions = ['tests/instrumentationTest/**', 'tests/unitTest/**','libs/**', '*.feature', "tests/instrumentationTest/assets/scenarios/longclickshift.feature"]
Did I do something wrong or miss somethings else?