Skip to content

Commit

Permalink
Delete old dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed May 21, 2023
1 parent 90bdd55 commit 93555a9
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 122 deletions.
15 changes: 4 additions & 11 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ if (localProperties.exists()) {

android {
namespace = "com.prof18.feedflow"
compileSdk = 33
compileSdk = libs.versions.android.compile.sdk.get().toInt()
defaultConfig {
applicationId = "com.prof18.feedflow"
minSdk = 26
targetSdk = 33
minSdk = libs.versions.android.min.sdk.get().toInt()
targetSdk = libs.versions.android.target.sdk.get().toInt()
versionCode = getVersionCode()
versionName = getVersionName()
}
Expand All @@ -29,19 +29,14 @@ android {
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}
packagingOptions {
resources {
// excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

signingConfigs {
Expand All @@ -64,7 +59,6 @@ android {

dependencies {
implementation(project(":shared"))
// implementation(project("RSS-Parser:rssparser"))

val composeBom = platform(libs.androidx.compose.bom)
implementation(composeBom)
Expand All @@ -73,7 +67,6 @@ dependencies {
implementation(libs.bundles.compose)
implementation(libs.bundles.koin)
implementation(libs.touchlab.kermit)
implementation(libs.androidx.work.manager)

debugImplementation(libs.androidx.compose.ui.tooling)
debugImplementation(libs.androidx.compose.ui.test.manifest)
Expand Down
16 changes: 0 additions & 16 deletions androidApp/src/main/kotlin/com/prof18/feedflow/DI.kt

This file was deleted.

8 changes: 5 additions & 3 deletions androidApp/src/main/kotlin/com/prof18/feedflow/FeedFlowApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ class FeedFlowApp : Application() {
super.onCreate()

initKoin(
module {
single<Context> { this@FeedFlowApp }
} + appModule,
listOf(
module {
single<Context> { this@FeedFlowApp }
}
)
)
}
}
16 changes: 0 additions & 16 deletions androidApp/src/main/kotlin/com/prof18/feedflow/Screen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,3 @@ sealed class Screen(val name: String) {
object AddFeed: Screen("add_feed")
object FeedList: Screen("feed_list")
}


fun main() {
var imageUrlFromContent: String? = null
val content = "<img src='https://images.news18.com/ibnkhabar/uploads/2021/01/who-team-1.jpg' height='50' width='76' />कोरोना वायरस की उत्पत्ति को लेकर विश्व स्वास्थ्य संगठन (WHO) के विशेषज्ञ शुक्रवार को चीन के वुहान (Wuhan) में अधिकारियों के साथ बैठक करेंगे."
val imgRegex = Regex(pattern = "(<img .*?>)")

imgRegex.find(content)?.value?.let { imgString ->
val urlRegex = Regex(pattern = "src\\s*=\\s*([\"'])(.+?)([\"'])")
urlRegex.find(imgString)?.groupValues?.getOrNull(2)?.trim().let { imgUrl ->
imageUrlFromContent = imgUrl
}
}

print("")
}

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions desktopApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ kotlin {
implementation(libs.decompose)
implementation(libs.decompose.compose.jetbrains)
implementation(libs.jsystem.theme.detector)
implementation(libs.compose.image.loader)

implementation("org.slf4j:slf4j-nop:2.0.6")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.prof18.feedflow.home

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.lazy.LazyColumn
Expand All @@ -34,6 +36,7 @@ import com.prof18.feedflow.presentation.model.FeedItemClickedInfo
import com.prof18.feedflow.ui.components.AsyncImage
import com.prof18.feedflow.ui.components.loadImageBitmap
import com.prof18.feedflow.ui.style.Spacing
import com.seiko.imageloader.rememberAsyncImagePainter
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.flow.debounce
import kotlinx.coroutines.flow.distinctUntilChanged
Expand Down Expand Up @@ -148,17 +151,12 @@ private fun FeedItemView(
}

feedItem.imageUrl?.let { url ->
val imageLoading = remember(feedItem.id) {
{ loadImageBitmap(url) }
}

AsyncImage(
Image(
painter = rememberAsyncImagePainter(url),
modifier = Modifier
.wrapContentHeight()
.width(96.dp)
.clip(RoundedCornerShape(Spacing.small)),
load = { imageLoading() },
painterFor = { remember { BitmapPainter(it) } },
contentDescription = null,
)
}
Expand Down
15 changes: 3 additions & 12 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[versions]
android-compile-sdk = "33"
android-min-sdk = "24"
android-min-sdk = "26"
android-target-sdk = "33"
android-gradle-plugin = "7.3.1"
activity-compose = "1.7.0"
androidx-test = "1.5.2"
androidx-core-ktx = "1.4.0"
androidx-test-ext = "1.1.5"
androidx-test-runner = "1.5.1"
androidx-work-manager = "2.8.0"
com-google-accompanist = "0.28.0"
compose = "1.3.1"
compose-compiler = "1.4.6"
Expand All @@ -21,7 +20,6 @@ kermit = "1.2.2"
koin = "3.2.2"
koin-android = "3.3.0"
kotlin = "1.8.20"
ktor = "2.1.2"
nav-compose = "2.5.3"
turbine = "0.12.1"
versions-ben-manes = "0.44.0"
Expand All @@ -43,6 +41,7 @@ decompose = "1.0.0"
jsystem-theme-detector = "3.6"
native-coroutines = "1.0.0-ALPHA-7"
ksp = "1.8.20-1.0.10"
compose-image-loader = "1.4.2"

[libraries]
androidx-activity-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity-compose" }
Expand All @@ -68,10 +67,8 @@ androidx-test-core-ktx = { module = "androidx.test:core-ktx", version.ref = "and
androidx-test-ext-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-test-ext" }
androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidx-test" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test" }
androidx-work-manager = { module = "androidx.work:work-runtime-ktx", version.ref = "androidx-work-manager" }
cashapp-turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine" }
com-google-accompanist-system-ui = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "com-google-accompanist" }
io-coil = { module = "io.coil-kt:coil", version.ref = "io-coil" }
io-coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "io-coil" }
io-gitlab-arturbosch-detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
junit = { module = "junit:junit", version.ref = "junit" }
Expand All @@ -86,11 +83,6 @@ kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutine
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
ktor-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" }
ktor-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
ktor-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
ktor-kotlinx-serialization = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
touchlab-kermit = { module = "co.touchlab:kermit", version.ref = "kermit" }
androidx-compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "androidx-compose-material3" }
org-robolectric = { module = "org.robolectric:robolectric", version.ref = "org-robolectric" }
Expand All @@ -106,7 +98,7 @@ jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" }
decompose = { module = "com.arkivanov.decompose:decompose", version.ref = "decompose" }
decompose-compose-jetbrains = { module = "com.arkivanov.decompose:extensions-compose-jetbrains", version.ref = "decompose" }
jsystem-theme-detector = { module = "com.github.Dansoftowner:jSystemThemeDetector", version.ref = "jsystem-theme-detector" }

compose-image-loader = { module = "io.github.qdsfdhvh:image-loader", version.ref = "compose-image-loader" }

[bundles]
androidx-test = ["androidx-test-core", "androidx-test-ext-junit", "androidx-test-rules", "androidx-test-runner"]
Expand All @@ -127,7 +119,6 @@ detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
touchlab-kermit = { id = "co.touchlab.kermit", version.ref = "kermit" }
versionsBenManes = { id = "com.github.ben-manes.versions", version.ref = "versions-ben-manes" }
native-coroutines = { id = "com.rickclephas.kmp.nativecoroutines", version.ref = "native-coroutines" }
Expand Down
19 changes: 15 additions & 4 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ plugins {
}

kotlin {
android()
android {
compilations.all {
kotlinOptions {
jvmTarget = "11"
}
}
}

jvm("desktop") {
jvmToolchain(11)
Expand Down Expand Up @@ -134,10 +140,15 @@ sqldelight {

android {
namespace = "com.prof18.feedflow.shared"
compileSdk = 33
compileSdk = libs.versions.android.compile.sdk.get().toInt()
defaultConfig {
minSdk = 26
targetSdk = 33
minSdk = libs.versions.android.min.sdk.get().toInt()
targetSdk = libs.versions.android.target.sdk.get().toInt()
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}

Expand Down

0 comments on commit 93555a9

Please sign in to comment.