Skip to content

Commit

Permalink
Upgrade dependencies and Kotlin to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kirich1409 committed May 29, 2024
1 parent ef29e73 commit 94caae7
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 36 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
.externalNativeBuild
.cxx
local.properties
.kotlin/
8 changes: 1 addition & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
alias(libs.plugins.dagger.hilt.android)
alias(libs.plugins.kapt)
alias(libs.plugins.baselineprofile)
alias(libs.plugins.compose.compiler)
}

android {
Expand All @@ -30,9 +31,6 @@ android {
//noinspection ChromeOsAbiSupport
abiFilters += setOf("armeabi-v7a", "arm64-v8a")
}

bundle {
}
}

signingConfigs {
Expand Down Expand Up @@ -65,10 +63,6 @@ android {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidx.compose.kotlin.compiler.ext.get()
}

packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
alias(libs.plugins.detekt) apply false
alias(libs.plugins.android.test) apply false
alias(libs.plugins.baselineprofile) apply false
alias(libs.plugins.compose.compiler) apply false
}

// TODO Replace Detekt Gradle with terminal launch
Expand Down
10 changes: 7 additions & 3 deletions features/news-main/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
alias(libs.plugins.jetbrainsKotlinAndroid)
alias(libs.plugins.dagger.hilt.android)
alias(libs.plugins.kapt)
alias(libs.plugins.compose.compiler)
}

android {
Expand Down Expand Up @@ -35,9 +36,12 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidx.compose.kotlin.compiler.ext.get()
}
}

composeCompiler {
enableStrongSkippingMode = true

reportsDestination = layout.buildDirectory.dir("compose_compiler")
}

dependencies {
Expand Down
35 changes: 17 additions & 18 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
[versions]
agp = "8.3.2"
annotation = "1.7.1"
kotlin = "1.9.22"
annotation = "1.8.0"
kotlin = "2.0.0"
kotlin-serialization-json = "1.6.3"
coreKtx = "1.12.0"
coreKtx = "1.13.1"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
androidx-lifecycle = "2.7.0"
activityCompose = "1.8.2"
composeBom = "2024.02.01"
androidx-compose-runtime = "1.6.2"
androidx-compose-kotlin-compiler-ext = "1.5.10"
androidx-lifecycle = "2.8.1"
activityCompose = "1.9.0"
composeBom = "2024.05.00"
androidx-compose-runtime = "1.6.7"
retrofit = "2.11.0"
kotlinx-coroutines = "1.8.0"
kotlinx-coroutines = "1.9.0-RC"
retrofitAdaptersResult = "1.0.9"
retrofitConverterKotlinxSerialization = "1.0.0"
appcompat = "1.6.1"
material = "1.11.0"
appcompat = "1.7.0"
material = "1.12.0"
room = "2.6.1"
ksp = "1.9.22-1.0.17"
dagger = "2.50"
ksp = "2.0.0-1.0.21"
dagger = "2.51.1"
javax-inject = "1"
okhttp = "4.12.0"
coil = "2.6.0"
detekt = "1.23.3"
uiautomator = "2.2.0"
benchmarkMacroJunit4 = "1.2.3"
baselineprofile = "1.2.3"
uiautomator = "2.3.0"
benchmarkMacroJunit4 = "1.2.4"
baselineprofile = "1.2.4"
profileinstaller = "1.3.1"
androidSdk-target = "33"
androidSdk-min = "24"
Expand Down Expand Up @@ -62,7 +60,7 @@ androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
retrofit-adapters-result = { module = "com.github.skydoves:retrofit-adapters-result", version.ref = "retrofitAdaptersResult" }
retrofit-converter-kotlinx-serialization = { module = "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter", version.ref = "retrofitConverterKotlinxSerialization" }
retrofit-converter-kotlinx-serialization = { module = "com.squareup.retrofit2:converter-kotlinx-serialization", version.ref = "retrofit" }
retrofit-responseTypeKeeper = { module = "com.squareup.retrofit2:response-type-keeper", version.ref = "retrofit" }

kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
Expand Down Expand Up @@ -106,3 +104,4 @@ androidx-room = { id = "androidx.room", version.ref = "room" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
android-test = { id = "com.android.test", version.ref = "agp" }
baselineprofile = { id = "androidx.baselineprofile", version.ref = "baselineprofile" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
8 changes: 1 addition & 7 deletions news-uikit/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.androidLibrary)
alias(libs.plugins.jetbrainsKotlinAndroid)
alias(libs.plugins.compose.compiler)
}

android {
Expand All @@ -21,13 +22,6 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}

buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidx.compose.kotlin.compiler.ext.get()
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package dev.androidbroadcast.newsapi

import androidx.annotation.IntRange
import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory
import com.skydoves.retrofit.adapters.result.ResultCallAdapterFactory
import dev.androidbroadcast.newsapi.models.ArticleDTO
import dev.androidbroadcast.newsapi.models.Language
Expand All @@ -14,6 +13,7 @@ import kotlinx.serialization.json.Json
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.kotlinx.serialization.asConverterFactory
import retrofit2.create
import retrofit2.http.GET
import retrofit2.http.Query
Expand Down

0 comments on commit 94caae7

Please sign in to comment.