github google/ksp 1.4.32-1.0.0-alpha08

latest releases: 2.1.0-RC2-1.0.28, 2.0.21-1.0.28, 2.1.0-RC-1.0.27...
3 years ago

Hightlights

New Entry Point

A new interface, SymbolProcessorProvider is introduced to replace SymbolProcessor.init().
Previously, processors implements SymbolProcessor and register themselves

  1. in META-INF/services/com.google.devtools.ksp.processing.SymbolProcessor, and
  2. need to save the environment / utils passed to SymbolProcessor.init().

Now, processors should implement and register the new provider interface SymbolProcessorProvider,

  1. in META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider, and
  2. create an instance of the old SymbolProcessor, where the utils / environment can be passed in the constructor.

So that processors can get rid of lateinit vars for those environments and utils.

The old service SymbolProcessor is still loaded from its service file. However, if the processor register both SymbolProcessor and SymbolProcessorProvider, and the provider returns exactly the processor registered, then the processor's init() will be called twice.

We recommend migrating to the new interface and are planning the deprecate the old service and SymbolProcessor.init().

Thanks @edrd-f for this new interface!

New API

#387 Add getFunctionDeclarationByName, getPropertyDeclarationByName

Issues Fixed

#385 Generated sources not considered when calculating dirty set
#388 Error running on incremental build
IOException in incremental build
Resolution failure from some deferred element

Don't miss a new ksp release

NewReleases is sending notifications on new releases.