Skip to content

Releases: google/ksp

1.4.30-1.0.0-alpha03

25 Feb 00:07
Compare
Choose a tag to compare

Highlights

  • Added KSClassDeclaration. getSealedSubclasses() API (credit to @ZacSweers)
  • KSP now handles exceptions instead of throwing them. For KSP internal exceptions, KSP will return an InternalError to compiler, for processors thrown exceptions, KSP will return CompilationError to compiler. Please files bugs for InternalErrors

API and behavior changes

  • SymbolProcessor.finish() now has a default implementation of no op.
  • If KSP has been executing for more than 100 rounds, a warning will be printed to indicate potential infinite loop caused by inappropriate multiple round processors.

1.4.30-1.0.0-alpha02

09 Feb 23:46
Compare
Choose a tag to compare

Highlights

  • Updated to Kotlin 1.4.30
  • Supported multiple round processing
  • Better support of incremental processing
  • Better support of Android build variants

API and behavior changes
Multiple round processing is introduced in the is release. The most notable changes are

  • SymbolProcessor.process() will be called multiple times until there is no newly generated file.
  • SymbolProcessor.process() now returns a List<KSAnnotated>, which will be processed again in the next round.

The detailed behavior of multiple round processing can be found here.

1.4.20-dev-experimental-20210203

04 Feb 01:11
Compare
Choose a tag to compare

Highlights

  • This is the last 1.4.20 release. KSP will hopefully move to 1.4.30 in the next release.
  • KSP now has a better support of Android build variants! (thanks to @yigit !)

API Runtime Behavior Changes

  • Constructor names are unified to <init>. Previously, in Kotlin source they are the same as class name.
  • KSClassDeclaration.declarations and KSClassDeclaration.getAllFunctions() include constructors now.

Issues Resolved
#113 Add a way to check if a KSFunctionDeclaration is a constructor
#114 Constructors returnType is null
#198 KSP resolves classes that are not available to the app
#202 [Gradle Plugin] Support different configurations
#207 Compatibility with Anvil
#265 wrapping method psi to JavaMethodImpl causes exception
#273 explicit constructor is missing in compiled java dependencies
#279 ksp returns empty constructor for data classes

1.4.20-dev-experimental-20210120

20 Jan 23:58
Compare
Choose a tag to compare

Major change:

  • Incremental is now enabled by default, if you do not wish to use incremental in your project, please set ksp.incremental=false in gradle.properties

Resolved Issues:
KSPLogger.error does not fail compilation #122
property accessors without body fails resoltuion #230
KSProperty.findOverridee fails for non overridable local variables #228
Merge Gradle tests #225

Merged PRs:
Enable incremental processing by default #257
Enable integration tests in CI #256
integration tests #253
Expose logger statistics #165
fix KSPropertyDeclarationParameterImpl for override checking when there is no overridden symbols #249

1.4.20-dev-experimental-20210111

12 Jan 02:24
Compare
Choose a tag to compare

This is release for bug fixes and contains no major update.

Issues resolved
#234 enum constants in java sources are reported as properties
#244 JavaCompile task fails with no sources

PRs merged
#238 Model Java enum entries as KSClassDeclaration
#241 Fine tuning contents of symbol-processing.jar
#242 Mute an "idea home not valid" error in tests
#245 Do not register resources as Java sources
#243 Fix NullPointerException on adding plugin to KMP project
#246 Remove resources from Kotlin sources

1.4.20-dev-experimental-20210107

08 Jan 00:41
Compare
Choose a tag to compare

Hightlights

Breaking Change Starting from this release, we added gradle plugin marker and changed plugin id from symbol-processing to com.google.devtools.ksp. Now you may remove the resolutionStrategy for KSP in setting.gradle.kts since it is no longer needed. See playground in attachment for full detail.

We also planned to enable incremental processing in next release. Here is a doc describing how to use it and also a few examples. Please give it a try!

Issues fixed:

released POM files do not list dependencies #187
[Gradle Plugin] Publish plugin marker #203
Incremental logging does not create a file first #210

PRs merged:

multi-module tests: make sure javaOut exists before passing to compiler #235
Setup depenedencies in compiler plugin's POM #233
Report INNER modifier for class descriptors #232
Rebuild if processing options changed #229
Don't calculate incremental info when incremental processing is disabled #227
Make kspTask depends on processors #222
Refine incremental logs #221
document for incremental processing #220
Rename dependOnNewChanges to aggregating #219
Use property descriptor impl for java properties #217
Add generated resource dir to proper sources and outputs #215
Gradle plugin publishing setup #206

1.4.30-M2-104-multiple-round-preview-20201223

This release introduces multiple round behavior, for in depth introduction, as well as major breaking changes on this release, please refer to this wiki page.

Note that due to incompatible changes in Kotlin compiler, this release is worked on a separate branch, and does not pick incremental changes we recently introduced in master branch, therefore no incremental behavior right now. We will eventually merge multiple round branch into master so both incremental and multiple round will be available. The merge should happen soon after Kotlin 1.4.30 release.

See attachment for a playground demo for multiple round processing processors.

1.4.20-dev-experimental-20201204

05 Dec 00:01
Compare
Choose a tag to compare

With this release, the kotlin version which KSP depends on has been upgraded to 1.4.20.

Resolved Issues
#181 DeserializedTypeAliasDescriptor does not support ArrayList type‘s property
#173 Unexpected descriptor type exception for @Throws annotation
#170 getJvmName throws exception for static java methods
#166 calling asMemberOf with static java field throws java.util.NoSuchElementException

Merged PRs
#169 Update kotlin to 1.4.20
#171 Support finding descriptors for java statics
#176 FIx findOverridee for properties, fixes #174
#182 add KSTypeAliasDescriptorImpl

1.4.10-dev-experimental-20201120

20 Nov 22:08
Compare
Choose a tag to compare

We've introduced @KspExperimental to prevent accidental usage of implementation dependent APIs. For now, the only protected APIs are Resolver.mapToJvmSignature and Resolver.getJvmName. See https://kotlinlang.org/docs/reference/opt-in-requirements.html for how to use those experimental features.

Resolved Issues
#119 generated code is not visible from Java source
#129 provide an API to get jvm names
#150 findOverridee might throw exception
#157 kspTestKotlin output seems to clobber kspKotlin output

Merged PRs
#141 Add APIs to get JVM names of functions and property accessors
#146 Fix various java annotation parsing issues
#151 Fix find overridee, add tests
#156 allow setting env variables in workflow
#160 Optimize exception messages to contain helpful debug information
#161 add annotation validation to validate API
#162 Reorganize output directories

1.4.10-dev-experimental-20201110

10 Nov 18:47
Compare
Choose a tag to compare

This is a minor release that fixes a usability bug, where ksp dependencies are lost.
#148 20201106 release breaks gradle build in certain condition

Merged PRs
#149 Set dependencies for KSP task.
#145 remove nullable marker on KSValueParameter.type, add logic to retriev…
#144 support multiple depth search for annotated symbols

Note that #144 introduced an ABI change and processors who call getSymbolsWithAnnotation need to be rebuilt.