Skip to content

Migrate to Gradle 9 with sample module restructure#2

Merged
Merkost merged 21 commits into
mainfrom
improvement/gradle9
Mar 27, 2026
Merged

Migrate to Gradle 9 with sample module restructure#2
Merkost merged 21 commits into
mainfrom
improvement/gradle9

Conversation

@Merkost
Copy link
Copy Markdown
Member

@Merkost Merkost commented Mar 24, 2026

Summary

  • Upgrade Gradle wrapper from 8.14.3 to 9.4.1
  • Split :sample into :sample:shared (KMP library) + :sample:androidApp (pure Android app) to comply with Gradle 9's requirement that KMP androidTarget only works with androidLibrary
  • Remove deprecated Gradle settings (enableFeaturePreview, configuration-cache property, --no-configuration-cache CI flags)

Merkost and others added 17 commits March 24, 2026 09:28
…8n, API polish)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sprints)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…eckout@v6

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oding

Adds a Gradle task that writes BuildKConfig.kt into the build directory
with the version read from libs.versions.kcountries, keeping Countries.VERSION
in sync with the published artifact version automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the length-in-4..8 check with de.cketti.codepoints validation that
requires exactly 2 regional indicator codepoints (U+1F1E6..U+1F1FF), rejecting
ASCII strings like "ABCD" that previously passed the length check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…slations, fix SDK versions and Locale annotation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…imezone and populate all 249 entries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…region, calling code, currency, timezone

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…continent, region, timezone

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, update tests for 13 locales

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…or{}/nameContains edge cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dule

Split the sample module into :sample:shared (KMP library) and
:sample:androidApp (pure Android app) to comply with Gradle 9's
requirement that KMP androidTarget only works with androidLibrary.

- Upgrade Gradle wrapper from 8.14.3 to 9.4.1
- Remove enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") (default in Gradle 9)
- Remove org.gradle.configuration-cache property (always-on in Gradle 9)
- Remove --no-configuration-cache from CI workflows
- Delete placeholder tests (ExampleUnitTest, ExampleInstrumentedTest)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 24, 2026 22:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the build tooling to Gradle 9 and restructures the sample app into separate shared (KMP) + Android app modules, while also landing a large set of library/API and i18n expansions (new country metadata fields, query APIs, and additional translation locales) plus CI/doc updates.

Changes:

  • Upgrade Gradle wrapper and remove deprecated Gradle settings/flags; update dependency/tooling versions via version catalog.
  • Restructure :sample into :sample:shared (KMP/Android library) and :sample:androidApp (Android application), adding platform entrypoints (JVM/iOS/web).
  • Expand core/i18n functionality: add new Country metadata + repository/DSL APIs, add 7 translation locales, update tests, docs, and CI workflows accordingly.

Reviewed changes

Copilot reviewed 49 out of 59 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
settings.gradle.kts Removes deprecated feature preview and switches sample includes to :sample:shared + :sample:androidApp.
sample/src/test/java/org/kimplify/sample/ExampleUnitTest.kt Removes legacy sample unit test from deleted/old :sample layout.
sample/src/androidTest/java/org/kimplify/sample/ExampleInstrumentedTest.kt Removes legacy sample instrumented test from deleted/old :sample layout.
sample/shared/src/webMain/resources/index.html Adds web entry HTML for the shared KMP sample (wasm/js).
sample/shared/src/webMain/kotlin/org/kimplify/sample/main.wasmJs.kt Adds wasm/js main() entrypoint using ComposeViewport.
sample/shared/src/jvmMain/kotlin/org/kimplify/sample/main.jvm.kt Adds desktop JVM main() entrypoint for Compose desktop.
sample/shared/src/iosMain/kotlin/org/kimplify/sample/main.ios.kt Adds iOS MainViewController() Compose entrypoint.
sample/shared/src/commonMain/kotlin/org/kimplify/sample/App.kt Updates language picker + displayed language count; shows new country metadata fields in details dialog.
sample/shared/build.gradle.kts Converts shared module to androidLibrary and updates SDK config to use version catalog.
sample/androidApp/src/main/kotlin/org/kimplify/sample/MainActivity.kt Android app entrypoint hosting App() composable.
sample/androidApp/src/main/AndroidManifest.xml Android manifest for the new :sample:androidApp module.
sample/androidApp/proguard-rules.pro Adds default ProGuard rules file for the Android app module.
sample/androidApp/build.gradle.kts Adds new Android application module build script wiring :sample:shared.
kotlin-js-store/yarn.lock Updates JS dependency lockfile as part of Kotlin/Gradle upgrades.
gradle/wrapper/gradle-wrapper.properties Upgrades Gradle wrapper distribution to 9.4.1.
gradle/libs.versions.toml Bumps Kotlin/Compose/AndroidX versions and keeps Android SDK versions in catalog.
gradle.properties Removes deprecated/obsolete configuration-cache property line.
docs/superpowers/specs/2026-03-24-kcountries-full-sweep-design.md Adds new design spec documentation for planned/implemented expansions.
docs/superpowers/plans/2026-03-24-kcountries-full-sweep.md Adds implementation plan documentation for the “full sweep” changes.
countries-i18n/src/commonTest/kotlin/org/kimplify/countries/i18n/TranslationTest.kt Updates i18n tests for 13 locales + locale-string normalization + full coverage assertions.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/extensions/CountryI18nExtensions.kt Implements locale string normalization with graceful fallback behavior.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/TurkishTranslations.kt Adds full Turkish translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/SpanishTranslations.kt Removes XK translation entry to align with dataset.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/RussianTranslations.kt Removes XK translation entry to align with dataset.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/PortugueseTranslations.kt Adds full Portuguese translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/KoreanTranslations.kt Adds full Korean translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/JapaneseTranslations.kt Adds full Japanese translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/ItalianTranslations.kt Adds full Italian translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/IndonesianTranslations.kt Adds full Indonesian translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/HindiTranslations.kt Adds full Hindi translation map.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/GermanTranslations.kt Removes XK translation entry to align with dataset.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/FrenchTranslations.kt Removes XK translation entry to align with dataset.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/ChineseTranslations.kt Adds missing CN/HK/MO/SG/TW translations and removes XK.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/data/ArabicTranslations.kt Removes XK translation entry to align with dataset.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/Locale.kt Standardizes @JvmInline usage and adds KO/IT/TR/ID locale constants.
countries-i18n/src/commonMain/kotlin/org/kimplify/countries/i18n/CountryTranslations.kt Registers new locale maps and normalizes string-based lookup API.
countries-i18n/build.gradle.kts Aligns Android SDK settings with version catalog and keeps i18n publishing config.
countries-i18n/README.md Updates module documentation for new locales and normalization behavior.
countries-core/src/commonTest/kotlin/org/kimplify/countries/testdata/TestCountries.kt Extends test fixtures with new metadata fields.
countries-core/src/commonTest/kotlin/org/kimplify/countries/repository/CountriesRepositoryTest.kt Adds tests for new repository query methods (continent/region/callingCode/currency).
countries-core/src/commonTest/kotlin/org/kimplify/countries/model/CountryMetadataValidationTest.kt Adds validation tests for new metadata value classes.
countries-core/src/commonTest/kotlin/org/kimplify/countries/model/CountryCodesValidationTest.kt Strengthens FlagEmoji validation test to enforce 2 regional-indicator codepoints.
countries-core/src/commonTest/kotlin/org/kimplify/countries/extensions/CountryExtensionsTest.kt Adds tests for new string extension properties exposing metadata.
countries-core/src/commonTest/kotlin/org/kimplify/countries/dsl/CountriesQueryTest.kt Adds tests for new DSL predicates and combinators (not {}, empty or {} guard, iterable result).
countries-core/src/commonMain/kotlin/org/kimplify/countries/repository/CountriesRepository.kt Adds repository APIs + indexes for new metadata fields.
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/Region.kt Adds UN-style region enum.
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/CountryMetadata.kt Adds CallingCode, CurrencyCode, TimezoneId value classes with validation.
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/CountryCodes.kt Updates FlagEmoji validation to codepoint-based regional indicator enforcement.
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/Country.kt Extends Country with continent/region/callingCode/currency/timezone fields.
countries-core/src/commonMain/kotlin/org/kimplify/countries/model/Continent.kt Adds continent enum.
countries-core/src/commonMain/kotlin/org/kimplify/countries/extensions/CountryExtensions.kt Adds string extension properties for new metadata fields.
countries-core/src/commonMain/kotlin/org/kimplify/countries/dsl/CountriesQuery.kt Adds DSL marker, new metadata predicates, not {} combinator, guards, and makes query result iterable.
countries-core/src/commonMain/kotlin/org/kimplify/countries/Countries.kt Switches VERSION to be build-generated rather than hardcoded.
countries-core/build.gradle.kts Adds version-file generation task and aligns Android SDK versions to catalog.
README.md Updates top-level docs for new metadata, query API, i18n locales, and versioning notes.
.github/workflows/publish.yml Updates checkout action version and removes --no-configuration-cache publish flag.
.github/workflows/build.yml Fixes CI task paths, expands test matrix to both modules, and updates report upload paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread countries-core/build.gradle.kts
Comment thread sample/androidApp/build.gradle.kts
Comment thread countries-i18n/README.md Outdated
Comment thread docs/superpowers/plans/2026-03-24-kcountries-full-sweep.md
Comment thread countries-i18n/README.md Outdated
Comment thread settings.gradle.kts
Comment thread countries-core/src/commonMain/kotlin/org/kimplify/countries/dsl/CountriesQuery.kt Outdated
@Merkost Merkost self-assigned this Mar 25, 2026
Merkost and others added 4 commits March 26, 2026 11:04
Ensures the version file generator runs before Kotlin compilation on
clean builds, avoiding potential missing BuildKConfig in KMP edge cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace invalid builtBy chain with tasks.withType dependsOn to ensure
version file is generated before all Kotlin compilation tasks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Merkost Merkost merged commit ef44fa5 into main Mar 27, 2026
2 checks passed
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.

3 participants