From 31607620ad0b800a129f1703f197d88111f771d2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 May 2026 13:40:13 +0000 Subject: [PATCH 1/2] Initial plan From bc9f547e303550d4a55363e6d9b6fdba3ba89a63 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 May 2026 13:52:09 +0000 Subject: [PATCH 2/2] feat: migrate to Gradle Version Catalog (libs.versions.toml) Agent-Logs-Url: https://github.com/Gurupreet/ComposeCookBook/sessions/00d78bea-6b14-4f9a-a93d-7f7ab312592e Co-authored-by: Gurupreet <4903762+Gurupreet@users.noreply.github.com> --- animations/canvas/build.gradle.kts | 4 +- animations/lottie/build.gradle.kts | 10 +- app/build.gradle.kts | 64 ++++---- .../build/configurations/ProjectConfigs.kt | 10 +- .../build/dependencies/Dependencies.kt | 88 ----------- .../DependencyHandlerExtensions.kt | 92 ------------ .../build/dependencies/GroupedDependencies.kt | 99 ------------ .../build/dependencies/Versions.kt | 38 ----- components/carousel/build.gradle.kts | 4 +- components/charts/build.gradle.kts | 7 +- components/colorpicker/build.gradle.kts | 4 +- components/comingsoon/build.gradle.kts | 4 +- components/fab/build.gradle.kts | 4 +- components/tags/build.gradle.kts | 4 +- components/verticalgrid/build.gradle.kts | 4 +- data/build.gradle.kts | 2 +- demos/cryptoapp/app/build.gradle.kts | 16 +- demos/cryptoapp/data/build.gradle.kts | 16 +- demos/datingapp/build.gradle.kts | 7 +- demos/gmail/build.gradle.kts | 7 +- demos/instagram/build.gradle.kts | 10 +- demos/meditation/build.gradle.kts | 11 +- demos/moviesapp/app/build.gradle.kts | 16 +- demos/moviesapp/data/build.gradle.kts | 16 +- demos/paint/build.gradle.kts | 7 +- demos/spotify/build.gradle.kts | 7 +- demos/tiktok/build.gradle.kts | 13 +- demos/twitter/build.gradle.kts | 7 +- demos/youtube/build.gradle.kts | 7 +- gradle/libs.versions.toml | 141 ++++++++++++++++++ settings.gradle.kts | 2 + templates/cascademenu/build.gradle.kts | 7 +- templates/login/build.gradle.kts | 7 +- templates/onboarding/build.gradle.kts | 4 +- templates/paymentcard/build.gradle.kts | 4 +- templates/pinlock/build.gradle.kts | 11 +- templates/profile/build.gradle.kts | 4 +- theme/build.gradle.kts | 10 +- 38 files changed, 258 insertions(+), 510 deletions(-) delete mode 100644 buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/Dependencies.kt delete mode 100644 buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/DependencyHandlerExtensions.kt delete mode 100644 buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/GroupedDependencies.kt delete mode 100644 buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/Versions.kt create mode 100644 gradle/libs.versions.toml diff --git a/animations/canvas/build.gradle.kts b/animations/canvas/build.gradle.kts index 5016f76a..4d96c3a1 100644 --- a/animations/canvas/build.gradle.kts +++ b/animations/canvas/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -13,5 +11,5 @@ android { dependencies { implementation(project(":theme")) - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } diff --git a/animations/lottie/build.gradle.kts b/animations/lottie/build.gradle.kts index e9fb43b2..675ad618 100644 --- a/animations/lottie/build.gradle.kts +++ b/animations/lottie/build.gradle.kts @@ -1,7 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidDependencies -import com.guru.composecookbook.build.dependencies.addThirdPartyUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -14,7 +10,7 @@ android { } dependencies { - addComposeOfficialDependencies() - addCoreAndroidDependencies() - addThirdPartyUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android) + implementation(libs.bundles.third.party.ui) } diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 7d713d5a..abd0bf3f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,19 +1,4 @@ import com.guru.composecookbook.build.configurations.ProjectConfigs -import com.guru.composecookbook.build.dependencies.addAndroidInstrumentationTestsDependencies -import com.guru.composecookbook.build.dependencies.addBiometricDependency -import com.guru.composecookbook.build.dependencies.addComposeDebugDependencies -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addComposeThirdPartyDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies -import com.guru.composecookbook.build.dependencies.addDataDependencies -import com.guru.composecookbook.build.dependencies.addGoogleAndroidDependencies -import com.guru.composecookbook.build.dependencies.addJunit5TestDependencies -import com.guru.composecookbook.build.dependencies.addKotlinDependencies -import com.guru.composecookbook.build.dependencies.addKotlinTestDependencies -import com.guru.composecookbook.build.dependencies.addNetworkingDependencies -import com.guru.composecookbook.build.dependencies.addThirdPartyUiDependencies -import com.guru.composecookbook.build.dependencies.addThirdPartyUnitTestsDependencies plugins { id("com.android.application") @@ -104,25 +89,44 @@ dependencies { implementation(project(":animations:canvas")) implementation(project(":animations:lottie")) - addKotlinDependencies() + // Kotlin + coroutines + implementation(libs.bundles.kotlin.main) - addDataDependencies() + // Room + Paging data layer + kapt(libs.androidx.room.compiler) + implementation(libs.androidx.room.runtime) + implementation(libs.androidx.room.ktx) + implementation(libs.androidx.paging.runtime) + implementation(libs.compose.runtime) - addComposeOfficialDependencies() - addComposeDebugDependencies() - addComposeThirdPartyDependencies() + // Compose official + implementation(libs.bundles.compose.official) + debugImplementation(libs.bundles.compose.debug) - addThirdPartyUiDependencies() + // Compose third-party + implementation(libs.bundles.compose.third.party) - addCoreAndroidDependencies() - addCoreAndroidUiDependencies() - addGoogleAndroidDependencies() - addNetworkingDependencies() + // Third-party UI + implementation(libs.bundles.third.party.ui) - addKotlinTestDependencies() - addJunit5TestDependencies() - addThirdPartyUnitTestsDependencies() + // Core Android + implementation(libs.bundles.core.android) + implementation(libs.bundles.core.android.ui) - addAndroidInstrumentationTestsDependencies() - addBiometricDependency() + // Google Android + implementation(libs.bundles.google.android) + + // Networking + implementation(libs.bundles.networking) + + // Unit tests + testImplementation(libs.bundles.kotlin.test) + testImplementation(libs.bundles.junit5.test) + testImplementation(libs.truth) + + // Instrumentation tests + androidTestImplementation(libs.bundles.android.instrumentation.test) + + // Biometric + implementation(libs.androidx.biometric) } \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/configurations/ProjectConfigs.kt b/buildSrc/src/main/kotlin/com/guru/composecookbook/build/configurations/ProjectConfigs.kt index 71e1ced7..a85cb440 100644 --- a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/configurations/ProjectConfigs.kt +++ b/buildSrc/src/main/kotlin/com/guru/composecookbook/build/configurations/ProjectConfigs.kt @@ -1,11 +1,9 @@ package com.guru.composecookbook.build.configurations -import com.guru.composecookbook.build.dependencies.Versions - object ProjectConfigs { - const val compileSdkVersion = 34 // Latest supported Android SDK version - const val minSdkVersion = 25 // Original minSdkVersion - const val targetSdkVersion = 34 // Matching compileSdkVersion + const val compileSdkVersion = 34 + const val minSdkVersion = 25 + const val targetSdkVersion = 34 const val applicationId = "com.guru.composecookbook" - const val kotlinCompilerExtensionVersion = Versions.composeCompiler + const val kotlinCompilerExtensionVersion = "1.5.8" } \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/Dependencies.kt b/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/Dependencies.kt deleted file mode 100644 index c2c63dd6..00000000 --- a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/Dependencies.kt +++ /dev/null @@ -1,88 +0,0 @@ -package com.guru.composecookbook.build.dependencies - -object Dependencies { - - const val kotlinReflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlin}" - const val fontAwesomeCompose = - "com.github.Gurupreet:FontAwesomeCompose:${Versions.fontAwesomeCompose}" - const val kotlinStandardLibraryJdk8 = - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Versions.kotlin}" - const val androidCoreKtx = "androidx.core:core-ktx:${Versions.coreKtx}" - const val androidAppCompat = "androidx.appcompat:appcompat:${Versions.appcompat}" - const val androidPaletteKtx = "androidx.palette:palette-ktx:${Versions.paletteKtx}" - const val googleMaterial = "com.google.android.material:material:${Versions.material}" - const val androidMultiDex = "androidx.multidex:multidex:${Versions.multidex}" - const val playServicesAds = - "com.google.android.gms:play-services-ads:${Versions.playServicesAds}" - // Removed googleMaps = "com.google.android.libraries.maps:maps" as it's not publicly available - const val playServicesMaps = - "com.google.android.gms:play-services-maps:${Versions.playServicesMaps}" - const val composeUi = "androidx.compose.ui:ui:${Versions.compose}" - const val composeUiTooling = "androidx.compose.ui:ui-tooling:${Versions.compose}" - // Material Design 1 and 3 dependencies - const val composeMaterial = "androidx.compose.material:material:${Versions.compose}" - const val composeMaterial3 = "androidx.compose.material3:material3:${Versions.material3}" - const val composeMaterial3WindowSizeClass = "androidx.compose.material3:material3-window-size-class:${Versions.material3}" - const val composeMaterialIconsExtended = - "androidx.compose.material:material-icons-extended:${Versions.compose}" - - // Runtime and State Management - const val composeRuntime = "androidx.compose.runtime:runtime:${Versions.compose}" - const val composeRuntimeLivedata = - "androidx.compose.runtime:runtime-livedata:${Versions.compose}" - - // Layout and Navigation - const val composeConstraintLayout = - "androidx.constraintlayout:constraintlayout-compose:${Versions.constraintLayoutCompose}" - const val composePaging = "androidx.paging:paging-compose:${Versions.pagingCompose}" - const val composeViewModel = - "androidx.lifecycle:lifecycle-viewmodel-compose:${Versions.androidLifecycleGrouped}" - const val composeActivity = "androidx.activity:activity-compose:${Versions.activityCompose}" - const val composeLottie = "com.airbnb.android:lottie-compose:${Versions.lottie}" - const val composeNavigation = "androidx.navigation:navigation-compose:${Versions.navCompose}" - - const val composeUiTestJunit4 = "androidx.compose.ui:ui-test-junit4:${Versions.compose}" - const val composeUiTestManifest = "androidx.compose.ui:ui-test-manifest:${Versions.compose}" - - /** - * Custom fling behaviour - * refer to https://github.com/iamjosephmj/flinger for more insights on the library - */ - const val flinger = "com.github.iamjosephmj:flinger:${Versions.flinger}" - - const val androidPagingRuntime = "androidx.paging:paging-runtime-ktx:${Versions.paging}" - const val lottie = "com.airbnb.android:lottie:${Versions.lottie}" - const val androidExoPlayer = "com.google.android.exoplayer:exoplayer:${Versions.exoplayer}" - const val roomRuntime = "androidx.room:room-runtime:${Versions.room}" - const val roomKtx = "androidx.room:room-ktx:${Versions.room}" - const val roomCompiler = "androidx.room:room-compiler:${Versions.room}" - const val coilCompose = "io.coil-kt:coil-compose:${Versions.coilCompose}" - const val retrofit = "com.squareup.retrofit2:retrofit:${Versions.retrofit}" - const val okHttpLoggingInterceptor = - "com.squareup.okhttp3:logging-interceptor:${Versions.loggingInterceptor}" - const val gson = "com.google.code.gson:gson:${Versions.gson}" - const val okHttpGsonConverter = - "com.squareup.retrofit2:converter-gson:${Versions.retrofitConverterGson}" - const val coroutinesCore = - "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.coroutines}" - const val coroutinesAndroid = - "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.coroutines}" - const val viewModelKtx = - "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.androidLifecycleGrouped}" - const val liveDataKtx = - "androidx.lifecycle:lifecycle-livedata-ktx:${Versions.androidLifecycleGrouped}" - const val lifecycleRuntimeKtx = - "androidx.lifecycle:lifecycle-runtime-ktx:${Versions.androidLifecycleGrouped}" - const val lifecycleSavedState = - "androidx.lifecycle:lifecycle-viewmodel-savedstate:${Versions.androidLifecycleGrouped}" - const val junitJupiterApi = "org.junit.jupiter:junit-jupiter-api:${Versions.junitJupiterApi}" - const val junitJupiterEngine = - "org.junit.jupiter:junit-jupiter-engine:${Versions.junitJupiterEngine}" - const val truth = "com.google.truth:truth:${Versions.truth}" - const val kotlinJunit5 = "org.jetbrains.kotlin:kotlin-test-junit5:${Versions.kotlin}" - const val kotlinTest = "org.jetbrains.kotlin:kotlin-test:${Versions.kotlin}" - const val androidXJunit = "androidx.test.ext:junit:${Versions.androidXJunit}" - - const val biometric = "androidx.biometric:biometric:${Versions.biometric}" - -} diff --git a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/DependencyHandlerExtensions.kt b/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/DependencyHandlerExtensions.kt deleted file mode 100644 index 76dc8574..00000000 --- a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/DependencyHandlerExtensions.kt +++ /dev/null @@ -1,92 +0,0 @@ -package com.guru.composecookbook.build.dependencies - -import org.gradle.api.artifacts.dsl.DependencyHandler - -fun DependencyHandler.addComposeOfficialDependencies() { - composeOfficialDependencies.forEach { - add("implementation", it) - } -} - -fun DependencyHandler.addComposeThirdPartyDependencies() { - composeThirdPartyDependencies.forEach { - add("implementation", it) - } -} - -fun DependencyHandler.addComposeDebugDependencies() { - composeDebugDependencies.forEach { - add("debugImplementation", it) - } -} - -fun DependencyHandler.addKotlinDependencies() { - kotlinDependencies.forEach { - add("implementation", it) - } -} - -fun DependencyHandler.addKotlinTestDependencies() { - kotlinTestDependencies.forEach { - add("testImplementation", it) - } -} - -fun DependencyHandler.addDataDependencies() { - add("kapt", Dependencies.roomCompiler) - dataDependencies.forEach { - add("implementation", it) - } -} - -fun DependencyHandler.addCoreAndroidDependencies() { - coreAndroidDependencies.forEach { - add("implementation", it) - } -} - -fun DependencyHandler.addCoreAndroidUiDependencies() { - coreAndroidUiDependencies.forEach { - add("implementation", it) - } -} - -fun DependencyHandler.addGoogleAndroidDependencies() { - googleAndroidLibraries.forEach { - add("implementation", it) - } -} - -fun DependencyHandler.addNetworkingDependencies() { - networkingDependencies.forEach { - add("implementation", it) - } -} - -fun DependencyHandler.addJunit5TestDependencies() { - junit5TestDependencies.forEach { - add("testImplementation", it) - } -} - -fun DependencyHandler.addThirdPartyUnitTestsDependencies() { - thirdPartyUnitTestsDependencies.forEach { - add("testImplementation", it) - } -} - -fun DependencyHandler.addAndroidInstrumentationTestsDependencies() { - androidInstrumentationTestsDependencies.forEach { - add("androidTestImplementation", it) - } -} - -fun DependencyHandler.addThirdPartyUiDependencies() { - thirdPartyUiDependencies.forEach { - add("implementation", it) - } -} - -fun DependencyHandler.addBiometricDependency() { - add("implementation", Dependencies.biometric) -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/GroupedDependencies.kt b/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/GroupedDependencies.kt deleted file mode 100644 index 8cd6ff23..00000000 --- a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/GroupedDependencies.kt +++ /dev/null @@ -1,99 +0,0 @@ -package com.guru.composecookbook.build.dependencies - -internal val composeOfficialDependencies = listOf( - Dependencies.composeUi, - Dependencies.composeUiTooling, - Dependencies.composeMaterial, - Dependencies.composeMaterial3, - Dependencies.composeMaterialIconsExtended, - Dependencies.composeRuntimeLivedata, - Dependencies.composeConstraintLayout, - Dependencies.composePaging, - Dependencies.composeViewModel, - Dependencies.composeActivity, - Dependencies.composeNavigation, - Dependencies.composeRuntime, -) - -internal val composeThirdPartyDependencies = listOf( - Dependencies.fontAwesomeCompose, - Dependencies.composeLottie, - Dependencies.flinger -) - -internal val composeDebugDependencies = listOf( - Dependencies.kotlinReflect, - Dependencies.composeUiTooling, - Dependencies.composeUiTestManifest -) - -internal val kotlinDependencies = listOf( - Dependencies.kotlinStandardLibraryJdk8, - Dependencies.coroutinesCore, - Dependencies.coroutinesAndroid -) - -internal val kotlinTestDependencies = listOf( - Dependencies.kotlinTest, - Dependencies.kotlinJunit5 -) - -internal val dataDependencies = listOf( - Dependencies.roomRuntime, - Dependencies.roomKtx, - Dependencies.androidPagingRuntime, - Dependencies.composeRuntime -) - -internal val coreAndroidDependencies = listOf( - Dependencies.androidMultiDex, - Dependencies.androidCoreKtx, - Dependencies.androidAppCompat, -) - -internal val coreAndroidUiDependencies = listOf( - Dependencies.googleMaterial, - Dependencies.androidPaletteKtx, - Dependencies.androidPagingRuntime, - Dependencies.lifecycleRuntimeKtx, - Dependencies.lifecycleSavedState, - Dependencies.liveDataKtx, - Dependencies.viewModelKtx -) - -internal val googleAndroidLibraries = listOf( - Dependencies.androidExoPlayer, - Dependencies.playServicesAds, - Dependencies.playServicesMaps - // Removed Dependencies.googleMaps as it's not available -) - -internal val networkingDependencies = listOf( - Dependencies.retrofit, - Dependencies.okHttpLoggingInterceptor, - Dependencies.gson, - Dependencies.okHttpGsonConverter, -) - -internal val junit5TestDependencies = listOf( - Dependencies.junitJupiterApi, - Dependencies.junitJupiterEngine -) - -internal val thirdPartyUnitTestsDependencies = listOf( - Dependencies.truth, -) - -internal val androidInstrumentationTestsDependencies = listOf( - Dependencies.composeUiTestJunit4, - Dependencies.composeActivity, - Dependencies.androidXJunit, - Dependencies.composeUiTestManifest -) - -internal val thirdPartyUiDependencies = listOf( - Dependencies.coilCompose, - Dependencies.lottie, - Dependencies.composeLottie -) - diff --git a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/Versions.kt b/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/Versions.kt deleted file mode 100644 index 646236b8..00000000 --- a/buildSrc/src/main/kotlin/com/guru/composecookbook/build/dependencies/Versions.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.guru.composecookbook.build.dependencies - -internal object Versions { - const val compose = "1.6.1" // Latest stable Compose UI version - const val composeCompiler = "1.5.8" // Latest compiler compatible with Kotlin 1.9.22 - const val activityCompose = "1.8.2" // Latest stable - const val pagingCompose = "3.2.1" // Latest stable - const val navCompose = "2.7.7" // Latest stable navigation - const val constraintLayoutCompose = "1.1.0" // Latest stable - const val fontAwesomeCompose = "1.1.0" // Keeping as is since it's a third-party lib - const val coilCompose = "2.5.0" // Latest stable - const val kotlin = "1.9.22" // Latest stable kotlin compatible with Compose - const val coroutines = "1.7.3" // Latest stable - const val androidLifecycleGrouped = "2.7.0" // Latest stable - const val flinger = "1.0.5" // Keeping as is since it's a third-party lib - const val paging = "3.2.1" // Latest stable - const val lottie = "6.3.0" // Latest stable - const val room = "2.6.1" // Latest stable - const val coreKtx = "1.12.0" // Latest stable - const val appcompat = "1.6.1" // Latest stable - const val paletteKtx = "1.0.0" // Latest stable - const val material = "1.11.0" // Latest stable Material Design 1 - const val material3 = "1.2.1" // Latest stable Material 3 - const val playServicesAds = "22.5.0" // Latest stable - const val googleMaps = "2.0.1" // Latest Google Maps version - const val playServicesMaps = "18.2.0" // Latest stable - const val exoplayer = "2.19.1" // Latest stable - const val loggingInterceptor = "4.12.0" // Latest stable - const val retrofit = "2.9.0" // Latest stable - const val gson = "2.10.1" // Latest stable - const val retrofitConverterGson = "2.9.0" // Latest stable - const val multidex = "2.0.1" // No new versions expected - const val junitJupiterApi = "5.10.1" // Latest stable - const val junitJupiterEngine = "5.10.1" // Latest stable - const val truth = "1.1.3" // Latest stable - const val androidXJunit = "1.1.5" // Latest stable - const val biometric = "1.2.0-alpha05" // Latest stable -} diff --git a/components/carousel/build.gradle.kts b/components/carousel/build.gradle.kts index 414d6e02..885fb2e9 100644 --- a/components/carousel/build.gradle.kts +++ b/components/carousel/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -15,5 +13,5 @@ dependencies { implementation(project(":theme")) implementation(project(":data")) - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } diff --git a/components/charts/build.gradle.kts b/components/charts/build.gradle.kts index 0d357ec9..03e4b4eb 100644 --- a/components/charts/build.gradle.kts +++ b/components/charts/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -15,6 +12,6 @@ android { dependencies { implementation(project(":theme")) - addComposeOfficialDependencies() - addCoreAndroidUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android.ui) } \ No newline at end of file diff --git a/components/colorpicker/build.gradle.kts b/components/colorpicker/build.gradle.kts index 63f0c965..cd30da41 100644 --- a/components/colorpicker/build.gradle.kts +++ b/components/colorpicker/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -14,5 +12,5 @@ android { dependencies { implementation(project(":theme")) - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } diff --git a/components/comingsoon/build.gradle.kts b/components/comingsoon/build.gradle.kts index 94bda9d1..8858eb07 100644 --- a/components/comingsoon/build.gradle.kts +++ b/components/comingsoon/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -15,5 +13,5 @@ dependencies { implementation(project(":animations:lottie")) implementation(project(":theme")) - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } diff --git a/components/fab/build.gradle.kts b/components/fab/build.gradle.kts index 731e67c1..31bef427 100644 --- a/components/fab/build.gradle.kts +++ b/components/fab/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -12,5 +10,5 @@ android { } dependencies { - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } diff --git a/components/tags/build.gradle.kts b/components/tags/build.gradle.kts index 562d8bcb..77f5ea2c 100644 --- a/components/tags/build.gradle.kts +++ b/components/tags/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -14,5 +12,5 @@ android { dependencies { implementation(project(":theme")) - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } diff --git a/components/verticalgrid/build.gradle.kts b/components/verticalgrid/build.gradle.kts index eeee8241..6f1ef843 100644 --- a/components/verticalgrid/build.gradle.kts +++ b/components/verticalgrid/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -12,5 +10,5 @@ android { } dependencies { - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } diff --git a/data/build.gradle.kts b/data/build.gradle.kts index f84d3d04..4e62574c 100644 --- a/data/build.gradle.kts +++ b/data/build.gradle.kts @@ -10,5 +10,5 @@ android { } dependencies { - implementation(com.guru.composecookbook.build.dependencies.Dependencies.composeRuntime) + implementation(libs.compose.runtime) } diff --git a/demos/cryptoapp/app/build.gradle.kts b/demos/cryptoapp/app/build.gradle.kts index 394a40b4..616cb317 100644 --- a/demos/cryptoapp/app/build.gradle.kts +++ b/demos/cryptoapp/app/build.gradle.kts @@ -1,9 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addComposeThirdPartyDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies -import com.guru.composecookbook.build.dependencies.addThirdPartyUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -25,13 +19,13 @@ dependencies { 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") diff --git a/demos/cryptoapp/data/build.gradle.kts b/demos/cryptoapp/data/build.gradle.kts index e0863d77..1e303d22 100644 --- a/demos/cryptoapp/data/build.gradle.kts +++ b/demos/cryptoapp/data/build.gradle.kts @@ -1,7 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addCoreAndroidDependencies -import com.guru.composecookbook.build.dependencies.addDataDependencies -import com.guru.composecookbook.build.dependencies.addNetworkingDependencies - plugins { /** * See [common-kotlin-module-configs-script-plugin.gradle.kts] file @@ -14,7 +10,13 @@ android { } dependencies { - addCoreAndroidDependencies() - addNetworkingDependencies() - addDataDependencies() + implementation(libs.bundles.core.android) + implementation(libs.bundles.networking) + + // Room + Paging data layer + kapt(libs.androidx.room.compiler) + implementation(libs.androidx.room.runtime) + implementation(libs.androidx.room.ktx) + implementation(libs.androidx.paging.runtime) + implementation(libs.compose.runtime) } diff --git a/demos/datingapp/build.gradle.kts b/demos/datingapp/build.gradle.kts index e58d0fdb..ab6c403f 100644 --- a/demos/datingapp/build.gradle.kts +++ b/demos/datingapp/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -18,6 +15,6 @@ dependencies { implementation(project(":data")) implementation(project(":theme")) - addComposeOfficialDependencies() - addCoreAndroidUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android.ui) } diff --git a/demos/gmail/build.gradle.kts b/demos/gmail/build.gradle.kts index 28e46614..1e3c6474 100644 --- a/demos/gmail/build.gradle.kts +++ b/demos/gmail/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -17,6 +14,6 @@ dependencies { implementation(project(":data")) implementation(project(":theme")) - addComposeOfficialDependencies() - addCoreAndroidUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android.ui) } diff --git a/demos/instagram/build.gradle.kts b/demos/instagram/build.gradle.kts index 88ce3dca..6827d943 100644 --- a/demos/instagram/build.gradle.kts +++ b/demos/instagram/build.gradle.kts @@ -1,7 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addComposeThirdPartyDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -17,7 +13,7 @@ dependencies { implementation(project(":data")) implementation(project(":theme")) - addComposeOfficialDependencies() - addComposeThirdPartyDependencies() - addCoreAndroidUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.compose.third.party) + implementation(libs.bundles.core.android.ui) } diff --git a/demos/meditation/build.gradle.kts b/demos/meditation/build.gradle.kts index 7df09b54..955876a7 100644 --- a/demos/meditation/build.gradle.kts +++ b/demos/meditation/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -16,10 +13,10 @@ dependencies { implementation(project(":theme")) implementation(project(":components:verticalgrid")) - addComposeOfficialDependencies() - addCoreAndroidUiDependencies() - + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android.ui) + // Test dependencies testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.5") + androidTestImplementation(libs.androidx.junit) } diff --git a/demos/moviesapp/app/build.gradle.kts b/demos/moviesapp/app/build.gradle.kts index fdce96ab..9c3d1d81 100644 --- a/demos/moviesapp/app/build.gradle.kts +++ b/demos/moviesapp/app/build.gradle.kts @@ -1,9 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addComposeThirdPartyDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies -import com.guru.composecookbook.build.dependencies.addThirdPartyUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -22,11 +16,11 @@ dependencies { implementation(project(":theme")) implementation(project(":data")) - 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) } \ No newline at end of file diff --git a/demos/moviesapp/data/build.gradle.kts b/demos/moviesapp/data/build.gradle.kts index ef2dca28..0c45bf7b 100644 --- a/demos/moviesapp/data/build.gradle.kts +++ b/demos/moviesapp/data/build.gradle.kts @@ -1,7 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addCoreAndroidDependencies -import com.guru.composecookbook.build.dependencies.addDataDependencies -import com.guru.composecookbook.build.dependencies.addNetworkingDependencies - plugins { /** * See [common-kotlin-module-configs-script-plugin.gradle.kts] file @@ -14,7 +10,13 @@ android { } dependencies { - addCoreAndroidDependencies() - addNetworkingDependencies() - addDataDependencies() + implementation(libs.bundles.core.android) + implementation(libs.bundles.networking) + + // Room + Paging data layer + kapt(libs.androidx.room.compiler) + implementation(libs.androidx.room.runtime) + implementation(libs.androidx.room.ktx) + implementation(libs.androidx.paging.runtime) + implementation(libs.compose.runtime) } diff --git a/demos/paint/build.gradle.kts b/demos/paint/build.gradle.kts index 7a14df06..823dfd0e 100644 --- a/demos/paint/build.gradle.kts +++ b/demos/paint/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -16,6 +13,6 @@ dependencies { implementation(project(":theme")) implementation(project(":components:colorpicker")) - addComposeOfficialDependencies() - addCoreAndroidUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android.ui) } diff --git a/demos/spotify/build.gradle.kts b/demos/spotify/build.gradle.kts index a5b119ca..45468743 100644 --- a/demos/spotify/build.gradle.kts +++ b/demos/spotify/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -17,6 +14,6 @@ dependencies { implementation(project(":data")) implementation(project(":theme")) - addComposeOfficialDependencies() - addCoreAndroidUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android.ui) } diff --git a/demos/tiktok/build.gradle.kts b/demos/tiktok/build.gradle.kts index f72a95c0..3456f191 100644 --- a/demos/tiktok/build.gradle.kts +++ b/demos/tiktok/build.gradle.kts @@ -1,8 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies -import com.guru.composecookbook.build.dependencies.addGoogleAndroidDependencies -import com.guru.composecookbook.build.dependencies.addThirdPartyUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -20,8 +15,8 @@ dependencies { implementation(project(":data")) implementation(project(":theme")) - addComposeOfficialDependencies() - addCoreAndroidUiDependencies() - addThirdPartyUiDependencies() - addGoogleAndroidDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android.ui) + implementation(libs.bundles.third.party.ui) + implementation(libs.bundles.google.android) } diff --git a/demos/twitter/build.gradle.kts b/demos/twitter/build.gradle.kts index cbdc6aef..6ca2cde6 100644 --- a/demos/twitter/build.gradle.kts +++ b/demos/twitter/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -16,6 +13,6 @@ dependencies { implementation(project(":data")) implementation(project(":theme")) - addComposeOfficialDependencies() - addCoreAndroidUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android.ui) } diff --git a/demos/youtube/build.gradle.kts b/demos/youtube/build.gradle.kts index ab8712b2..30706a5d 100644 --- a/demos/youtube/build.gradle.kts +++ b/demos/youtube/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -16,6 +13,6 @@ dependencies { implementation(project(":data")) implementation(project(":theme")) - addComposeOfficialDependencies() - addCoreAndroidUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.core.android.ui) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..afe3b283 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,141 @@ +[versions] +agp = "8.2.2" +kotlin = "1.9.22" +compose = "1.6.1" +compose-compiler = "1.5.8" +activity-compose = "1.8.2" +paging-compose = "3.2.1" +nav-compose = "2.7.7" +constraint-layout-compose = "1.1.0" +font-awesome-compose = "1.1.0" +coil-compose = "2.5.0" +coroutines = "1.7.3" +lifecycle = "2.7.0" +flinger = "1.0.5" +paging = "3.2.1" +lottie = "6.3.0" +room = "2.6.1" +core-ktx = "1.12.0" +appcompat = "1.6.1" +palette-ktx = "1.0.0" +material = "1.11.0" +material3 = "1.2.1" +play-services-ads = "22.5.0" +play-services-maps = "18.2.0" +exoplayer = "2.19.1" +logging-interceptor = "4.12.0" +retrofit = "2.9.0" +gson = "2.10.1" +multidex = "2.0.1" +junit-jupiter = "5.10.1" +truth = "1.1.3" +androidx-junit = "1.1.5" +biometric = "1.2.0-alpha05" + +[libraries] +kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } +kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } +kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } +kotlin-test-junit5 = { module = "org.jetbrains.kotlin:kotlin-test-junit5", version.ref = "kotlin" } + +font-awesome-compose = { module = "com.github.Gurupreet:FontAwesomeCompose", version.ref = "font-awesome-compose" } + +androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } +androidx-palette-ktx = { module = "androidx.palette:palette-ktx", version.ref = "palette-ktx" } +androidx-multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" } +androidx-paging-runtime = { module = "androidx.paging:paging-runtime-ktx", version.ref = "paging" } +androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" } +androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" } +androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" } +androidx-biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" } +androidx-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-junit" } + +google-material = { module = "com.google.android.material:material", version.ref = "material" } +play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "play-services-ads" } +play-services-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "play-services-maps" } +exoplayer = { module = "com.google.android.exoplayer:exoplayer", version.ref = "exoplayer" } + +compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" } +compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" } +compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" } +compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "compose" } +compose-material = { module = "androidx.compose.material:material", version.ref = "compose" } +compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" } +compose-material3-window-size = { module = "androidx.compose.material3:material3-window-size-class", version.ref = "material3" } +compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose" } +compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "compose" } +compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata", version.ref = "compose" } +compose-constraint-layout = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "constraint-layout-compose" } +compose-paging = { module = "androidx.paging:paging-compose", version.ref = "paging-compose" } +compose-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" } +compose-activity = { module = "androidx.activity:activity-compose", version.ref = "activity-compose" } +compose-navigation = { module = "androidx.navigation:navigation-compose", version.ref = "nav-compose" } +compose-lottie = { module = "com.airbnb.android:lottie-compose", version.ref = "lottie" } + +flinger = { module = "com.github.iamjosephmj:flinger", version.ref = "flinger" } +lottie = { module = "com.airbnb.android:lottie", version.ref = "lottie" } +coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil-compose" } + +retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } +retrofit-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" } +okhttp-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "logging-interceptor" } +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } + +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } +kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } + +lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" } +lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle" } +lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" } +lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "lifecycle" } + +junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit-jupiter" } +junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit-jupiter" } +truth = { module = "com.google.truth:truth", version.ref = "truth" } + +[bundles] +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"] +kotlin-test = ["kotlin-test", "kotlin-test-junit5"] +core-android = ["androidx-multidex", "androidx-core-ktx", "androidx-appcompat"] +core-android-ui = [ + "google-material", + "androidx-palette-ktx", + "androidx-paging-runtime", + "lifecycle-runtime-ktx", + "lifecycle-viewmodel-savedstate", + "lifecycle-livedata-ktx", + "lifecycle-viewmodel-ktx", +] +google-android = ["exoplayer", "play-services-ads", "play-services-maps"] +networking = ["retrofit", "okhttp-logging-interceptor", "gson", "retrofit-converter-gson"] +junit5-test = ["junit-jupiter-api", "junit-jupiter-engine"] +third-party-ui = ["coil-compose", "lottie", "compose-lottie"] +android-instrumentation-test = [ + "compose-ui-test-junit4", + "compose-activity", + "androidx-junit", + "compose-ui-test-manifest", +] + +[plugins] +android-application = { id = "com.android.application", version.ref = "agp" } +android-library = { id = "com.android.library", version.ref = "agp" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 7aadc5f2..fd8ec670 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,5 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + rootProject.name = "ComposeCookBook" include(":app") include(":demos:instagram") diff --git a/templates/cascademenu/build.gradle.kts b/templates/cascademenu/build.gradle.kts index e820af04..75579248 100644 --- a/templates/cascademenu/build.gradle.kts +++ b/templates/cascademenu/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addComposeThirdPartyDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -17,6 +14,6 @@ dependencies { implementation(project(":data")) implementation(project(":components:tags")) - addComposeOfficialDependencies() - addComposeThirdPartyDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.compose.third.party) } \ No newline at end of file diff --git a/templates/login/build.gradle.kts b/templates/login/build.gradle.kts index ca88dc05..43504b07 100644 --- a/templates/login/build.gradle.kts +++ b/templates/login/build.gradle.kts @@ -1,6 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addComposeThirdPartyDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -19,6 +16,6 @@ dependencies { implementation(project(":components:tags")) implementation(project(":templates:onboarding")) - addComposeOfficialDependencies() - addComposeThirdPartyDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.compose.third.party) } \ No newline at end of file diff --git a/templates/onboarding/build.gradle.kts b/templates/onboarding/build.gradle.kts index 43c14267..8355af9e 100644 --- a/templates/onboarding/build.gradle.kts +++ b/templates/onboarding/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -15,5 +13,5 @@ dependencies { implementation(project(":components:carousel")) implementation(project(":animations:lottie")) - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } \ No newline at end of file diff --git a/templates/paymentcard/build.gradle.kts b/templates/paymentcard/build.gradle.kts index a3abe30a..7359593c 100644 --- a/templates/paymentcard/build.gradle.kts +++ b/templates/paymentcard/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -14,5 +12,5 @@ android { dependencies { implementation(project(":theme")) - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } \ No newline at end of file diff --git a/templates/pinlock/build.gradle.kts b/templates/pinlock/build.gradle.kts index fb10e01f..5e5b3fdb 100644 --- a/templates/pinlock/build.gradle.kts +++ b/templates/pinlock/build.gradle.kts @@ -1,8 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addBiometricDependency -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addComposeThirdPartyDependencies - - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -21,7 +16,7 @@ dependencies { implementation(project(":components:tags")) implementation(project(":templates:onboarding")) - addComposeOfficialDependencies() - addComposeThirdPartyDependencies() - addBiometricDependency() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.compose.third.party) + implementation(libs.androidx.biometric) } \ No newline at end of file diff --git a/templates/profile/build.gradle.kts b/templates/profile/build.gradle.kts index dbb32454..3f7a8367 100644 --- a/templates/profile/build.gradle.kts +++ b/templates/profile/build.gradle.kts @@ -1,5 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -16,5 +14,5 @@ dependencies { implementation(project(":data")) implementation(project(":components:tags")) - addComposeOfficialDependencies() + implementation(libs.bundles.compose.official) } \ No newline at end of file diff --git a/theme/build.gradle.kts b/theme/build.gradle.kts index ccbeafb1..91656d08 100644 --- a/theme/build.gradle.kts +++ b/theme/build.gradle.kts @@ -1,7 +1,3 @@ -import com.guru.composecookbook.build.dependencies.addComposeOfficialDependencies -import com.guru.composecookbook.build.dependencies.addComposeThirdPartyDependencies -import com.guru.composecookbook.build.dependencies.addCoreAndroidUiDependencies - plugins { /** * See [common-compose-module-configs-script-plugin.gradle.kts] file @@ -14,7 +10,7 @@ android { } dependencies { - addComposeOfficialDependencies() - addComposeThirdPartyDependencies() - addCoreAndroidUiDependencies() + implementation(libs.bundles.compose.official) + implementation(libs.bundles.compose.third.party) + implementation(libs.bundles.core.android.ui) } \ No newline at end of file