Skip to content

Update dependency com.squareup:kotlinpoet to v2 #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 4, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.squareup:kotlinpoet 1.18.1 -> 2.2.0 age adoption passing confidence

Release Notes

square/kotlinpoet (com.squareup:kotlinpoet)

v2.2.0

Compare Source

Thanks to @​IRus for contributing to this release.

  • New: Kotlin 2.1.21.
  • New: KSP 2.1.21-2.0.1.
  • New: Add support for context parameters. (#​2112)
  • New: Eliminate Guava dependency. (#​2110)
  • New: Migrate to Dokka plugin V2. (#​2113)

v2.1.0

Compare Source

Thanks to @​ForteScarlet, @​TrevorSStone, @​RaoPrashanth, @​damianw, @​ansehoon1999, @​TheMrMilchmann for contributing to this release.

  • New: Kotlin 2.1.10.
  • New: KSP 2.1.10-1.0.30.
  • Fix: Support delegates on anonymous classes. (#​2034)
  • Fix: Prevent aliased imports from colliding with existing imports. (#​2052)
  • Fix: TypeName.MUTABLE_MAP_ENTRY now correctly uses the MutableEntry nested class name. (#​2061)
  • Fix: Use the same aliased import for both the nullable and non-nullable versions of a type. (#​2068)
  • Fix: Allow zero methods in a functional interface if it has a superinterface. (#​2075)

v2.0.0

Compare Source

Thanks to @​brokenhappy, @​tajobe, @​niyajali, @​ForteScarlet for contributing to this release.

This release is source- and binary-compatible with KotlinPoet 1.x.

The most important behavior change in this release is that spaces in generated code don't wrap by default anymore.

KotlinPoet 1.x used to replace space characters with newline characters whenever a given line of code exceeded the length limit. This usually led to better code formatting, but could also lead to compilation errors in generated code. Non-breaking spaces could be marked by the · character, but the discoverability of this feature wasn't great.

KotlinPoet 2.0 does not wrap spaces, even if the line of code they occur in exceeds the length limit. The newly introduced character can be used to mark spaces that are safe to wrap, which can improve code formatting. The · character has been preserved for compatibility, but its behavior is now equivalent to a regular space character.

  • New: Kotlin 2.0.10.
  • New: Spaces don't break by default.
  • New: New placeholder representing a space that is safe to wrap.
  • New: Add KSTypeAlias.toClassName(). (#​1956)
  • New: Add KSType.toClassNameOrNull(). (#​1956)
  • Fix: Enum classes that only have an init block now also generate the required semicolon. (#​1953)
  • Fix: Preserve typealiases in KSAnnotation.toAnnotationSpec(). (#​1956)
  • Fix: Preserve nullability in KSType.toClassName(). (#​1956)

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 is behind base branch, 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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-k.poet branch 6 times, most recently from 50ae382 to d9a2aa4 Compare January 10, 2025 21:34
@renovate renovate bot force-pushed the renovate/major-k.poet branch 10 times, most recently from 1fa49dd to 2923d6d Compare January 20, 2025 17:44
@renovate renovate bot force-pushed the renovate/major-k.poet branch 4 times, most recently from e2d3868 to 7725ee9 Compare January 26, 2025 17:58
@renovate renovate bot force-pushed the renovate/major-k.poet branch 9 times, most recently from 327f059 to 8c2f114 Compare February 3, 2025 20:47
@renovate renovate bot force-pushed the renovate/major-k.poet branch 3 times, most recently from ce90893 to 0db6f65 Compare March 9, 2025 13:42
@renovate renovate bot force-pushed the renovate/major-k.poet branch 5 times, most recently from db52272 to d469d45 Compare March 15, 2025 18:55
@renovate renovate bot force-pushed the renovate/major-k.poet branch 7 times, most recently from cdcad04 to 389e86c Compare March 24, 2025 18:58
@renovate renovate bot force-pushed the renovate/major-k.poet branch 3 times, most recently from dd8e349 to bffebbf Compare March 29, 2025 14:14
@renovate renovate bot force-pushed the renovate/major-k.poet branch 3 times, most recently from 5ad4dcc to e5a2345 Compare March 31, 2025 20:18
@renovate renovate bot force-pushed the renovate/major-k.poet branch 3 times, most recently from 3e35c9c to 6db3cad Compare April 13, 2025 20:48
@renovate renovate bot force-pushed the renovate/major-k.poet branch from 6db3cad to b1ec0d5 Compare May 7, 2025 16:31
@renovate renovate bot force-pushed the renovate/major-k.poet branch from b1ec0d5 to 0859df9 Compare May 16, 2025 11:58
@renovate renovate bot force-pushed the renovate/major-k.poet branch from 0859df9 to 46e1209 Compare May 18, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants