Skip to content

Build is talking long time on jacoco[flavor]Debug task #8335

@ch-vadim-maximov

Description

@ch-vadim-maximov

Hello,
We updated to Android Studo 3.3 and Gradle:

  • com.android.tools.build:gradle:3.3.0
  • distributionUrl=https://services.gradle.org/distributions/gradle-4.10.1-all.zip

We have noticed that build is taking a lot longer now ~8min vs seconds

Upon inspection there is a new task jacocoDevelopDebug that is taking up to 8 min.
com.android.build.gradle.internal.tasks.JacocoTaskDelegate$JacocoWorkerAction - Is being executed forever and multiple times

We tried to skip this task using gradle.startParameter.excludedTaskNames += "jacocoDevelopDebug"
However after doing that, generated apk is missing something and app crashes with:

 java.lang.RuntimeException: Unable to instantiate application com.collectivehealth.member.CollectiveHealthDebugApplication: java.lang.ClassNotFoundException: Didn't find class "com.collectivehealth.member.CollectiveHealthDebugApplication" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.collectivehealth.member.develop-XgfxJLLuiVl694XMPS_tHQ==/base.apk"],
nativeLibraryDirectories=[/data/app/com.collectivehealth.member.develop-XgfxJLLuiVl694XMPS_tHQ==/lib/x86_64, /data/app/com.collectivehealth.member.develop-XgfxJLLuiVl694XMPS_tHQ==/base.apk!/lib/x86_64, /system/lib64]]

Questions:

  1. What is this task and why is it executed during debug builds?
  2. How can we speed up the build?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions