Skip to content

chore: Migrate Build System to Kotlin DSL and Fix Lint Issues#299

Open
dkhawk wants to merge 6 commits intomainfrom
chore/migrate-to-kts-and-lint
Open

chore: Migrate Build System to Kotlin DSL and Fix Lint Issues#299
dkhawk wants to merge 6 commits intomainfrom
chore/migrate-to-kts-and-lint

Conversation

@dkhawk
Copy link
Contributor

@dkhawk dkhawk commented Dec 23, 2025

Description

This PR migrates the entire build system from Groovy (build.gradle) to Kotlin DSL (build.gradle.kts) and addresses all identified lint issues to improve code quality and maintainability.

Changes

Build System Migration

  • Kotlin DSL: Converted all build files (root, places-ktx, app, demo-app-new-api) to build.gradle.kts.
  • Settings: Migrated settings.gradle to settings.gradle.kts.
  • Version Catalog: Standardized plugin usage with alias(libs.plugins.*) in all modules.
  • Modernization:
    • Replaced deprecated kotlinOptions with the compilerOptions DSL.
    • Replaced deprecated buildDir property with layout.buildDirectory.
    • Removed unused flatDir repository configuration.

Lint & Code Quality

  • PlaceResultAdapter: Refactored to ListAdapter with DiffUtil to resolve NotifyDataSetChanged warnings and improve UI performance.
  • Resources:
    • Removed unused raw assets (south_london_*.json, etc.) and colors (colorGray).
    • Merged drawable-v24 resources into drawable to resolve ObsoleteSdkInt.
    • Suppressed MonochromeLauncherIcon warning (by design).
  • Documentation: Updated README.md to reflect Kotlin DSL dependency usage.

Verification

  • Build: ./gradlew :demo-app-new-api:assembleDebug passes successfully.
  • Lint: ./gradlew :demo-app-new-api:lintDebug passes with 0 errors.
  • Library Lint: ./gradlew :places-ktx:lintDebug passes with 0 errors.

- Added new module demo-app-new-api copied from app.
- Updated packages to com.google.places.android.ktx.demo.newapi.
- Implemented PlacesSearchViewModel using new async KTX extensions (searchByText, searchNearby).
- Configured searchNearby to search in Boulder, CO.
- Updated settings.gradle to include the new module.
- Migrated all Groovy build.gradle files to Kotlin DSL (build.gradle.kts).
- Annotated libs.versions.toml and grouped dependencies.
- Refactored PlaceResultAdapter to ListAdapter with DiffUtil to fix lint warnings.
- Cleaned up unused resources and suppressed monochrome icon warnings.
- Added KDoc and comments to new API demo code.
- Adopted Version Catalog plugin aliases in all build.gradle.kts files.
- Migrated deprecated  to  DSL.
- Replaced deprecated  property with .
- Standardized root build.gradle.kts plugins with Version Catalog aliases.
- Fixed typo in libs.versions.toml.
- Updated README to use Kotlin DSL for dependency example.
- Updated walkthrough with modernization details.
@dkhawk dkhawk requested a review from kikoso December 23, 2025 02:32
compose-bom = "2025.12.00"
compose-bom = "2025.12.01"
coreKtx = "1.17.0"
dokka = "2.0.0"

Check warning

Code scanning / Android Lint

Newer Library Versions Available Warning

A newer version of org.jetbrains.dokka than 2.0.0 is available: 2.1.0
secretsGradlePlugin = "2.0.1"
test-core = "1.7.0"
truth = "1.4.5"
vanniktech = "0.34.0"

Check warning

Code scanning / Android Lint

Newer Library Versions Available Warning

A newer version of com.vanniktech.maven.publish than 0.34.0 is available: 0.35.0
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