Hightlights
New Entry Point
A new interface, SymbolProcessorProvider
is introduced to replace SymbolProcessor.init()
.
Previously, processors implements SymbolProcessor
and register themselves
- in
META-INF/services/com.google.devtools.ksp.processing.SymbolProcessor
, and - need to save the environment / utils passed to
SymbolProcessor.init()
.
Now, processors should implement and register the new provider interface SymbolProcessorProvider
,
- in
META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider
, and - 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 var
s 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