mirror of https://github.com/readrops/Readrops.git
Migrate to kotlin 2.0
This commit is contained in:
parent
152117d3bf
commit
4b80cfd1c1
|
@ -135,3 +135,5 @@ Gemfile
|
||||||
mapping/
|
mapping/
|
||||||
|
|
||||||
**/*.exec
|
**/*.exec
|
||||||
|
|
||||||
|
.kotlin/
|
||||||
|
|
|
@ -31,8 +31,9 @@ dependencies {
|
||||||
implementation(libs.coroutines.core)
|
implementation(libs.coroutines.core)
|
||||||
testImplementation(libs.coroutines.test)
|
testImplementation(libs.coroutines.test)
|
||||||
|
|
||||||
|
implementation(platform(libs.koin.bom))
|
||||||
implementation(libs.bundles.koin)
|
implementation(libs.bundles.koin)
|
||||||
testImplementation(libs.bundles.kointest)
|
androidTestImplementation(libs.bundles.kointest)
|
||||||
|
|
||||||
implementation(libs.konsumexml)
|
implementation(libs.konsumexml)
|
||||||
implementation(libs.kotlinxmlbuilder)
|
implementation(libs.kotlinxmlbuilder)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
kotlin("android")
|
kotlin("android")
|
||||||
|
alias(libs.plugins.compose.compiler)
|
||||||
id("com.mikepenz.aboutlibraries.plugin")
|
id("com.mikepenz.aboutlibraries.plugin")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,8 +26,10 @@ android {
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = false
|
||||||
isShrinkResources = false
|
isShrinkResources = false
|
||||||
|
|
||||||
isTestCoverageEnabled = true
|
|
||||||
applicationIdSuffix = ".debug"
|
applicationIdSuffix = ".debug"
|
||||||
|
enableUnitTestCoverage = true
|
||||||
|
enableAndroidTestCoverage = true
|
||||||
|
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,10 +39,6 @@ android {
|
||||||
compose = true
|
compose = true
|
||||||
}
|
}
|
||||||
|
|
||||||
composeOptions {
|
|
||||||
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
|
|
||||||
}
|
|
||||||
|
|
||||||
lint {
|
lint {
|
||||||
abortOnError = false
|
abortOnError = false
|
||||||
}
|
}
|
||||||
|
@ -78,8 +77,12 @@ dependencies {
|
||||||
implementation(libs.bundles.room)
|
implementation(libs.bundles.room)
|
||||||
implementation(libs.bundles.paging)
|
implementation(libs.bundles.paging)
|
||||||
|
|
||||||
|
implementation(platform(libs.koin.bom))
|
||||||
implementation(libs.bundles.koin)
|
implementation(libs.bundles.koin)
|
||||||
androidTestImplementation(libs.bundles.kointest)
|
//androidTestImplementation(libs.bundles.kointest)
|
||||||
|
// I don't know why but those dependencies are unreachable when accessed directly from version catalog
|
||||||
|
androidTestImplementation("io.insert-koin:koin-test:${libs.versions.koin.bom.get()}")
|
||||||
|
androidTestImplementation("io.insert-koin:koin-test-junit4:${libs.versions.koin.bom.get()}")
|
||||||
|
|
||||||
androidTestImplementation(libs.okhttp.mockserver)
|
androidTestImplementation(libs.okhttp.mockserver)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
|
||||||
import com.android.build.gradle.AppPlugin
|
import com.android.build.gradle.AppPlugin
|
||||||
import com.android.build.gradle.BaseExtension
|
import com.android.build.gradle.BaseExtension
|
||||||
import com.android.build.gradle.LibraryExtension
|
import com.android.build.gradle.LibraryExtension
|
||||||
import com.android.build.gradle.LibraryPlugin
|
import com.android.build.gradle.LibraryPlugin
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -21,6 +23,7 @@ buildscript {
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.ksp) apply false
|
alias(libs.plugins.ksp) apply false
|
||||||
|
alias(libs.plugins.compose.compiler) apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
@ -35,9 +38,9 @@ allprojects {
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
tasks.withType<KotlinJvmCompile> {
|
with(extensions.getByType<KotlinAndroidProjectExtension>()) {
|
||||||
kotlinOptions {
|
compilerOptions {
|
||||||
jvmTarget = JavaVersion.VERSION_17.toString()
|
jvmTarget = JvmTarget.JVM_17
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +84,7 @@ fun configure(extension: BaseExtension) = with(extension) {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Delete>("clean") {
|
tasks.register<Delete>("clean") {
|
||||||
delete(rootProject.buildDir)
|
delete(rootProject.layout.buildDirectory)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*jacoco {
|
/*jacoco {
|
||||||
|
|
|
@ -42,8 +42,9 @@ dependencies {
|
||||||
|
|
||||||
implementation(libs.bundles.paging)
|
implementation(libs.bundles.paging)
|
||||||
|
|
||||||
|
implementation(platform(libs.koin.bom))
|
||||||
implementation(libs.bundles.koin)
|
implementation(libs.bundles.koin)
|
||||||
testImplementation(libs.bundles.kointest)
|
androidTestImplementation(libs.bundles.kointest)
|
||||||
|
|
||||||
implementation(libs.bundles.coroutines)
|
implementation(libs.bundles.coroutines)
|
||||||
androidTestImplementation(libs.coroutines.test)
|
androidTestImplementation(libs.coroutines.test)
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
[versions]
|
[versions]
|
||||||
kotlin = "1.9.10"
|
kotlin = "2.0.0"
|
||||||
ksp = "1.9.10-1.0.13"
|
ksp = "2.0.0-1.0.24"
|
||||||
android_agp = "8.1.4"
|
android_agp = "8.5.1"
|
||||||
compose_compiler = "1.5.3"
|
compose_bom = "2024.06.00"
|
||||||
compose_bom = "2024.02.02"
|
|
||||||
|
|
||||||
voyager = "1.0.0"
|
voyager = "1.0.0"
|
||||||
lifecycle = "2.8.4"
|
lifecycle = "2.8.4"
|
||||||
|
@ -18,6 +17,7 @@ about_libraries = "11.2.2"
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||||
|
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
android-agp = { module = "com.android.tools.build:gradle", version.ref = "android_agp" }
|
android-agp = { module = "com.android.tools.build:gradle", version.ref = "android_agp" }
|
||||||
|
@ -64,8 +64,8 @@ koin-bom = { module = "io.insert-koin:koin-bom", version.ref = "koin-bom" }
|
||||||
koin-core = { module = "io.insert-koin:koin-core" }
|
koin-core = { module = "io.insert-koin:koin-core" }
|
||||||
koin-android = { module = "io.insert-koin:koin-android" }
|
koin-android = { module = "io.insert-koin:koin-android" }
|
||||||
koin-androidx-compose = { module = "io.insert-koin:koin-androidx-compose" }
|
koin-androidx-compose = { module = "io.insert-koin:koin-androidx-compose" }
|
||||||
koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin-bom" }
|
koin-test = { module = "io.insert-koin:koin-test" }
|
||||||
koin-test-junit4 = { module = "io.insert-koin:koin-test-junit4", version.ref = "koin-bom" }
|
koin-test-junit4 = { module = "io.insert-koin:koin-test-junit4" }
|
||||||
|
|
||||||
paging-runtime = { module = "androidx.paging:paging-runtime-ktx", version.ref = "paging" }
|
paging-runtime = { module = "androidx.paging:paging-runtime-ktx", version.ref = "paging" }
|
||||||
paging-compose = { module = "androidx.paging:paging-compose", version.ref = "paging" }
|
paging-compose = { module = "androidx.paging:paging-compose", version.ref = "paging" }
|
||||||
|
@ -113,7 +113,7 @@ lifecycle = ["lifecycle-viewmodel-ktx", "lifecycle-viewmodel-compose", "lifecycl
|
||||||
coil = ["coil-core", "coil-compose"]
|
coil = ["coil-core", "coil-compose"]
|
||||||
coroutines = ["coroutines-core", "coroutines-android"]
|
coroutines = ["coroutines-core", "coroutines-android"]
|
||||||
room = ["room-runtime", "room-ktx", "room-paging"]
|
room = ["room-runtime", "room-ktx", "room-paging"]
|
||||||
koin = ["koin-bom", "koin-core", "koin-android", "koin-androidx-compose"]
|
koin = ["koin-core", "koin-android", "koin-androidx-compose"]
|
||||||
kointest = ["koin-test", "koin-test-junit4"]
|
kointest = ["koin-test", "koin-test-junit4"]
|
||||||
paging = ["paging-runtime", "paging-compose"]
|
paging = ["paging-runtime", "paging-compose"]
|
||||||
test = ["junit4", "ext-junit", "ext-runner", "ext-rules", "expressocore"]
|
test = ["junit4", "ext-junit", "ext-runner", "ext-rules", "expressocore"]
|
||||||
|
|
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||||
|
|
Loading…
Reference in New Issue