ZacSweers / MoshiX

Extensions for Moshi including IR plugins, moshi-sealed, and more.
Apache License 2.0
514 stars 37 forks source link

Update kotlinpoet to v1.14.2 #462

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.squareup:kotlinpoet-ksp 1.12.0 -> 1.14.2 age adoption passing confidence
com.squareup:kotlinpoet-metadata 1.12.0 -> 1.14.2 age adoption passing confidence
com.squareup:kotlinpoet 1.12.0 -> 1.14.2 age adoption passing confidence

Release Notes

square/kotlinpoet (com.squareup:kotlinpoet-ksp) ### [`v1.14.2`](https://togithub.com/square/kotlinpoet/releases/tag/1.14.2) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.14.1...1.14.2) - Fix: Fix one more missing API in binary compatibility override in `Annotatable.Builder` ([#​1581](https://togithub.com/square/kotlinpoet/issues/1581)). ### [`v1.14.1`](https://togithub.com/square/kotlinpoet/releases/tag/1.14.1) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.14.0...1.14.1) - Fix: Restore ABI stability for annotatable and documentable builders ([#​1580](https://togithub.com/square/kotlinpoet/issues/1580)). ### [`v1.14.0`](https://togithub.com/square/kotlinpoet/releases/tag/1.14.0) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.13.2...1.14.0) Thanks to [@​Omico](https://togithub.com/Omico), [@​drawers](https://togithub.com/drawers), [@​RBusarow](https://togithub.com/RBusarow) for contributing to this release. - New: Kotlin 1.8.21. - New: KSP 1.8.21-1.0.11. - New: Enable default methods in Java bytecode ([#​1561](https://togithub.com/square/kotlinpoet/issues/1561)). - New: Group Kotlin and Renovate updates together in Renovate ([#​1562](https://togithub.com/square/kotlinpoet/issues/1562)). - New: Extract trait interface for annotatable constructs and their builders ([#​1564](https://togithub.com/square/kotlinpoet/issues/1564)). - New: Extract trait interface for documentable constructs and their builders ([#​1571](https://togithub.com/square/kotlinpoet/issues/1571)). - New: Document the usage of `STAR` ([#​1572](https://togithub.com/square/kotlinpoet/issues/1572)). - New: Add builder for `FunSpec` which accepts a `MemberName` ([#​1574](https://togithub.com/square/kotlinpoet/issues/1574)). - Fix: Omit public modifier on override function or constructor parameters ([#​1550](https://togithub.com/square/kotlinpoet/issues/1550)). - Fix: Correct handling of members in various types ([#​1558](https://togithub.com/square/kotlinpoet/issues/1558)). - Fix: Function return types now default to `Unit` unless explicitly set ([#​1559](https://togithub.com/square/kotlinpoet/issues/1559)). Previously the default was `null` which behaved like `Unit` for block bodies. When an expression body was produced, however, no return type would be emitted. This meant that the return type was implicit based on the contents of the body. With this change, when no return type is specified and an expression body is produced, the return type will be explicitly `Unit`. Specify the actual return type explicitly to correct the output. Old versions: ```kotlin val funSpec = FunSpec.builder("foo") .addStatement("return 1") .build() ``` ```kotlin public fun foo() = 1 ``` This version, incorrect: ```kotlin val funSpec = FunSpec.builder("foo") .addStatement("return 1") .build() ``` ```kotlin public fun foo(): Unit = 1 // ❌ ``` This version, correct: ```diff val funSpec = FunSpec.builder("foo") + .returns(INT) .addStatement("return 1") .build() ``` ```kotlin public fun foo(): Int = 1 // ✅ ``` Additionally, as part of this change, `FunSpec.returnType` has changed to be non-nullable. This is a source- and binary-compatible change, although if you were performing null-checks then new warnings may appear after upgrade. - Fix: Append nested class names to alias during name lookup ([#​1568](https://togithub.com/square/kotlinpoet/issues/1568)). - Fix: Allow PropertySpec with context receivers and without getter or setter ([#​1575](https://togithub.com/square/kotlinpoet/issues/1575)). ### [`v1.13.2`](https://togithub.com/square/kotlinpoet/releases/tag/1.13.2) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.13.1...1.13.2) #### What's Changed - KSType.toTypeName fixed to work with aliased types by [@​Squiry](https://togithub.com/Squiry) in [https://github.com/square/kotlinpoet/pull/1534](https://togithub.com/square/kotlinpoet/pull/1534) #### New Contributors - [@​Squiry](https://togithub.com/Squiry) made their first contribution in [https://github.com/square/kotlinpoet/pull/1534](https://togithub.com/square/kotlinpoet/pull/1534) **Full Changelog**: https://github.com/square/kotlinpoet/compare/1.13.1...1.13.2 ### [`v1.13.1`](https://togithub.com/square/kotlinpoet/releases/tag/1.13.1) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.13.0...1.13.1) #### What's Changed - Fix: Look at canonical names instead of just package names when generating import aliases by [@​Egorand](https://togithub.com/Egorand) in [https://github.com/square/kotlinpoet/pull/1519](https://togithub.com/square/kotlinpoet/pull/1519) - Fix: Ignore KSP annotation arguments without a value by [@​rickclephas](https://togithub.com/rickclephas) in [https://github.com/square/kotlinpoet/pull/1523](https://togithub.com/square/kotlinpoet/pull/1523) - Fix: Fix arguments handling in KSType.toTypeName() by [@​ZacSweers](https://togithub.com/ZacSweers) in [https://github.com/square/kotlinpoet/pull/1529](https://togithub.com/square/kotlinpoet/pull/1529) #### New Contributors - [@​rickclephas](https://togithub.com/rickclephas) made their first contribution in [https://github.com/square/kotlinpoet/pull/1523](https://togithub.com/square/kotlinpoet/pull/1523) **Full Changelog**: https://github.com/square/kotlinpoet/compare/1.13.0...1.13.1 ### [`v1.13.0`](https://togithub.com/square/kotlinpoet/releases/tag/1.13.0) [Compare Source](https://togithub.com/square/kotlinpoet/compare/1.12.0...1.13.0) #### What's Changed - New: Kotlin 1.8.0. - New: KSP 1.8.0-1.0.9. - New: Support context receivers on TypeSpecs + extract ContextReceivable API ([#​1269](https://togithub.com/square/kotlinpoet/issues/1269)). - New: Optimize `OriginatingElements` and `TagMap` implementations ([#​1270](https://togithub.com/square/kotlinpoet/issues/1270)). - New: Auto-generate import aliases for types and members ([#​1355](https://togithub.com/square/kotlinpoet/issues/1355)). - New: Insert underscores into large decimal literals ([#​1384](https://togithub.com/square/kotlinpoet/issues/1384)). - New: New factory function `FileSpec.builder(ClassName)` ([#​1397](https://togithub.com/square/kotlinpoet/issues/1397)). - Fix: Fix StackOverflowError when calling `KSTypeArgument.toTypeName()` for a wildcard in a recursive type bound ([#​1272](https://togithub.com/square/kotlinpoet/issues/1272)). - Fix: Fix transitive aliases ([#​1306](https://togithub.com/square/kotlinpoet/issues/1306)). - Fix: Fix Aliases as TypeArgument ([#​1321](https://togithub.com/square/kotlinpoet/issues/1321)). - Fix: Don't escape special characters inside raw strings ([#​1331](https://togithub.com/square/kotlinpoet/issues/1331)). - Fix: Fix KSP interop's output of the annotation parameter value of type Char ([#​1338](https://togithub.com/square/kotlinpoet/issues/1338)). - Fix: Fix KSP interop's output for primitive arrays ([#​1340](https://togithub.com/square/kotlinpoet/issues/1340)). - Fix: Avoid emitting public if `shouldEmitPublicModifier` returns false ([#​1342](https://togithub.com/square/kotlinpoet/issues/1342)). - Fix: Fix context receivers being rendered in an incorrect position when on a nullable/suspending `LambdaTypeName` ([#​1454](https://togithub.com/square/kotlinpoet/issues/1454)). - Fix: Do not use `bestGuess` for `KClass.asClassName` ([#​1469](https://togithub.com/square/kotlinpoet/issues/1469)). - Fix: Handle fake nested types with platform mapped parents ([#​1472](https://togithub.com/square/kotlinpoet/issues/1472)). - Fix: Fix `TypeName` equals ([#​1477](https://togithub.com/square/kotlinpoet/issues/1477)). - Fix: Make equals consistent with compareTo for `ClassName` ([#​1506](https://togithub.com/square/kotlinpoet/issues/1506)). #### New Contributors - [@​popematt](https://togithub.com/popematt) made their first contribution in [https://github.com/square/kotlinpoet/pull/1272](https://togithub.com/square/kotlinpoet/pull/1272) - [@​bitPogo](https://togithub.com/bitPogo) made their first contribution in [https://github.com/square/kotlinpoet/pull/1306](https://togithub.com/square/kotlinpoet/pull/1306) - [@​mars885](https://togithub.com/mars885) made their first contribution in [https://github.com/square/kotlinpoet/pull/1338](https://togithub.com/square/kotlinpoet/pull/1338) - [@​sjudd](https://togithub.com/sjudd) made their first contribution in [https://github.com/square/kotlinpoet/pull/1344](https://togithub.com/square/kotlinpoet/pull/1344) - [@​Sironheart](https://togithub.com/Sironheart) made their first contribution in [https://github.com/square/kotlinpoet/pull/1384](https://togithub.com/square/kotlinpoet/pull/1384) - [@​polarene](https://togithub.com/polarene) made their first contribution in [https://github.com/square/kotlinpoet/pull/1397](https://togithub.com/square/kotlinpoet/pull/1397) - [@​DeoTimeTheGithubUser](https://togithub.com/DeoTimeTheGithubUser) made their first contribution in [https://github.com/square/kotlinpoet/pull/1454](https://togithub.com/square/kotlinpoet/pull/1454) - [@​drawers](https://togithub.com/drawers) made their first contribution in [https://github.com/square/kotlinpoet/pull/1477](https://togithub.com/square/kotlinpoet/pull/1477) **Full Changelog**: https://github.com/square/kotlinpoet/compare/1.12.0...1.13.0

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), 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 these updates again.



This PR has been generated by Mend Renovate. View repository job log here.