square/kotlinpoet (com.squareup:kotlinpoet)
### [`v1.18.1`](https://togithub.com/square/kotlinpoet/releases/tag/1.18.1)
[Compare Source](https://togithub.com/square/kotlinpoet/compare/1.18.0...1.18.1)
Thanks to [@mitasov-ra](https://togithub.com/mitasov-ra) for contributing to this release.
- Fix: Workaround for [KT-18706](https://youtrack.jetbrains.com/issue/KT-18706): KotlinPoet now generates import aliases without backticks ([#1920](https://togithub.com/square/kotlinpoet/issues/1920)).
```kotlin
// before, doesn't compile due to KT-18706
import com.example.one.`$Foo` as `One$Foo`
import com.example.two.`$Foo` as `Two$Foo`
// now, compiles
import com.example.one.`$Foo` as One__Foo
import com.example.two.`$Foo` as Two__Foo
```
### [`v1.18.0`](https://togithub.com/square/kotlinpoet/releases/tag/1.18.0)
[Compare Source](https://togithub.com/square/kotlinpoet/compare/1.17.0...1.18.0)
Thanks to [@DanielGronau](https://togithub.com/DanielGronau) for contributing to this release.
- New: Kotlin 2.0.0.
- New: KSP 2.0.0-1.0.22.
- New: Promote `kotlinpoet-metadata` out of preview to stable.
- New: Migrate `kotlinpoet-metadata` to stable `org.jetbrains.kotlin:kotlin-metadata-jvm` artifact for Metadata parsing.
- New: Make enum entry references in `KSAnnotation.toAnnotationSpec()` and `KSClassDeclaration.toClassName()` more robust.
- Fix: Don't expand typealiases of function types to `LambdaTypeName`s in `KSTypeReference.toTypeName()`.
- Fix: Avoid rounding small double and float values in `%L` translation ([#1927](https://togithub.com/square/kotlinpoet/issues/1927)).
- Fix: Fix typealias type argument resolution in KSP2 ([#1929](https://togithub.com/square/kotlinpoet/issues/1929)).
### [`v1.17.0`](https://togithub.com/square/kotlinpoet/releases/tag/1.17.0)
[Compare Source](https://togithub.com/square/kotlinpoet/compare/1.16.0...1.17.0)
Thanks to [@jisungbin](https://togithub.com/jisungbin), [@hfhbd](https://togithub.com/hfhbd), [@evant](https://togithub.com/evant), [@sgjesse](https://togithub.com/sgjesse), [@sebek64](https://togithub.com/sebek64) for contributing to this release.
- Change: kotlinx-metadata 0.9.0. Note that the `KotlinClassMetadata.read` is deprecated in 0.9.0 and replaced with `readStrict` ([#1830](https://togithub.com/square/kotlinpoet/issues/1830)).
- Note: we now also provide `lenient` parameters to map to the underlying `readStrict()` and `readLenient()` calls ([#1766](https://togithub.com/square/kotlinpoet/issues/1766)).
- We have also removed various `Class`/`TypeElement`/`Metadata`-to-`KmClass` APIs from the public API, as these are trivial to write now with kotlinx-metadata's newer APIs and allows us to focus the API surface area of this artifact better ([#1891](https://togithub.com/square/kotlinpoet/issues/1891)).
- New: Supertype list wraps to one-per-line if the primary constructor spans multiple lines ([#1866](https://togithub.com/square/kotlinpoet/issues/1866)).
- New: Extract `MemberSpecHolder` interface for constructs that can hold `PropertySpec`s and `FunSpec`s and their builders ([#1877](https://togithub.com/square/kotlinpoet/issues/1877)).
- New: `joinToCode` variant which operates on any type, but requires a transform lambda to convert each element into a `CodeBlock` ([#1874](https://togithub.com/square/kotlinpoet/issues/1874)).
- New: Support annotation type arguments in `KSAnnotation.toAnnotationSpec()` ([#1889](https://togithub.com/square/kotlinpoet/issues/1889)).
- Fix: Prevent name clashes between a function in class and a function call in current scope ([#1850](https://togithub.com/square/kotlinpoet/issues/1850)).
- Fix: Fix extension function imports ([#1814](https://togithub.com/square/kotlinpoet/issues/1814)).
- Fix: Omit implicit modifiers on `FileSpec.scriptBuilder` ([#1813](https://togithub.com/square/kotlinpoet/issues/1813)).
- Fix: Fix trailing newline in `PropertySpec` ([#1827](https://togithub.com/square/kotlinpoet/issues/1827)).
- Fix: `KSAnnotation.toAnnotationSpec` writes varargs in place instead of making them an array to work around a Kotlin issue with OptIn annotations ([#1833](https://togithub.com/square/kotlinpoet/issues/1833)).
- Fix: `MemberName`s without a package are now correctly imported ([#1841](https://togithub.com/square/kotlinpoet/issues/1841))
- Fix: Throw if primary constructor delegates to other constructors ([#1859](https://togithub.com/square/kotlinpoet/issues/1859)).
- Fix: Aliased imports with nested class ([#1876](https://togithub.com/square/kotlinpoet/issues/1876)).
- Fix: Check for error types in `KSType.toClassName()` ([#1890](https://togithub.com/square/kotlinpoet/issues/1890)).
- Fix: Support generating a single import for overloaded `MemberName`s ([#1909](https://togithub.com/square/kotlinpoet/issues/1909)).
### [`v1.16.0`](https://togithub.com/square/kotlinpoet/releases/tag/1.16.0)
[Compare Source](https://togithub.com/square/kotlinpoet/compare/1.15.3...1.16.0)
Thanks to [@drawers](https://togithub.com/drawers), [@rickclephas](https://togithub.com/rickclephas) for contributing to this release.
- New: Kotlin 1.9.22.
- New: KSP 1.9.22-1.0.16.
- New: Add `NameAllocator` API to control keyword pre-allocation ([#1803](https://togithub.com/square/kotlinpoet/issues/1803)).
- Fix: Fix issue with missing suspend modifier in `KSTypeReference.toTypeName` ([#1793](https://togithub.com/square/kotlinpoet/issues/1793)).
- Fix: Honour same-package import aliases ([#1794](https://togithub.com/square/kotlinpoet/issues/1794)).
- Fix: Always include parameter docs in the type header ([#1800](https://togithub.com/square/kotlinpoet/issues/1800)).
### [`v1.15.3`](https://togithub.com/square/kotlinpoet/releases/tag/1.15.3)
[Compare Source](https://togithub.com/square/kotlinpoet/compare/1.15.2...1.15.3)
Thanks to [@gabrielittner](https://togithub.com/gabrielittner) for contributing to this release.
- Fix: Fix nullability of lambdas in `KSTypeReference.toTypeName` ([#1756](https://togithub.com/square/kotlinpoet/issues/1756)).
Configuration
📅 Schedule: Branch creation - "every 3 months on the first day of the month" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
1.15.2
->1.18.1
Release Notes
square/kotlinpoet (com.squareup:kotlinpoet)
### [`v1.18.1`](https://togithub.com/square/kotlinpoet/releases/tag/1.18.1) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.18.0...1.18.1) Thanks to [@mitasov-ra](https://togithub.com/mitasov-ra) for contributing to this release. - Fix: Workaround for [KT-18706](https://youtrack.jetbrains.com/issue/KT-18706): KotlinPoet now generates import aliases without backticks ([#1920](https://togithub.com/square/kotlinpoet/issues/1920)). ```kotlin // before, doesn't compile due to KT-18706 import com.example.one.`$Foo` as `One$Foo` import com.example.two.`$Foo` as `Two$Foo` // now, compiles import com.example.one.`$Foo` as One__Foo import com.example.two.`$Foo` as Two__Foo ``` ### [`v1.18.0`](https://togithub.com/square/kotlinpoet/releases/tag/1.18.0) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.17.0...1.18.0) Thanks to [@DanielGronau](https://togithub.com/DanielGronau) for contributing to this release. - New: Kotlin 2.0.0. - New: KSP 2.0.0-1.0.22. - New: Promote `kotlinpoet-metadata` out of preview to stable. - New: Migrate `kotlinpoet-metadata` to stable `org.jetbrains.kotlin:kotlin-metadata-jvm` artifact for Metadata parsing. - New: Make enum entry references in `KSAnnotation.toAnnotationSpec()` and `KSClassDeclaration.toClassName()` more robust. - Fix: Don't expand typealiases of function types to `LambdaTypeName`s in `KSTypeReference.toTypeName()`. - Fix: Avoid rounding small double and float values in `%L` translation ([#1927](https://togithub.com/square/kotlinpoet/issues/1927)). - Fix: Fix typealias type argument resolution in KSP2 ([#1929](https://togithub.com/square/kotlinpoet/issues/1929)). ### [`v1.17.0`](https://togithub.com/square/kotlinpoet/releases/tag/1.17.0) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.16.0...1.17.0) Thanks to [@jisungbin](https://togithub.com/jisungbin), [@hfhbd](https://togithub.com/hfhbd), [@evant](https://togithub.com/evant), [@sgjesse](https://togithub.com/sgjesse), [@sebek64](https://togithub.com/sebek64) for contributing to this release. - Change: kotlinx-metadata 0.9.0. Note that the `KotlinClassMetadata.read` is deprecated in 0.9.0 and replaced with `readStrict` ([#1830](https://togithub.com/square/kotlinpoet/issues/1830)). - Note: we now also provide `lenient` parameters to map to the underlying `readStrict()` and `readLenient()` calls ([#1766](https://togithub.com/square/kotlinpoet/issues/1766)). - We have also removed various `Class`/`TypeElement`/`Metadata`-to-`KmClass` APIs from the public API, as these are trivial to write now with kotlinx-metadata's newer APIs and allows us to focus the API surface area of this artifact better ([#1891](https://togithub.com/square/kotlinpoet/issues/1891)). - New: Supertype list wraps to one-per-line if the primary constructor spans multiple lines ([#1866](https://togithub.com/square/kotlinpoet/issues/1866)). - New: Extract `MemberSpecHolder` interface for constructs that can hold `PropertySpec`s and `FunSpec`s and their builders ([#1877](https://togithub.com/square/kotlinpoet/issues/1877)). - New: `joinToCode` variant which operates on any type, but requires a transform lambda to convert each element into a `CodeBlock` ([#1874](https://togithub.com/square/kotlinpoet/issues/1874)). - New: Support annotation type arguments in `KSAnnotation.toAnnotationSpec()` ([#1889](https://togithub.com/square/kotlinpoet/issues/1889)). - Fix: Prevent name clashes between a function in class and a function call in current scope ([#1850](https://togithub.com/square/kotlinpoet/issues/1850)). - Fix: Fix extension function imports ([#1814](https://togithub.com/square/kotlinpoet/issues/1814)). - Fix: Omit implicit modifiers on `FileSpec.scriptBuilder` ([#1813](https://togithub.com/square/kotlinpoet/issues/1813)). - Fix: Fix trailing newline in `PropertySpec` ([#1827](https://togithub.com/square/kotlinpoet/issues/1827)). - Fix: `KSAnnotation.toAnnotationSpec` writes varargs in place instead of making them an array to work around a Kotlin issue with OptIn annotations ([#1833](https://togithub.com/square/kotlinpoet/issues/1833)). - Fix: `MemberName`s without a package are now correctly imported ([#1841](https://togithub.com/square/kotlinpoet/issues/1841)) - Fix: Throw if primary constructor delegates to other constructors ([#1859](https://togithub.com/square/kotlinpoet/issues/1859)). - Fix: Aliased imports with nested class ([#1876](https://togithub.com/square/kotlinpoet/issues/1876)). - Fix: Check for error types in `KSType.toClassName()` ([#1890](https://togithub.com/square/kotlinpoet/issues/1890)). - Fix: Support generating a single import for overloaded `MemberName`s ([#1909](https://togithub.com/square/kotlinpoet/issues/1909)). ### [`v1.16.0`](https://togithub.com/square/kotlinpoet/releases/tag/1.16.0) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.15.3...1.16.0) Thanks to [@drawers](https://togithub.com/drawers), [@rickclephas](https://togithub.com/rickclephas) for contributing to this release. - New: Kotlin 1.9.22. - New: KSP 1.9.22-1.0.16. - New: Add `NameAllocator` API to control keyword pre-allocation ([#1803](https://togithub.com/square/kotlinpoet/issues/1803)). - Fix: Fix issue with missing suspend modifier in `KSTypeReference.toTypeName` ([#1793](https://togithub.com/square/kotlinpoet/issues/1793)). - Fix: Honour same-package import aliases ([#1794](https://togithub.com/square/kotlinpoet/issues/1794)). - Fix: Always include parameter docs in the type header ([#1800](https://togithub.com/square/kotlinpoet/issues/1800)). ### [`v1.15.3`](https://togithub.com/square/kotlinpoet/releases/tag/1.15.3) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.15.2...1.15.3) Thanks to [@gabrielittner](https://togithub.com/gabrielittner) for contributing to this release. - Fix: Fix nullability of lambdas in `KSTypeReference.toTypeName` ([#1756](https://togithub.com/square/kotlinpoet/issues/1756)).Configuration
📅 Schedule: Branch creation - "every 3 months on the first day of the month" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.