Releases: google/ksp
1.4.20-dev-experimental-20210120
Major change:
- Incremental is now enabled by default, if you do not wish to use incremental in your project, please set
ksp.incremental=false
ingradle.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
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
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
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
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
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.
1.4.10-dev-experimental-20201106
Highlights
- KSP is now in a separate task from the main kotlinCompile task, which allows you to run ksp alone.
- Now you can generate class files to be included in kotlin compile.
- Now you can write test in KSP repo for multiple module use cases, good for testing dependency related issue. (Credit to @yigit !)
- As a prerequisites of KSP multiple round processing, we added a symbol validation API for validating types in a symbol's enclosed scope. See
KSNode.validate()
for more details.
Resolved Issues
#85 Stale files are not cleaned up between runs
#95 Support generated JVM bytecode
#133 tip of tree 20201029 gradle plugin is broken
Merged PRs
#128 add symbol validation API
#130 Move KSP to an independent Gradle task
#137 Support multi module tests
#138 Include generated classes.
#139 Refactoring for the new Kotlin Gradle plugin API
#143 Set destinationDir for KotlinCompileTaskData.
Commits
ae98b8c Set destinationDir for KotlinCompileTaskData.
a850711 Refactoring for the new Kotlin Gradle plugin API
c844f2a Support multi module tests (#137)
3bcf10c add symbol validation API
671a2b1 Include generated classes.
3287061 Move KSP to an independent Gradle task
1acad60 update README.md to ksp-1.4.10-dev-experimental-20201023.
1.4.10-dev-experimental-20201023
Highlights
- Implemented
asMemberOf
. Thanks to @yigit !
Because generic functions generally cannot be represented in Kotlin type system,KSFunction
is introduced to hold the information (type parameters). Note thatKSFunction
is not aKSType
and they cannot interact, e.g.,equals
andisAssignableFrom
, directly.
Resolved Issues
#49 Add helper for equivlent of Types.asMemeberOf
#123 baseMethod.overrides(childMethod) returns true
Merged PRs
#110 Implement Resolver.asMemberOf for Properties and Functions
#124 Check for type hierarchy while checking overrides
1.4.10-dev-experimental-20201009
Highlights
- Added
KSType.isMarkedNullable
for checking if a type has explicit nullable mark (i.e.?
) - Added createKSTypeReferenceFromKSType API to Resolver for generating pseudo KSTypeReference from a KSType
- Breaking Change Refactored override checking function. Override checking is now a member function of resolver which will take in 2 declarations.
- Breaking Change Renamed KSVariableParameter to KSValueParameter to align with grammar
Resolved Issues
#82 Incorrect nullability reported for type variables
#83 Lookup of constructor JVM signature throws exception if not found
#93 add support for checking overrides for property getters/setters from Java code
#94 crash in overrides check for java classes that implement kotlin interfaces
#96 cannot read annotation values from java code
#98 Synthetic constructors are not created for Java sources
#99 KSP returns the same constructor twice for java sources
#101 KSTypeReference.resolve throws IllegalStateException for wildcard types
#105 KSP is enabled in KAPT tasks
#107 isError for a non-existing type returns false
commits
728505e fix variance and classifier reference for Java unbounded type argument <?>
c34bf72 support array initializer expression as annotation value argument for Java symbols
37e2d07 Handle unresolved types for types from Java symbols.
fddfece Enhance document on KSPropertyAccessor on how to get full annotations for an accessor
54687cf fix override checking for property accessors from Java
a7085af move overrides() to Resolver
172f7cc Disable KSP in KAPT tasks
3077421 Add Github Workflow file to run tests in pre/post-submit (#116)
167d88a fix jvm signature for synthetic constructor
6ee0964 Fix Java class constructor calculation. * Add support for default constructor of Java class. * Fixed getDeclaredFunctions which will return duplicate elements for all constructors.
6c45a3b Update contribution guide to not use TestGenerator (#92)
e1c5ca1 expose KSType.isMarkedNullable API
37a1e8e add createKSTypeReferenceFromKSType API to Resolver
a43bfc0 rename KSVariableParameter to KSValueParameter to align with grammar
d8de8b2 Update class diagram and docs
4f4c624 Add file path for KSFile. Fix fileName documentation
f5b6219 Remove a redundant example.
c3b2860 Fix examples in README