Skip to content

4.0.0-beta1

Compare
Choose a tag to compare
@elihart elihart released this 23 May 17:35
· 95 commits to master since this release
b9744d2
  • Support for incremental annotation processing as an Aggregating processor (#972)
  • Removed Litho support
  • A new annotation processor argument logEpoxyTimings can be set to get a detailed breakdown of how long the processors took and where they spent their time (off by default)
  • Another new argument enableParallelEpoxyProcessing can be set to true to have the annotation processor process annotations and generate files in parallel (via coroutines).

You can enable these processor options in your build.gradle file like so:

project.android.buildTypes.all { buildType ->
  buildType.javaCompileOptions.annotationProcessorOptions.arguments =
      [
          logEpoxyTimings  : "true",
          enableParallelEpoxyProcessing     : "true"
      ]
}

Parallel processing can greatly speed up processing time (up to 8x), but given the nature of parallel processing it is still incubating.
Please report any issues or crashes that you notice.
(We are currently using parallel mode in our large project at Airbnb with no problems.)

Breaking

In order to enable incremental annotation processing a change had to be made in how the processor of
@AutoModel annotations work. If you use @AutoModel in an EpoxyController the annotated Model types
must be either declared in a different module from the EpoxyController, or in the same module in the same java package.

Also make sure you have kapt error types enabled.

However, generally @AutoModel is considered legacy and is not recommended. It is a relic of Java Epoxy usage
and instead the current best practice is to use Kotlin with the Kotlin model extension functions to build models.