This commit updates various dependencies and reconfigures Gradle settings to newer versions and standards. Specific changes include: - Updated Android Gradle Plugin to 8.6.1 - Updated Kotlin to 2.1.20 - Updated Compose Compiler to 1.5.15 - Updated Compose BOM to 2025.04.01 - Updated Hilt to 2.54 - Updated KSP to 2.1.20-2.0.0 - Updated other dependencies like Navigation, Core-Ktx, Lifecycle, Activity Compose, Room, Paging, Coil, Serialization Json - Migrated to Java 21 - Applied Compose plugin - Updated target and compile SDK to 35 - updated jvm target to Java 21
46 lines
1.5 KiB
Kotlin
46 lines
1.5 KiB
Kotlin
package dev.adriankuta.convention
|
|
|
|
import com.android.build.gradle.BaseExtension
|
|
import org.gradle.api.Project
|
|
import org.gradle.api.artifacts.VersionCatalog
|
|
import org.gradle.api.artifacts.VersionCatalogsExtension
|
|
import org.gradle.kotlin.dsl.assign
|
|
import org.gradle.kotlin.dsl.configure
|
|
import org.gradle.kotlin.dsl.dependencies
|
|
import org.gradle.kotlin.dsl.getByType
|
|
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension
|
|
import kotlin.with
|
|
|
|
@Suppress("UnstableApiUsage")
|
|
internal fun Project.configureCompose(commonExtension: BaseExtension) {
|
|
commonExtension.apply {
|
|
buildFeatures.apply {
|
|
compose = true
|
|
}
|
|
|
|
with(pluginManager) {
|
|
apply("org.jetbrains.kotlin.plugin.compose")
|
|
}
|
|
|
|
val libs: VersionCatalog = extensions.getByType<VersionCatalogsExtension>().named("libs")
|
|
|
|
/*extensions.configure<ComposeCompilerGradlePluginExtension> {
|
|
}*/
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion =
|
|
libs.findVersion("composeCompiler").get().toString()
|
|
}
|
|
|
|
dependencies {
|
|
add("implementation", platform(libs.findLibrary("androidx.compose.bom").get()))
|
|
add(
|
|
"androidTestImplementation",
|
|
platform(libs.findLibrary("androidx.compose.bom").get())
|
|
)
|
|
//add("androidTestImplementation", libs.findLibrary("androidx.compose.ui.test.junit4").get())
|
|
//add("androidTestImplementation", project(":core:testing"))
|
|
}
|
|
}
|
|
}
|