Skip to content

Update generator to Kotlin 2.4.20 and KotlinPoet 2.3.0 - #894

Open
ExNDY wants to merge 5 commits into
icerockdev:developfrom
ExNDY:feature-update-kotlin-kotlinpoet
Open

ExNDY wants to merge 5 commits into
icerockdev:developfrom
ExNDY:feature-update-kotlin-kotlinpoet

Conversation

@ExNDY

@ExNDY ExNDY commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the moko-resources generator toolchain while preserving the existing public compatibility baseline.

Changes

  • Updated generator Kotlin from 2.3.20 to 2.4.20.
  • Updated KotlinPoet from 1.13.1 to 2.3.0.
  • Kept Kotlin 2.1.0 as the minimum supported version for public modules.
  • Set the generator language and API versions to Kotlin 2.1.
  • Kept AGP 8.13.2 as the generator compile-time API while supporting AGP 8.x and AGP 9.x consumers.
  • Replaced the removed internal Kotlin/Native zipDirAs API with a local deterministic ZIP implementation.
  • Added tests for deterministic KLIB ZIP generation, entry ordering, file contents, and empty directories.
  • Added a dynamic KDoc index to generated MR objects with links to available resource containers.
  • Moved the compatibility policy to COMPATIBILITY.md.
  • Reduced README.md to the public requirements and a link to the compatibility policy.
  • Documented why KotlinPoet 2.4.0 is intentionally not used yet.

Example generated documentation:

/**
 * Entry point for generated resources.
 *
 * Available resource containers:
 * - [strings]
 * - [plurals]
 * - [images]
 * - [colors]
 * - [fonts]
 * - [files]
 * - [assets]
 */
public expect object MR

Compatibility

  • Public Kotlin baseline remains 2.1.0.
  • Public AGP baseline remains 8.3.0.
  • Generator Kotlin toolchain uses 2.4.20.
  • Generator KotlinPoet remains on 2.3.0 because 2.4.0 does not provide an API or fix currently required by the generator.
  • Kotlin baseline 2.2.0 may be adopted after Kotlin 2.5 stabilization, or earlier if Kotlin 2.5 compatibility fixes cannot be released while retaining Kotlin 2.1 support.
  • AGP 9 compile API migration remains a separate compatibility change.

@ExNDY ExNDY self-assigned this Sep 23, 2026
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.

1 participant