https://kotlinlang.org logo
#dagger
Title
# dagger
t

tamas.barta

07/03/2018, 7:54 AM
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

07/05/2018, 7:25 AM
Have you tried the gradle scan and profile options to see more details
t

tamas.barta

07/06/2018, 2:13 PM
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.
a

adams2

07/06/2018, 9:01 PM
we have removed kapt and annotationProcessor from our com.android.application module, relegating its use to library projects only
t

tamas.barta

07/16/2018, 7:12 AM
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

07/31/2018, 5:45 AM
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
s

Sangeet

08/08/2018, 6:37 PM
Is there any way to find which kapt is taking time in gradle task ?
t

tamas.barta

08/13/2018, 8:12 PM
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.
s

Sangeet

08/14/2018, 4:14 AM
@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

08/15/2018, 9:30 PM
@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.
4 Views