github square/kotlinpoet 2.3.0

5 hours ago

Thanks to @haruue, @hfhbd, @yz4230, @mina-jaff, @BoD, @RaoPrashanth for contributing to this release.

  • New: Kotlin 2.3.20.
  • New: KSP 2.3.6.
  • New: Support for defining type aliases inside other types. (#2167)
  • New: Add TypeName.annotated() convenience API for adding annotations to types. (#2281)
  • New: Add FileSpec.addImport(MemberName) to explicitly import a member. (#2198)
  • New: Add NameAllocator.contains to check if a given tag is already allocated. (#2160)
  • New: :interop:javapoet module has been discontinued and is not published starting with this release. (#2292)
  • New: In-development snapshots are now published to the Central Portal Snapshots repository at https://central.sonatype.com/repository/maven-snapshots/. (#2135)
  • Fix: Annotation array parameters with annotation elements now correctly handled. (#2142)
  • Fix: KType.asTypeName now correctly handles recursively bound generics (e.g. T : Comparable<T>). (#2162)
  • Fix: Don't convert multi-statement function to expression body. (#2163)
  • Fix: FunSpec.beginControlFlow now accepts nullable arguments for consistency with CodeBlock.beginControlFlow. (#2174)
  • Fix: Ignore illegal characters inside escaped identifiers. (#2204)
  • Fix: emitNullable correctly when deferring type in CodeWriter. (#2217)
  • Fix: Escape /* and */ when emitting Kdoc. (#2258)
  • Fix: Generate imports for extension members used via %M in KDocs. (#2266)

Don't miss a new kotlinpoet release

NewReleases is sending notifications on new releases.