Migrate dependency management to Gradle Version Catalog (libs.versions.toml)#194
Draft
Copilot wants to merge 2 commits into
Draft
Migrate dependency management to Gradle Version Catalog (libs.versions.toml)#194Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/Gurupreet/ComposeCookBook/sessions/00d78bea-6b14-4f9a-a93d-7f7ab312592e Co-authored-by: Gurupreet <[email protected]>
Copilot
AI
changed the title
[WIP] Enhance project by migrating to Gradle version catalog
Migrate dependency management to Gradle Version Catalog (libs.versions.toml)
May 10, 2026
Comment on lines
+1
to
+2
| enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") | ||
|
|
Comment on lines
+98
to
+114
| compose-official = [ | ||
| "compose-ui", | ||
| "compose-ui-tooling", | ||
| "compose-material", | ||
| "compose-material3", | ||
| "compose-material-icons-extended", | ||
| "compose-runtime-livedata", | ||
| "compose-constraint-layout", | ||
| "compose-paging", | ||
| "compose-viewmodel", | ||
| "compose-activity", | ||
| "compose-navigation", | ||
| "compose-runtime", | ||
| ] | ||
| compose-third-party = ["font-awesome-compose", "compose-lottie", "flinger"] | ||
| compose-debug = ["kotlin-reflect", "compose-ui-tooling", "compose-ui-test-manifest"] | ||
| kotlin-main = ["kotlin-stdlib-jdk8", "kotlinx-coroutines-core", "kotlinx-coroutines-android"] |
| agp = "8.2.2" | ||
| kotlin = "1.9.22" | ||
| compose = "1.6.1" | ||
| compose-compiler = "1.5.8" |
| testImplementation(libs.truth) | ||
|
|
||
| // Instrumentation tests | ||
| androidTestImplementation(libs.bundles.android.instrumentation.test) |
Comment on lines
18
to
31
| implementation(project(":theme")) | ||
| implementation(project(":data")) | ||
| implementation("androidx.wear:wear:1.2.0") | ||
|
|
||
| addComposeOfficialDependencies() | ||
| addComposeThirdPartyDependencies() | ||
| implementation(libs.bundles.compose.official) | ||
| implementation(libs.bundles.compose.third.party) | ||
|
|
||
| addCoreAndroidUiDependencies() | ||
| addThirdPartyUiDependencies() | ||
| implementation(libs.bundles.core.android.ui) | ||
| implementation(libs.bundles.third.party.ui) | ||
|
|
||
| addCoreAndroidDependencies() | ||
| implementation(libs.bundles.core.android) | ||
|
|
||
| val wear_compose_version = "1.0.0-alpha07" | ||
| implementation("androidx.wear.compose:compose-material:$wear_compose_version") |
| implementation(libs.bundles.core.android.ui) | ||
|
|
||
| // Test dependencies | ||
| testImplementation("junit:junit:4.13.2") |
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.
Replaces the bespoke
buildSrcdependency constants (Versions.kt,Dependencies.kt,GroupedDependencies.kt,DependencyHandlerExtensions.kt) with a standard Gradle Version Catalog, enabling IDE auto-complete, Renovate/Dependabot version bump support, and a single canonical source for all dependency coordinates.What changed
gradle/libs.versions.toml— all versions, library GAVs, bundles (grouped deps), and plugin IDs in one TOML fileVersions.kt,Dependencies.kt,GroupedDependencies.kt,DependencyHandlerExtensions.ktfrombuildSrcbuildSrc/.../ProjectConfigs.kt— removedVersionsimport; SDK/compiler versions now inlined as constants (they are build config, not dependency versions)app/build.gradle.kts+ all 31 modulebuild.gradle.ktsfiles — replaced helper function calls withlibs.*/libs.bundles.*accessorssettings.gradle.kts— addedenableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")Before / After
Bundles in the catalog mirror the old grouped dependency lists (e.g.
compose-official,core-android,networking,third-party-ui), so call-site diffs are minimal. Convention plugins (common-compose-module-configs-script-plugin,common-kotlin-module-configs-script-plugin) are unchanged.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.google.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx4096M -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.5-bin/5t9huq95ubn472n8rpzujfbqh/gradle-8.5/lib/gradle-launcher-8.5.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.5-bin/5t9huq95ubn472n8rpzujfbqh/gradle-8.5/lib/agents/gradle-instrumentation-agent-8.5.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.5(dns block)If you need me to access, download, or install something from one of these locations, you can either: