Incremental compilation support

Skip to first unread message

Tomáš Procházka

Oct 2, 2018, 3:47:16 PM10/2/18
to adt-dev
I'm looking for any new information about incremental compilation support.

This info:
  • For projects that include Kotlin code: Incremental Java compilation is enabled by default, even if your project uses the data-binding or retro-lambda plugin.
  • For Java-only projects:
    • If the annotation processors you use all support incremental annotation processing, incremental Java compilation is enabled by default.
    • If however, one or more annotation processors do not support incremental builds, incremental Java compilation is not enabled. Instead, you can include the following flag in your file:
      When you include this flag, Gradle executes the annotation processors in a separate task and allows the Android plugin to enable incremental mode for the Java compilation task.

It is very confusing. It means that for the project using Kotlin it will work in any situation? But java only projects require the support of all annotation processors?
You are writing just about that it will be enabled, not compiling incrementally, but still confusing.

I'm using Kotlin and it warning me, that data binding annotation processor doesn't support it. So what exactly was changed since build plugin 3.2?
It was possible to use incremental compilation also with it, but data binding annotation processor prevented it.

I tried use android.enableSeparateAnnotationProcessing=true and it did nothing with build speed. I tried several times run my app with just one line change in one class and run again  (without incremental compilation) and it takes exactly the same time with build plugin 3.2 and 3.3-alpha11 with android.enableSeparateAnnotationProcessing=true enabled.

So probably last hope is to wait for incremental compilation support of data binding annotation processor. It is also in the plan for 3.3?
Reply all
Reply to author
0 new messages