From 23686b4350e9b1eceebdbc0941fde71c2c641c3f Mon Sep 17 00:00:00 2001 From: IndusAryan Date: Wed, 13 Sep 2023 14:43:10 +0530 Subject: [PATCH] move kotlin,kgp and serialization to libs --- build.gradle.kts | 7 +++---- gradle/libs.versions.toml | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1cdc07443..dba75359a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,18 +1,17 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - val kotlinVersion = "1.9.10" repositories { google() mavenCentral() } dependencies { classpath(libs.gradle) - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") - classpath("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion") + classpath(libs.kotlin.gradle.plugin) + classpath(libs.kotlin.serialization) // NOTE: Do not place your application dependencies here, they belong - // to the individual module build.gradle files + // in the individual module build.gradle.kts files } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 750b2c474..3ab0b79c6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,6 +2,7 @@ appcompat = "1.6.1" core = "1.12.0" gradle = "8.1.1" +kotlinVersion = "1.9.10" lifecycle = "2.6.2" constraintlayout = "2.1.4" material = "1.9.0" @@ -32,6 +33,8 @@ androidx-core = { group = "androidx.core", name = "core", version.ref = "core" } androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } androidx-fragment = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "fragment" } gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" } +kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinVersion" } +kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlinVersion" } material = { group = "com.google.android.material", name = "material", version.ref = "material" } androidx-navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "navigation" } androidx-navigation-ui = { group = "androidx.navigation", name = "navigation-ui-ktx", version.ref = "navigation" }