gradle-doctor icon indicating copy to clipboard operation
gradle-doctor copied to clipboard

Add check for deps that don't support incremental kapt

Open ColtonIdle opened this issue 4 years ago • 6 comments

Not sure if it'd be possible, but would be cool to add.

ColtonIdle avatar Mar 29 '20 05:03 ColtonIdle

Hey, thanks for the request @ColtonIdle! By default, the gradle doctor enables kapt processor timing which will print out whether annotation processors support incremental annotation processing. Here's a sample line that you should see in your console output when this happens:

w: [kapt] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

runningcode avatar Mar 29 '20 12:03 runningcode

Cool. I just looked in your readme and saw nothing about it, so I just added my thought.

noob question. How do I run this once its setup?

./gradlew doctor or does it just run now as a gradle task as part of some other task (not sure if that's the correct way of saying. I'm a gradle noob)

ColtonIdle avatar Mar 29 '20 18:03 ColtonIdle

Good question. The plugin is quite opinionated! It will give you suggestions as you run tasks in your project. The only feature that requires you to turn on explicitly is the benchmarking remote build cache feature. You can do this with the flag -PbenchmarkRemoteCache. Check the README for more info.

runningcode avatar Mar 29 '20 19:03 runningcode

Got it.

So the advice is basically, install gradle-doctor, then start running, building, developing your app and keep your eye out for any warnings?

ColtonIdle avatar Mar 29 '20 19:03 ColtonIdle

You got it! Any feedback is welcome!

runningcode avatar Mar 29 '20 19:03 runningcode

I think it would be cool to just run something like ./gradlew doctor and get an output of everything so I can try to address it in one fell swoop. I'm assuming this likely isn't possible or else you would have done this already. That's what I thought the tool was though. 😄

ColtonIdle avatar Mar 29 '20 19:03 ColtonIdle