From 2688e44436a26b750691cd576f1a9fa2c00b12fe Mon Sep 17 00:00:00 2001 From: Shcherbatykh Oleg Date: Tue, 10 Feb 2026 19:35:46 +0300 Subject: [PATCH] Update dependencies versions --- app/build.gradle.kts | 27 ++++++++++++++++++++++++--- build.gradle.kts | 5 ++++- core/common/build.gradle.kts | 12 +++++++----- core/database/build.gradle.kts | 12 +++++++----- core/network/build.gradle.kts | 25 +++++++++++++++++-------- core/ui/build.gradle.kts | 12 +++++++++--- feature/news/build.gradle.kts | 11 ++++++++--- feature/progress/build.gradle.kts | 11 ++++++++--- feature/schedule/build.gradle.kts | 20 +++++++++++++++++--- gradle.properties | 3 ++- gradle/libs.versions.toml | 25 +++++++++++++++++++++---- gradlew.bat | 2 +- 12 files changed, 125 insertions(+), 40 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4126625..527fdd9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,5 +1,9 @@ plugins { alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + + alias(libs.plugins.kotlin.kapt) + alias(libs.plugins.hilt) } android { @@ -26,15 +30,32 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = JavaVersion.VERSION_17.toString() } } dependencies { - implementation(libs.androidx.core.ktx) + implementation(libs.core.ktx) implementation(libs.androidx.appcompat) implementation(libs.material) implementation(libs.androidx.activity) implementation(libs.androidx.constraintlayout) + + kapt(libs.hiltcompiler) + implementation(libs.hiltandroid) + + implementation(libs.okhttp) + implementation(libs.retrofit) + + implementation(project(":core:network")) + implementation(project(":core:database")) + + implementation(project(":feature:schedule")) + implementation(project(":feature:progress")) + implementation(project(":feature:news")) + } \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 41b070a..152f7ec 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,8 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { + alias(libs.plugins.hilt) apply false + alias(libs.plugins.kotlin.kapt) apply false + + alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.android.application) apply false alias(libs.plugins.android.library) apply false } \ No newline at end of file diff --git a/core/common/build.gradle.kts b/core/common/build.gradle.kts index 3de386f..b21520b 100644 --- a/core/common/build.gradle.kts +++ b/core/common/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) } android { @@ -21,13 +22,14 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = JavaVersion.VERSION_17.toString() } } dependencies { - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.material) + implementation(libs.core.ktx) } \ No newline at end of file diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts index cc48a27..9caa830 100644 --- a/core/database/build.gradle.kts +++ b/core/database/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) } android { @@ -21,13 +22,14 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = libs.versions.jvmTarget.get() } } dependencies { - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.material) + implementation(libs.core.ktx) } \ No newline at end of file diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index 35b6f0a..3fc34f0 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -1,5 +1,8 @@ plugins { alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.kapt) + alias(libs.plugins.hilt) } android { @@ -20,18 +23,24 @@ android { ) } } + val jvm = JavaVersion.toVersion(libs.versions.jvmTarget.get()) compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = jvm + targetCompatibility = jvm + } + kotlinOptions { + jvmTarget = jvm.toString() } } dependencies { - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) + implementation(libs.core.ktx) - implementation("com.squareup.okhttp3:okhttp:5.3.2") - implementation("com.squareup.okhttp3:logging-interceptor:5.3.2") - implementation("com.squareup.retrofit2:retrofit:3.0.0") - implementation("com.squareup.retrofit2:converter-simplexml:3.0.0") + kapt(libs.hiltcompiler) + implementation(libs.hiltandroid) + + api(libs.retrofit) + api(libs.okhttp) + + implementation(libs.retrofit.simplexml) } \ No newline at end of file diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 055d38a..c36b5c9 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) } android { @@ -20,14 +21,19 @@ android { ) } } + + val jvm = JavaVersion.toVersion(libs.versions.jvmTarget.get()) compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = jvm + targetCompatibility = jvm + } + kotlinOptions { + jvmTarget = jvm.toString() } } dependencies { - implementation(libs.androidx.core.ktx) + implementation(libs.core.ktx) implementation(libs.androidx.appcompat) implementation(libs.material) } \ No newline at end of file diff --git a/feature/news/build.gradle.kts b/feature/news/build.gradle.kts index d6429ce..162762f 100644 --- a/feature/news/build.gradle.kts +++ b/feature/news/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) } android { @@ -20,14 +21,18 @@ android { ) } } + val jvm = JavaVersion.toVersion(libs.versions.jvmTarget.get()) compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = jvm + targetCompatibility = jvm + } + kotlinOptions { + jvmTarget = jvm.toString() } } dependencies { - implementation(libs.androidx.core.ktx) + implementation(libs.core.ktx) implementation(libs.androidx.appcompat) implementation(libs.material) } \ No newline at end of file diff --git a/feature/progress/build.gradle.kts b/feature/progress/build.gradle.kts index 1eda875..4ef843d 100644 --- a/feature/progress/build.gradle.kts +++ b/feature/progress/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) } android { @@ -20,14 +21,18 @@ android { ) } } + val jvm = JavaVersion.toVersion(libs.versions.jvmTarget.get()) compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = jvm + targetCompatibility = jvm + } + kotlinOptions { + jvmTarget = jvm.toString() } } dependencies { - implementation(libs.androidx.core.ktx) + implementation(libs.core.ktx) implementation(libs.androidx.appcompat) implementation(libs.material) } \ No newline at end of file diff --git a/feature/schedule/build.gradle.kts b/feature/schedule/build.gradle.kts index 00cf716..af17808 100644 --- a/feature/schedule/build.gradle.kts +++ b/feature/schedule/build.gradle.kts @@ -1,5 +1,9 @@ plugins { alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + + alias(libs.plugins.kotlin.kapt) + alias(libs.plugins.hilt) } android { @@ -20,14 +24,24 @@ android { ) } } + + val jvm = JavaVersion.toVersion(libs.versions.jvmTarget.get()) compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = jvm + targetCompatibility = jvm + } + kotlinOptions { + jvmTarget = jvm.toString() } } dependencies { - implementation(libs.androidx.core.ktx) + implementation(libs.core.ktx) implementation(libs.androidx.appcompat) implementation(libs.material) + + kapt(libs.hiltcompiler) + implementation(libs.hiltandroid) + + implementation(project(":core:network")) } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 20e2a01..16caf8a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,4 +20,5 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.builtInKotlin=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 49369de..59f9842 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,23 +5,40 @@ targetSdk = "35" versionName = "1.0" versionCode = "1" -agp = "8.8.2" +agp = "8.12.0" +kotlin = "2.0.21" +jvmTarget = "17" + coreKtx = "1.10.1" appcompat = "1.6.1" material = "1.10.0" -okhttp = "5.3.2" activity = "1.8.0" constraintlayout = "2.1.4" +hilt = "2.50" +retrofit = "2.11.0" +okhttp = "4.12.0" + [libraries] -androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } material = { group = "com.google.android.material", name = "material", version.ref = "material" } -okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" } androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } +# Network +okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } +okhttp-logging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" } +retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } +retrofit-simplexml = { module = "com.squareup.retrofit2:converter-simplexml", version.ref = "retrofit" } +# DI – Hilt +hiltandroid = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } +hiltcompiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hilt" } +core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } + [plugins] +hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } diff --git a/gradlew.bat b/gradlew.bat index db3a6ac..a319a7e 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,7 +70,7 @@ goto fail :execute @rem Setup the command line -set CLASSPATH= +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle