After the upgrade to the Gradle 3.0.1 version, Jacoco plugin generates redundant jacoco.exec file

I have the following modules:

  • app (
  • testlibrary (

After upgrade of Gradle to the version 3.0.1, Jacoco plugin generates redundant and not valid jacoco.exec file in the app ( module’s root folder after execution of tests. This file is generated when in testlibrary ( module I set testCoverageEnabled true. If I set in testlibrary testCoverageEnabled false, then jacoco.exec file is not generated.

Expected Behavior
jacoco.exec file shouldn’t be generated in the root folder of app module after execution of tests, regardless testCoverageEnabled flag set to true or false in the testlibrary module.

Current Behavior
After execution of tests, jacoco.exec file is created in the root folder of the app module if in the testlibrary module the testCoverageEnabled flag set to true.

I’m trying to upgrade to the Gradle 3.0.1 version from the Gradle 2.2.2 version. But after upgrade and execution of all tests, I noticed that a new redundant jacoco.exec file was generated inside of app’s root directory.

Steps to Reproduce (for bugs)
GitHub repo to showcase the issue:
Steps to reproduce:

  • Open project in Android Studio
  • Run testDebugUnitTest task of Test(root) module
  • Note the newly created jacoco.exec file in the root folder of app module

I hope somebody can help me to resolve this issue.

Also, I have found the same open bug here: