Thread
#dagger
    t

    tamas.barta

    4 years ago
    Hi! Our team is having issues with
    kapt
    tasks running for long minutes. We only use
    kapt
    for Dagger. Is there any known issues, that I couldn't find with my hours of googling on the topic? We use parallel task execution for many modules (of an Android app), and the result is still 10 minutes, which is made up mostly from dexing and
    kapt
    . We tried upgrading every library including Dagger, and the issue persists. Do you have any suggestions?
    r

    rattleshirt

    4 years ago
    Have you tried the gradle scan and profile options to see more details
    t

    tamas.barta

    4 years ago
    Yes, I tried. Can you help me what details to look at? I used scan to see the timeline, and that's where I know the above info from. However, I couldn't use the other details to find any further clues.
    adams2

    adams2

    4 years ago
    we have removed kapt and annotationProcessor from our com.android.application module, relegating its use to library projects only
    t

    tamas.barta

    4 years ago
    Thanks for your advice. We tried it, completely removed kapt from our
    app
    module (the
    com.android.application
    one), but it didn't improve build time. 😞
    j

    James

    4 years ago
    did you ever figure this out?
    does your app have a lot of circular dependencies between modules?
    if you have a lot of interconnecting dependencies then it has to rebuild more of your code base everytime
    Sangeet

    Sangeet

    4 years ago
    Is there any way to find which kapt is taking time in gradle task ?
    t

    tamas.barta

    4 years ago
    We have zero circular dependencies. Though we have a
    common
    module, that is required by most modules. That shouldn't be a problem, since after compiling that thin layer, all other modules should be able to move on compiling in parallel. @Sangeet, if you run your build with the
    --profile
    switch, you'll get a report telling how much time each task took to run.
    Sangeet

    Sangeet

    4 years ago
    @tamas.barta It will only tell about whole kapt task. I want specific time taken by dagger annotation processor and databinding annotation processor. Is there any way for that ?
    t

    tamas.barta

    4 years ago
    @Sangeet Sorry, I misunderstood your question. That would be nice to know. If you find a way, please reach back here, I'm also curious.