Skip to content

Sync iOS app versions from gradle/libs.versions.toml - #78

Open
patrickunterwegs wants to merge 1 commit into
mainfrom
claude/ios-config-issues-odeyea
Open

Sync iOS app versions from gradle/libs.versions.toml#78
patrickunterwegs wants to merge 1 commit into
mainfrom
claude/ios-config-issues-odeyea

Conversation

@patrickunterwegs

Copy link
Copy Markdown
Member

Summary

Establish a single source of truth for iOS app versioning by automatically generating xcconfig files from the Gradle version catalog, keeping iOS versions in sync with Android without manual duplication.

Key Changes

  • Added generateIosVersionConfig task to each app module (composeJournalsApp, composeNotesApp, composeTasksApp) that reads appVersionString and appBuildNumber from gradle/libs.versions.toml and generates Version.xcconfig files
  • Created new Version.xcconfig files for each iOS app in iosApp/*/Configuration/ containing MARKETING_VERSION and CURRENT_PROJECT_VERSION
  • Updated existing Config.xcconfig files to #include "Version.xcconfig" and removed hardcoded version values
  • Added root-level updateIosVersions task to regenerate all three iOS version files in one command
  • Integrated version generation into the Xcode build pipeline by making embedAndSignAppleFrameworkForXcode depend on generateIosVersionConfig

Implementation Details

  • Version files are only written when content changes, preventing unnecessary git dirtying during normal builds
  • Generated files include comments directing developers to update versions in gradle/libs.versions.toml instead
  • The task is automatically run during every iOS build via Xcode's Kotlin Framework compilation phase
  • Developers can manually run ./gradlew updateIosVersions after bumping versions in the catalog

https://claude.ai/code/session_0173eTCarvivVN859UekPvjw

Generate each iOS app's MARKETING_VERSION and CURRENT_PROJECT_VERSION into a
Version.xcconfig from appVersionString / appBuildNumber, the same single source
of truth Android already uses. Config.xcconfig now #includes the generated file
instead of hardcoding the version, so bumping the TOML updates Android and iOS
together. A generateIosVersionConfig task per compose module writes the file
(only when values change) and runs before embedAndSignAppleFrameworkForXcode;
the root updateIosVersions task regenerates all three at once. This aligns iOS
with Android at 1.0.41 / 41.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0173eTCarvivVN859UekPvjw
@patrickunterwegs

Copy link
Copy Markdown
Member Author

This was an attempt to simplify the release process, but the additional gradle tasks ad complexity. I'm afraid that things may break in the future and fixing them might get complicated. Keeping the existing solution for now (manually updating the TOML file as well as the 3 iOS configs). But also keeping this PR for future reference.

@patrickunterwegs patrickunterwegs added the enhancement New feature or request label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants