Migrate gradle plugins to version catalog
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
alias(libs.plugins.android.application)
|
||||
kotlin("android")
|
||||
id(Libs.Google.kspPlugin)
|
||||
id("kotlin-parcelize")
|
||||
id("dagger.hilt.android.plugin")
|
||||
id(Libs.Kotlin.koverPlugin)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.hilt)
|
||||
alias(libs.plugins.kover)
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
+5
-25
@@ -2,31 +2,11 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id(Libs.GradleVersion.plugin) version Libs.GradleVersion.version
|
||||
id(Libs.Kotlin.koverPlugin) version Libs.Kotlin.koverVersion
|
||||
id(Libs.Google.kspPlugin) version Libs.Google.kspPluginVersion apply false
|
||||
}
|
||||
|
||||
buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath(Libs.androidGradlePlugin)
|
||||
classpath(Libs.Kotlin.gradlePlugin)
|
||||
classpath(Libs.Hilt.gradlePlugin)
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.dependencyUpdate) apply false
|
||||
alias(libs.plugins.hilt) apply false
|
||||
alias(libs.plugins.kotlin.jvm) apply false
|
||||
alias(libs.plugins.ksp) apply false
|
||||
}
|
||||
|
||||
subprojects {
|
||||
|
||||
@@ -2,7 +2,4 @@ plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
group = "com.kgurgul.buildlogic"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Gradle properties are not passed to included builds https://github.com/gradle/gradle/issues/2534
|
||||
org.gradle.parallel=true
|
||||
org.gradle.caching=true
|
||||
org.gradle.configureondemand=true
|
||||
@@ -1,7 +1,5 @@
|
||||
object Libs {
|
||||
|
||||
const val androidGradlePlugin = "com.android.tools.build:gradle:8.1.2"
|
||||
|
||||
const val timber = "com.jakewharton.timber:timber:5.0.1"
|
||||
|
||||
const val relinker = "com.getkeepsafe.relinker:relinker:1.4.5"
|
||||
@@ -18,9 +16,6 @@ object Libs {
|
||||
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
|
||||
|
||||
const val immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.6"
|
||||
|
||||
const val koverVersion = "0.7.4"
|
||||
const val koverPlugin = "org.jetbrains.kotlinx.kover"
|
||||
}
|
||||
|
||||
object Coroutines {
|
||||
@@ -91,8 +86,6 @@ object Libs {
|
||||
object Google {
|
||||
const val material = "com.google.android.material:material:1.9.0"
|
||||
const val gson = "com.google.code.gson:gson:2.10.1"
|
||||
const val kspPluginVersion = "1.9.10-1.0.13"
|
||||
const val kspPlugin = "com.google.devtools.ksp"
|
||||
}
|
||||
|
||||
object Hilt {
|
||||
@@ -107,9 +100,4 @@ object Libs {
|
||||
const val core = "org.mockito:mockito-core:5.6.0"
|
||||
const val kotlin = "org.mockito.kotlin:mockito-kotlin:5.1.0"
|
||||
}
|
||||
|
||||
object GradleVersion {
|
||||
const val version = "0.49.0"
|
||||
const val plugin = "com.github.ben-manes.versions"
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,12 @@ androidxComposeCompiler = "1.5.3"
|
||||
androidxHiltNavigationCompose = "1.0.0"
|
||||
androidxLifecycleRuntimeCompose = "2.6.2"
|
||||
androidxNavigation = "2.7.4"
|
||||
dependencyUpdate = "0.49.0"
|
||||
hilt = "2.48.1"
|
||||
kotlin = "1.9.10"
|
||||
kotlinxCoroutines = "1.7.3"
|
||||
kover = "0.7.4"
|
||||
ksp = "1.9.10-1.0.13"
|
||||
dependencyUpdate = "0.49.0"
|
||||
|
||||
[libraries]
|
||||
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidxActivity" }
|
||||
@@ -47,3 +48,5 @@ android-library = { id = "com.android.library", version.ref = "androidGradlePlug
|
||||
dependencyUpdate = { id = "com.github.ben-manes.versions", version.ref = "dependencyUpdate" }
|
||||
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
|
||||
@@ -1,2 +1,18 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "cpu-info"
|
||||
include(":app")
|
||||
|
||||
Reference in New Issue
Block a user