Migrate to Gradle Version Catalog (libs.versions.toml)#214
Open
dipenpradhan wants to merge 15 commits into
Open
Migrate to Gradle Version Catalog (libs.versions.toml)#214dipenpradhan wants to merge 15 commits into
dipenpradhan wants to merge 15 commits into
Conversation
- Replace kotlin-kapt with com.google.devtools.ksp in the app module
and the common-kotlin convention plugin
- Add Room compiler via the ksp configuration instead of kapt
- Drop the kapt { correctErrorTypes = true } workaround
- Add symbol-processing-gradle-plugin (1.9.22-1.0.17) to buildSrc
Fixes Gurupreet#184
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Bump kotlin-gradle-plugin 1.9.22 -> 2.1.20 (root + buildSrc) - Adopt the new Compose Compiler Gradle plugin (org.jetbrains.kotlin.plugin.compose) in app and convention plugins - Drop composeCompiler version constant and composeOptions blocks - Replace removed -Xopt-in flag with -opt-in - Bump KSP to 2.1.20-1.0.31 to match Kotlin Fixes Gurupreet#182 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ktfmt-gradle 0.12.0 fails with 'Generic error during file processing' once Kotlin 2.x is on the buildscript classpath. 0.22.0 supports Kotlin 2.x and also formats *.kts build scripts, hence the repo-wide reformat (no functional changes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- AGP 8.2.2 -> 8.7.3 (compileSdk 35 supported from AGP 8.6) - Gradle wrapper 8.5 -> 8.9 (required by AGP 8.7.x) Fixes Gurupreet#185 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Replace compose/material3 version constants with composeBom - Strip explicit versions from BOM-managed artifacts - Import the BOM platform on every configuration that receives Compose artifacts (implementation, debugImplementation, androidTestImplementation, :data) - Migrate API removals that come with Compose 1.7 / Material3 1.3: SmallTopAppBar -> TopAppBar, rememberRipple -> material3 ripple - Update the outdated README Compose badge to the BOM version Fixes Gurupreet#186 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
All lifecycle artifacts (viewmodel-compose, viewmodel-ktx, livedata-ktx, runtime-ktx, viewmodel-savedstate) move together via the shared androidLifecycleGrouped version. Fixes Gurupreet#192 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- navCompose 2.7.7 -> 2.8.9; add kotlinx-serialization-json 1.8.0 - Apply the Kotlin serialization plugin in gmail and tiktok demos - Gmail: string routes -> @serializable route objects - TikTok: TikTokScreen becomes a serializable sealed interface; the profile route carries a typed userId argument read via toRoute(), bottom bar selection uses NavDestination.hasRoute Fixes Gurupreet#193 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Replace com.google.android.exoplayer:exoplayer with androidx.media3:media3-exoplayer and media3-ui - Rewrite TikTokPlayer against the Media3 API (SimpleExoPlayer was removed; default media source factory handles asset URIs) - Removes the last Jetifier warning produced by ExoPlayer 2.x Fixes Gurupreet#183 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Move to the io.coil-kt.coil3 artifact group - Add coil-network-okhttp (network fetching is a separate artifact in Coil 3, self-registered via ServiceLoader) - Migrate call sites: rememberImagePainter(data=) -> rememberAsyncImagePainter(model=), coil.* -> coil3.* imports Fixes Gurupreet#191 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PullRefreshList was a fully commented-out stub (TODO revisit pull refresh). It now demonstrates the first-party PullToRefreshBox with a simulated 1.5s reload that prepends an item to the list. Fixes Gurupreet#187 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…undo The Swipeable Lists tab rendered SwipeToDismissBox items but swipes never removed anything. Now: - swipe left deletes (red background), swipe right archives - items are actually removed from the keyed LazyColumn - an Undo snackbar restores the item at its original position - positionalThreshold set to half the item width Fixes Gurupreet#188 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- NavigationSuiteScaffold switches bottom bar / rail / drawer by window size class - ListDetailPaneScaffold gives single-pane on phones, two-pane on tablets and foldables, with predictive-back-aware pane navigation - Favorites/Profile destinations display the live window size classes - All adaptive artifacts are version-managed by the Compose BOM Fixes Gurupreet#190 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
InfiniteCarousel builds on foundation's HorizontalPager with a large virtual page count starting in the middle, so it loops endlessly in both directions. Auto-advances every 3s and pauses while dragging. Showcased at the top of the Carousel demo screen. Fixes Gurupreet#13 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Convention plugin now sets testInstrumentationRunner so any library module can host androidTests - InterestTagTest: text, click action, onClick callback - InfiniteCarouselTest: initial page, forward paging, backward loop - LoginScreenTest: fields, button, text input Refs Gurupreet#68 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- gradle/libs.versions.toml is the single source of truth for all versions, libraries and plugins; bundles mirror the old grouped dependency helpers - All module build files use libs.* accessors - Root build script uses the plugins DSL (ktfmt via alias); AGP, Kotlin, KSP and serialization reach the classpath via buildSrc, whose own dependencies are catalog-driven through a new buildSrc/settings.gradle.kts - Delete Versions.kt, Dependencies.kt, GroupedDependencies.kt and DependencyHandlerExtensions.kt; keep convention plugins and ProjectConfigs.kt Fixes Gurupreet#189 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates dependency management from the custom
buildSrcconstants to a Gradle Version Catalog (gradle/libs.versions.toml), as proposed in #189.gradle/libs.versions.tomlis now the single source of truth: every version, library and plugin previously declared inVersions.kt/Dependencies.kt(and the inline Wear OS deps in the cryptoapp demo) lives in[versions]/[libraries]/[plugins][bundles]mirror the old grouped helpers —addComposeOfficialDependencies()→implementation(libs.bundles.compose.official), etc., so module build files keep the same level of abstraction with full IDE auto-completebuild.gradle.ktsfiles migrated tolibs.*accessorsbuild.gradle.ktsswitched frombuildscript { classpath(...) }to theplugins {}DSL withalias(libs.plugins.*) apply falsebuildSrcgets asettings.gradle.ktsthat imports the same catalog, so its plugin dependencies (AGP, Kotlin, KSP, serialization, Compose compiler) reference identical versionsVersions.kt,Dependencies.kt,GroupedDependencies.kt,DependencyHandlerExtensions.ktProjectConfigs.kt(SDK levels/app id), per the issueThis also unlocks Dependabot/Renovate support, which the upcoming security-automation issue can build on.
Closes #189
Verification
./gradlew ktfmtCheck assembleDebug testDebugUnitTestpasses locally (JDK 17, SDK 35) — dependency resolution is byte-identical (same coordinates, same versions)./gradlew buildon this PRMerge order
PR 14 of 14 — the final PR of the stacked series; intentionally last because it rewrites every build file the other PRs touch. Depends on #195 → … → #213.
🤖 Generated with Claude Code
cc @Gurupreet for review