1
0

Compare commits

...

11 Commits

4 changed files with 77 additions and 39 deletions

View File

@ -33,29 +33,36 @@ object Dependencies {
*/
object AndroidX {
/**
* [androidx.tech](https://androidx.tech/artifacts/appcompat/appcompat/)
*
* [Changelog](https://developer.android.com/jetpack/androidx/releases/appcompat)
* [Changelog](https://developer.android.com/jetpack/androidx/releases/core)
*/
val appcompat = Dependency("androidx.appcompat:appcompat", "1.6.1")
val core = Dependency("androidx.core:core-ktx", "1.13.1")
/**
* [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")
/**
* [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")
@ -65,8 +72,6 @@ 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")
@ -79,8 +84,6 @@ 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")
@ -101,15 +104,16 @@ 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")
/**
* [androidx.tech](https://androidx.tech/artifacts/test.espresso/espresso-core/)
*
* [Documentation](https://developer.android.com/training/testing)
*/
val junit = Dependency("androidx.test.ext:junit-ktx", "1.1.5")
/**
* [Documentation](https://developer.android.com/training/testing/espresso)
*/
object Espresso {
@ -120,29 +124,26 @@ object Dependencies {
}
/**
* [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")
/**
* [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")
/**
* [androidx.tech](https://androidx.tech/artifacts/test/orchestrator/)
*
* [Documentation](https://developer.android.com/training/testing/junit-rules)
*/
val compose = Dependency("androidx.compose.ui:ui-test-junit4", "1.6.0")
/**
* [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")
@ -157,15 +158,19 @@ object Dependencies {
*/
val materialDesign = Dependency("com.google.android.material:material", "1.11.0")
/**
* [androidx.tech](https://androidx.tech/artifacts/lifecycle/lifecycle-viewmodel/)
*/
object Lifecycle {
private const val version = "2.6.1"
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)
}
}
/**
@ -181,6 +186,21 @@ object Dependencies {
*/
val junit = Dependency("junit:junit", "4.13")
/**
* Truth makes your test assertions and failure messages more readable.
* Similar to AssertJ, it natively supports many JDK and Guava types,
* and it is extensible to others.
*
* [Documentation](https://truth.dev/)
*
* [Github](https://github.com/google/truth)
*
* [Apache License 2.0](https://github.com/google/truth/blob/master/LICENSE)
*
* [Changelog](https://github.com/google/truth/releases)
*/
val truth = Dependency("com.google.truth:truth", "1.3.0")
/**
* Kaspresso is a framework for Android UI testing. Based on Espresso and UI Automator.
*
@ -198,4 +218,3 @@ object Dependencies {
val composeSupport = Dependency("com.kaspersky.android-components:kaspresso-compose-support", version)
}
}

View File

@ -25,10 +25,9 @@ fun DependencyHandler.ksp(dependency: Dependency) {
}
fun DependencyHandler.defaultLibrary() {
api(Dependencies.AndroidX.core)
api(Dependencies.AndroidX.appcompat)
api(Dependencies.AndroidX.materialDesign)
testImplementation(Dependencies.junit)
androidTestImplementation(Dependencies.Kaspresso.core)
}
private object Type {

View File

@ -1,16 +1,23 @@
import org.gradle.kotlin.dsl.version
import org.gradle.plugin.use.PluginDependenciesSpec
import org.gradle.plugin.use.PluginDependencySpec
val PluginDependenciesSpec.androidApplication: PluginDependencySpec
get() = id(Plugin.Id.Android.application)
val PluginDependenciesSpec.androidLibrary: PluginDependencySpec
get() = id(Plugin.Id.Android.library)
val PluginDependenciesSpec.kotlinJvm: PluginDependencySpec
get() = id(Plugin.Id.Kotlin.jvm)
val PluginDependenciesSpec.kotlinAndroid: PluginDependencySpec
get() = id(Plugin.Id.Kotlin.android)
val PluginDependenciesSpec.kotlinParcelize: PluginDependencySpec
get() = id(Plugin.Id.Kotlin.parcelize)
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)
object Plugin {
object Id {
@ -20,6 +27,11 @@ object Plugin {
* [Changelog](https://developer.android.com/studio/releases/gradle-plugin)
*/
const val application = "com.android.application"
/**
* [Documentation](https://google.github.io/android-gradle-dsl/current/)
* [Changelog](https://developer.android.com/studio/releases/gradle-plugin)
*/
const val library = "com.android.library"
}
object Kotlin {
@ -27,6 +39,10 @@ object Plugin {
* Plugin published in https://plugins.gradle.org/
*/
const val jvm = "org.jetbrains.kotlin.jvm"
/**
* Plugin published in https://plugins.gradle.org/
*/
const val android = "org.jetbrains.kotlin.android"
/**
* Plugin published in https://plugins.gradle.org/
@ -36,12 +52,16 @@ object Plugin {
/**
* Plugin published in https://plugins.gradle.org/
*/
const val annotationProcessor = "kapt"
const val annotationProcessor = "org.jetbrains.kotlin.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 gradle = "8.2.1"
const val agp = "8.7.1"
object Kotlin {
@ -26,9 +26,10 @@ object Version {
*
* [Changelog](https://kotlinlang.org/releases.html)
*/
const val language = "1.9.10"
const val language = "2.0.21"
val javaSource = JavaVersion.VERSION_1_8
val javaSource = JavaVersion.VERSION_11
const val jvmTarget = "11"
}
object Android {
@ -38,5 +39,4 @@ object Version {
const val target = 34
}
}
}