forked from melod1n/fast-messenger
Refactor: Clean up unused code and improve error handling
This commit performs a general cleanup of the codebase by removing unused dependencies, comments, and functions. It also improves error handling in the build logic. Key changes: - Removed a TODO and an inappropriate function `dickPizda` from `Extensions.kt`. - Removed stale TODO comments from `core/data/build.gradle.kts` and `core/domain/build.gradle.kts`. - Replaced a `TODO` call with a proper `IllegalArgumentException` in `KotlinAndroid.kt` for better error reporting when encountering unsupported project extensions.
This commit is contained in:
@@ -47,7 +47,7 @@ private inline fun <reified T : KotlinBaseExtension> Project.configureKotlin() =
|
|||||||
when (this) {
|
when (this) {
|
||||||
is KotlinAndroidProjectExtension -> compilerOptions
|
is KotlinAndroidProjectExtension -> compilerOptions
|
||||||
is KotlinJvmProjectExtension -> compilerOptions
|
is KotlinJvmProjectExtension -> compilerOptions
|
||||||
else -> TODO("Unsupported project extension $this ${T::class}")
|
else -> throw IllegalArgumentException("Unsupported project extension $this ${T::class}")
|
||||||
}.apply {
|
}.apply {
|
||||||
jvmTarget = JvmTarget.JVM_21
|
jvmTarget = JvmTarget.JVM_21
|
||||||
allWarningsAsErrors = warningsAsErrors.toBoolean()
|
allWarningsAsErrors = warningsAsErrors.toBoolean()
|
||||||
|
|||||||
@@ -143,8 +143,6 @@ infix fun ClosedRange<Int>.collidesWith(other: ClosedRange<Int>): Boolean {
|
|||||||
return this.start < other.endInclusive && other.start < this.endInclusive
|
return this.start < other.endInclusive && other.start < this.endInclusive
|
||||||
}
|
}
|
||||||
|
|
||||||
fun dickPizda(a: Int): String = ""
|
|
||||||
|
|
||||||
operator fun ClosedRange<Int>.minus(other: ClosedRange<Int>): ClosedRange<Int> {
|
operator fun ClosedRange<Int>.minus(other: ClosedRange<Int>): ClosedRange<Int> {
|
||||||
return (this.start - other.start)..(this.endInclusive - other.endInclusive)
|
return (this.start - other.start)..(this.endInclusive - other.endInclusive)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ dependencies {
|
|||||||
api(projects.core.network)
|
api(projects.core.network)
|
||||||
api(projects.core.database)
|
api(projects.core.database)
|
||||||
|
|
||||||
// TODO: 11/08/2024, Danil Nikolaev: remove?
|
|
||||||
implementation(libs.retrofit)
|
implementation(libs.retrofit)
|
||||||
implementation(libs.eithernet)
|
implementation(libs.eithernet)
|
||||||
implementation(libs.koin.android)
|
implementation(libs.koin.android)
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ dependencies {
|
|||||||
api(projects.core.data)
|
api(projects.core.data)
|
||||||
api(projects.core.model)
|
api(projects.core.model)
|
||||||
|
|
||||||
// TODO: 11/08/2024, Danil Nikolaev: remove?
|
|
||||||
implementation(libs.kotlinx.coroutines.core)
|
implementation(libs.kotlinx.coroutines.core)
|
||||||
implementation(libs.koin.core)
|
implementation(libs.koin.core)
|
||||||
implementation(libs.eithernet)
|
implementation(libs.eithernet)
|
||||||
|
|||||||
Reference in New Issue
Block a user