1
0

Update dependecies and add compose config

This commit is contained in:
2025-10-26 23:13:35 +03:00
parent ec48d5f6b8
commit c6a633a090
5 changed files with 88 additions and 48 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -33,36 +33,36 @@ object Dependencies {
*/
object AndroidX {
/**
* [androidx.tech](https://androidx.tech/artifacts/core/core-ktx/)
*
* [Changelog](https://developer.android.com/jetpack/androidx/releases/core)
*/
val core = Dependency("androidx.core:core-ktx", "1.13.1")
val core = Dependency("androidx.core:core-ktx", "1.17.0")
/**
* [androidx.tech](https://androidx.tech/artifacts/appcompat/appcompat/)
*
* [Changelog](https://developer.android.com/jetpack/androidx/releases/appcompat)
*/
val appcompat = Dependency("androidx.appcompat:appcompat", "1.7.0")
/**
* [Changelog](https://developer.android.com/jetpack/androidx/releases/activity)
*/
val activity = Dependency("androidx.activity:activity", "1.9.3")
/**
* [Changelog](https://developer.android.com/jetpack/androidx/releases/fragment)
*/
val fragment = Dependency("androidx.fragment:fragment-ktx", "1.8.4")
val appcompat = Dependency("androidx.appcompat:appcompat", "1.6.1")
/**
* [androidx.tech](https://androidx.tech/artifacts/recyclerview/recyclerview/)
*
* [Changelog](https://developer.android.com/jetpack/androidx/releases/recyclerview)
*/
val recyclerView = Dependency("androidx.recyclerview:recyclerview", "1.3.2")
/**
* [androidx.tech](https://androidx.tech/artifacts/cardview/cardview/)
*
* [Changelog](https://developer.android.com/jetpack/androidx/releases/cardview)
*/
val cardView = Dependency("androidx.cardview:cardview", "1.0.0")
/**
* [androidx.tech](https://androidx.tech/artifacts/gridlayout/gridlayout/)
*
* [Changelog](https://developer.android.com/jetpack/androidx/releases/gridlayout)
*/
val gridLayout = Dependency("androidx.gridlayout:gridlayout", "1.0.0")
@@ -72,6 +72,8 @@ object Dependencies {
*
* [Documentation](https://developer.android.com/reference/android/support/constraint/ConstraintLayout)
*
* [androidx.tech](https://androidx.tech/artifacts/constraintlayout/constraintlayout/)
*
* [Changelog](https://developer.android.com/jetpack/androidx/releases/constraintlayout)
*/
val constraintLayout = Dependency("androidx.constraintlayout:constraintlayout", "2.1.4")
@@ -84,6 +86,8 @@ object Dependencies {
*
* [Documentation](https://developer.android.com/jetpack/androidx/releases/coordinatorlayout)
*
* [androidx.tech](https://androidx.tech/artifacts/coordinatorlayout/coordinatorlayout/)
*
* [Changelog](https://developer.android.com/jetpack/androidx/releases/coordinatorlayout)
*/
val coordinatorLayout = Dependency("androidx.coordinatorlayout:coordinatorlayout", "1.2.0")
@@ -104,46 +108,62 @@ object Dependencies {
object Testing {
/**
* [androidx.tech](https://androidx.tech/artifacts/test/core/)
*
* [Documentation](https://developer.android.com/training/testing)
*/
val core = Dependency("androidx.test:core", "1.5.0")
val core = Dependency("androidx.test:core", "1.7.0")
/**
* [androidx.tech](https://androidx.tech/artifacts/test/core/)
*
* [Documentation](https://developer.android.com/training/testing)
*/
val junit = Dependency("androidx.test.ext:junit-ktx", "1.1.5")
val junit = Dependency("androidx.test.ext:junit-ktx", "1.3.0")
/**
* [androidx.tech](https://androidx.tech/artifacts/test.espresso/espresso-core/)
*
* [Documentation](https://developer.android.com/training/testing/espresso)
*/
object Espresso {
private const val version = "3.5.1"
private const val version = "3.7.0"
val core = Dependency("androidx.test.espresso:espresso-core", version)
val intents = Dependency("androidx.test.espresso:espresso-intents", version)
val contrib = Dependency("androidx.test.espresso:espresso-contrib", version)
}
/**
* [androidx.tech](https://androidx.tech/artifacts/test/runner/)
*
* [Documentation](https://developer.android.com/training/testing/junit-runner)
*/
val runner = Dependency("androidx.test:runner", "1.5.2")
val runner = Dependency("androidx.test:runner", "1.7.0")
/**
* [androidx.tech](https://androidx.tech/artifacts/test/rules/)
*
* [Documentation](https://developer.android.com/training/testing/junit-rules)
*/
val rules = Dependency("androidx.test:rules", "1.5.0")
val rules = Dependency("androidx.test:rules", "1.7.0")
/**
* [androidx.tech](https://androidx.tech/artifacts/test/rules/)
*
* [Documentation](https://developer.android.com/training/testing/junit-rules)
*/
val compose = Dependency("androidx.compose.ui:ui-test-junit4", "1.6.0")
val compose = Dependency("androidx.compose.ui:ui-test-junit4", "1.9.3")
/**
* [androidx.tech](https://androidx.tech/artifacts/test/orchestrator/)
*
* [Documentation](https://developer.android.com/training/testing/junit-runner#using-android-test-orchestrator)
*/
val orchestrator = Dependency("androidx.test:orchestrator", "1.4.2")
/**
* [androidx.tech](https://androidx.tech/artifacts/test.uiautomator/uiautomator/)
*
* [Documentation](https://developer.android.com/training/testing/ui-automator)
*/
val uiAutomator = Dependency("androidx.test.uiautomator:uiautomator", "2.2.0")
@@ -156,21 +176,17 @@ object Dependencies {
*
* [Changelog](https://github.com/material-components/material-components-android/releases)
*/
val materialDesign = Dependency("com.google.android.material:material", "1.11.0")
val materialDesign = Dependency("com.google.android.material:material", "1.13.0")
/**
* [androidx.tech](https://androidx.tech/artifacts/lifecycle/lifecycle-viewmodel/)
*/
object Lifecycle {
private const val version = "2.6.1"
private const val version = "2.9.4"
val viewModel = Dependency("androidx.lifecycle:lifecycle-viewmodel-ktx", version)
val common = Dependency("androidx.lifecycle:lifecycle-common", version)
}
object Navigation {
private const val version = "2.8.3"
val fragment = Dependency("androidx.navigation:navigation-fragment-ktx", version)
val navigationUi = Dependency("androidx.navigation:navigation-ui-ktx", version)
}
}
/**
@@ -184,7 +200,7 @@ object Dependencies {
*
* [Changelog](https://github.com/junit-team/junit4/wiki)
*/
val junit = Dependency("junit:junit", "4.13")
val junit = Dependency("junit:junit", "6.00")
/**
* Truth makes your test assertions and failure messages more readable.
@@ -199,7 +215,7 @@ object Dependencies {
*
* [Changelog](https://github.com/google/truth/releases)
*/
val truth = Dependency("com.google.truth:truth", "1.3.0")
val truth = Dependency("com.google.truth:truth", "1.4.5")
/**
* Kaspresso is a framework for Android UI testing. Based on Espresso and UI Automator.
@@ -213,8 +229,9 @@ object Dependencies {
* [Changelog](https://github.com/KasperskyLab/Kaspresso/releases)
*/
object Kaspresso {
private const val version = "1.5.3"
private const val version = "1.6.0"
val core = Dependency("com.kaspersky.android-components:kaspresso", version)
val composeSupport = Dependency("com.kaspersky.android-components:kaspresso-compose-support", version)
}
}

View File

@@ -4,6 +4,10 @@ fun DependencyHandler.implementation(dependency: Dependency) {
add(Type.IMPLEMENTATION, dependency.fullPath)
}
fun DependencyHandler.implementation(dependency: Any) {
add(Type.IMPLEMENTATION, dependency)
}
fun DependencyHandler.testImplementation(dependency: Dependency) {
add(Type.TEST_IMPLEMENTATION, dependency.fullPath)
}
@@ -12,6 +16,10 @@ fun DependencyHandler.androidTestImplementation(dependency: Dependency) {
add(Type.ANDROID_TEST_IMPLEMENTATION, dependency.fullPath)
}
fun DependencyHandler.androidTestImplementation(dependency: Any) {
add(Type.ANDROID_TEST_IMPLEMENTATION, dependency)
}
fun DependencyHandler.api(dependency: Dependency) {
add(Type.API, dependency.fullPath)
}
@@ -30,6 +38,20 @@ fun DependencyHandler.defaultLibrary() {
api(Dependencies.AndroidX.materialDesign)
}
fun DependencyHandler.defaultComposeLibrary() {
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.activity:activity-compose:1.8.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.5")
val composeBom = platform("androidx.compose:compose-bom:2025.10.00")
implementation(composeBom)
androidTestImplementation(composeBom)
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.foundation:foundation")
implementation("androidx.compose.ui:ui")
}
private object Type {
const val IMPLEMENTATION = "implementation"
const val TEST_IMPLEMENTATION = "testImplementation"

View File

@@ -1,4 +1,4 @@
import org.gradle.kotlin.dsl.version
import org.gradle.kotlin.dsl.kotlin
import org.gradle.plugin.use.PluginDependenciesSpec
import org.gradle.plugin.use.PluginDependencySpec
@@ -8,6 +8,8 @@ val PluginDependenciesSpec.androidLibrary: PluginDependencySpec
get() = id(Plugin.Id.Android.library)
val PluginDependenciesSpec.kotlinJvm: PluginDependencySpec
get() = id(Plugin.Id.Kotlin.jvm)
val PluginDependenciesSpec.composeCompiler: PluginDependencySpec
get() = id(Plugin.Id.Android.compose)
val PluginDependenciesSpec.kotlinAndroid: PluginDependencySpec
get() = id(Plugin.Id.Kotlin.android)
val PluginDependenciesSpec.kotlinParcelize: PluginDependencySpec
@@ -15,9 +17,7 @@ val PluginDependenciesSpec.kotlinParcelize: PluginDependencySpec
val PluginDependenciesSpec.kotlinAnnotationProcessor: PluginDependencySpec
get() = id(Plugin.Id.Kotlin.annotationProcessor)
val PluginDependenciesSpec.kotlinSerialization: PluginDependencySpec
get() = id(Plugin.Id.Kotlin.serialization)
val PluginDependenciesSpec.jetbrainsKotlinSerialization: PluginDependencySpec
get() = id(Plugin.Id.JetBrains.serialization)
get() = kotlin(Plugin.Id.Kotlin.serialization)
object Plugin {
object Id {
@@ -32,6 +32,11 @@ object Plugin {
* [Changelog](https://developer.android.com/studio/releases/gradle-plugin)
*/
const val library = "com.android.library"
/**
* [Documentation](https://google.github.io/android-gradle-dsl/current/)
* [Changelog](https://developer.android.com/studio/releases/gradle-plugin)
*/
const val compose = "org.jetbrains.kotlin.plugin.compose"
}
object Kotlin {
@@ -52,16 +57,12 @@ object Plugin {
/**
* Plugin published in https://plugins.gradle.org/
*/
const val annotationProcessor = "org.jetbrains.kotlin.kapt"
const val annotationProcessor = "kapt"
/**
* Plugin published in https://plugins.gradle.org/
*/
const val serialization = "plugin.serialization"
}
object JetBrains {
const val serialization = "org.jetbrains.kotlin.plugin.serialization"
}
}
}

View File

@@ -13,7 +13,7 @@ object Version {
*
* [Changelog](https://gradle.org/releases/)
*/
const val agp = "8.7.1"
const val agp = "8.13.0"
object Kotlin {
@@ -26,17 +26,17 @@ object Version {
*
* [Changelog](https://kotlinlang.org/releases.html)
*/
const val language = "2.0.21"
const val language = "2.2.20"
val javaSource = JavaVersion.VERSION_11
const val jvmTarget = "11"
val javaSource = JavaVersion.VERSION_21
const val jvmTarget = "21"
}
object Android {
object Sdk {
const val min = 24
const val compile = 34
const val target = 34
const val min = 26
const val compile = 36
const val target = 36
}
}
}