Skip to content

Releases: google/ksp

1.5.20-1.0.0-beta04

28 Jun 17:28
Compare
Choose a tag to compare

Fixes #487 KspTask.configure()'s @internal annotation is incompatible with Gradle 7.x.

1.5.20-1.0.0-beta03

24 Jun 16:22
Compare
Choose a tag to compare

Highlights

Updated to Kotlin 1.5.20
Experimental support of KMP (JVM, JS and Metadata)
KSNode.validate now doesn’t validate local declarations by default.

Bug fixes

#448 Not compatible with gradle configuration cache
#464 Generated proguard files in resources are not seen by AGP

1.5.10-1.0.0-beta02

09 Jun 21:23
Compare
Choose a tag to compare

Highlights

  • fixed an issue with asMemberOf when calling with a Java property accessor.
  • Added back fun interface for SymbolProcessorProvider.

1.5.10-1.0.0-beta01

26 May 23:36
Compare
Choose a tag to compare

Highlights

  • Updated to Kotlin 1.5.10
  • Introduced KSPropertyDeclaration.hasBackingField

API and Behavior Changes

  • Parameters of SymbolProcessorProvider.create() are refactored into SymbolProcessorEnvironment
  • Name of default package (i.e., w.o. package declaration) is changed to an empty string.
  • The deprecated SymbolProcessor.init() is removed.

1.5.0-1.0.0-alpha10

12 May 22:57
Compare
Choose a tag to compare

Highlights

  • switch to Sequence for a bunch of APIs
    • Some of the API return type has been changed from Collection or List to Sequence, which will allow performance improvement if you use case involved early termination.
    • Note that because Sequence is lazily evaluated, it requires a terminal operation to make actual compute happen. Please check you uses around the impacted APIs to see if they have a terminal operation. Most common use case is Collection.map{} which will iterate through the collection by itself, but is non-terminal for Sequence and should be companied with toList() or replaced with forEach
    • For the whole list of APIs impacted by this change, please refer to this commit.
  • Added KSDeclaration.getDocString() API for getting the document comment. Note that it returns as is and you might need to process the string.
  • Origin for KS symbols from binaries is now split into KOTLIN_LIB and JAVA_LIB.
  • Added name mapping helper for mapping names from Kotlin to Java and Java to Kotlin.
  • asMemberOf() is now a member function of KSPropertyDeclaration and KSFunctionDeclaration, instead of Resolver
  • Add KSType.outerType and KSType.innerArguments
  • Introduce KSType.isFunctionType and KSType.isSuspendFunctionType

1.5.0-1.0.0-alpha09

29 Apr 17:42
Compare
Choose a tag to compare

Highlights

  • Upgraded to Kotlin 1.5.0!

Resolved Issues

#7 Feature request: Logging APIs
#112 Accessing properties, functions and typealiases by their fully qualified name
#323 getSealedSubclasses() doesn't work with incremental processing in Kotlin-1.5
#396 Synthetic classes for top level kotlin files
#403 Kotlin 1.5.0 support

Merged PRs

#400 Add missing space in docs
#402 Add support for getting owner class binary name for members
#404 Incremental processing: support getSealedSubclasses from multiple files
#405 Make SymbolProcessorProvider a fun interface
#407 Upgrade to Kotlin 1.5.0

1.4.32-1.0.0-alpha08

22 Apr 00:44
Compare
Choose a tag to compare

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

1.4.32-1.0.0-alpha07

07 Apr 22:08
Compare
Choose a tag to compare

Highlights

  • Updated Kotlin version to 1.4.32
  • Added Resolver.getDeclarationsFromPackage() API, this API is to retrieve declarations with a given package name from both classpath and sources. Note that this API can be expensive.
  • Bug fixes around generic type arguments and jvm_static detection.

1.4.31-1.0.0-alpha06

24 Mar 20:59
Compare
Choose a tag to compare

Highlights

  • Multiplatform is back working again for JVM platform.
  • Corresponding Kotlin version is bumped to 1.4.31. This release still works with 1.4.30. To mute the version mismatch warning when using with Kotlin-1.4.30, use -Pksp.version.check=false.
  • Supported Gradle 7.0-rc-1.

API / behavior changes

  • Use-site annotations are now attached to use-sites consistently. Previously, they are attached to where they were declared if the source is available, and the use-sites if the source isn't available.

Issues fixed

#131 cannot read annotatations in classes that are coming from dependencies
#317 Possible regression: Configuration with name 'ksp' not found in multiplatform
#325 KSType for inner types misses arguments from outer types
#355 annotation target for setter property does not work
#360 Resolving a same type multiple times as type argument cause the first resolution to override all following resolution
#364 Annotate properties for KspTask

1.4.30-1.0.0-alpha05

10 Mar 23:58
Compare
Choose a tag to compare

Highlights

  • synthetic property accessors now can be correctly created for abstract classes, align with compiler behavior.
  • Removed findAnnotationFromUseSiteTarget() function, consolidate its functionality into KSP internal logic.

Behavior change

  • KSP now handles annotation use site targets internally for property accessors (namely @get:Anno, @set:Anno).
    • property accessors will have corresponding targeted annotations from their receiver properties
    • annotations with @get: and @set: targets will not appear in property's annotation list.