/* * Copyright 2023 Md. Mahmudul Hasan Shohag * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ------------------------------------------------------------------------ * * Project: Why Not Compose! * Developed by: @ImaginativeShohag * * Md. Mahmudul Hasan Shohag * imaginativeshohag@gmail.com * * Source: https://github.com/ImaginativeShohag/Why-Not-Compose */ plugins { id(Libs.Android.library) kotlin("android") kotlin("kapt") id(Libs.Google.DevTools.ksp) } android { namespace = "org.imaginativeworld.whynotcompose.cms" compileSdk = BuildConfigConst.compileSdk defaultConfig { minSdk = BuildConfigConst.minSdk buildConfigField("String", "CMS_API_KEY", "\"${getLocalProperty(key = "CMS_API_KEY")}\"") } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn" // Enable experimental coroutines APIs, including Flow freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.Experimental" // Enable experimental compose APIs freeCompilerArgs = freeCompilerArgs + "-opt-in=androidx.compose.material3.ExperimentalMaterial3Api" freeCompilerArgs = freeCompilerArgs + "-opt-in=androidx.compose.animation.ExperimentalAnimationApi" freeCompilerArgs = freeCompilerArgs + "-opt-in=androidx.compose.ui.ExperimentalComposeUiApi" freeCompilerArgs = freeCompilerArgs + "-opt-in=androidx.compose.foundation.ExperimentalFoundationApi" } ksp { arg("room.schemaLocation", "$projectDir/schemas") } buildFeatures { buildConfig = true compose = true } composeOptions { kotlinCompilerExtensionVersion = Libs.AndroidX.Compose.compilerVersion } } dependencies { implementation(project(":base")) implementation(project(":common-ui-compose")) implementation(Libs.Kotlin.stdlib) implementation(Libs.AndroidX.coreKtx) implementation(Libs.AndroidX.appcompat) implementation(Libs.AndroidX.swipeRefreshLayout) // ---------------------------------------------------------------- // Compose // ---------------------------------------------------------------- implementation(platform(Libs.AndroidX.Compose.bom)) implementation(Libs.AndroidX.Compose.compiler) implementation(Libs.AndroidX.Compose.ui) implementation(Libs.AndroidX.Compose.uiUtil) // Tooling support (Previews, etc.) debugImplementation(Libs.AndroidX.Compose.tooling) implementation(Libs.AndroidX.Compose.toolingPreview) // Animation implementation(Libs.AndroidX.Compose.animation) // Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.) implementation(Libs.AndroidX.Compose.foundation) implementation(Libs.AndroidX.Compose.layout) // Material Design implementation(Libs.AndroidX.Compose.material3) implementation(Libs.AndroidX.Compose.material3WindowSizeClass) // Material design icons implementation(Libs.AndroidX.Compose.materialIconsCore) implementation(Libs.AndroidX.Compose.materialIconsExtended) // Integration with observables implementation(Libs.AndroidX.Compose.runtime) implementation(Libs.AndroidX.Compose.runtimeLivedata) implementation(Libs.AndroidX.Compose.runtimeTracing) // Compose Navigation Component implementation(Libs.AndroidX.Navigation.compose) // Constraint Layout implementation(Libs.AndroidX.ConstraintLayout.compose) // Integration with activities implementation(Libs.AndroidX.Activity.activityCompose) // Jetpack Compose Integration for ViewModel implementation(Libs.AndroidX.Lifecycle.viewModelCompose) // Paging implementation(Libs.AndroidX.Paging.compose) // Accompanist implementation(Libs.Accompanist.systemuicontroller) implementation(Libs.Accompanist.flowlayout) implementation(Libs.Accompanist.swipeRefresh) implementation(Libs.Accompanist.placeholder) // ---------------------------------------------------------------- // Timber implementation(Libs.timber) // Hilt implementation(Libs.Google.Hilt.core) kapt(Libs.Google.Hilt.compiler) implementation(Libs.AndroidX.Hilt.navigationCompose) // Retrofit implementation(Libs.Square.Retrofit.core) implementation(Libs.Square.okhttpLoggingInterceptor) // Moshi implementation(Libs.Square.Retrofit.converterMoshi) implementation(Libs.Square.Moshi.core) ksp(Libs.Square.Moshi.codegen) // Room Persistence Library implementation(Libs.AndroidX.Room.runtime) ksp(Libs.AndroidX.Room.compiler) // Room: Kotlin Extensions and Coroutines support for Room implementation(Libs.AndroidX.Room.ktx) // Coil implementation(Libs.Coil.compose) implementation(Libs.Coil.svg) }