Skip to content

Commit

Permalink
Add KSP and Update Glide 4.9.0 to 4.14.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jokwanhee committed Dec 13, 2024
1 parent a9d7efe commit 4e312d9
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ internal class AndroidApplicationComposeConventionPlugin : Plugin<Project> {
apply("org.jetbrains.kotlin.android")
apply("kotlin-kapt")
apply("kotlin-parcelize")
apply("com.google.devtools.ksp")
}
extensions.configure<ApplicationExtension> {
configureAndroidCompose(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ internal class AndroidLibraryConventionPlugin : Plugin<Project> {
apply("com.android.library")
apply("org.jetbrains.kotlin.kapt")
apply("org.jetbrains.kotlin.android")
apply("com.google.devtools.ksp")
}
extensions.configure<LibraryExtension> {
configureAndroidLibrary(this)
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ plugins {
alias(libs.plugins.kotlinx.serialization) apply false
alias(libs.plugins.google.service) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.ksp) apply false
}

tasks.register<Delete>("clean") {
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {

/* Dependency - glide */
api(libs.glide)
kapt(libs.glide.compiler)
ksp(libs.glide.ksp)

/* Dependency - sticky scroll view */
api(libs.stickyScrollView)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ class ImageZoomableDialog(private val context: Context, private val image: Strin
override fun onLoadFailed(
e: GlideException?,
model: Any?,
target: Target<Drawable>?,
target: Target<Drawable>,
isFirstResource: Boolean
): Boolean = false

override fun onResourceReady(
resource: Drawable?,
model: Any?,
target: Target<Drawable>?,
dataSource: DataSource?,
resource: Drawable,
model: Any,
target: Target<Drawable>,
dataSource: DataSource,
isFirstResource: Boolean
): Boolean {
binding.photoView.post {
Expand Down
6 changes: 4 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ securityCryptoVersion = "1.1.0-alpha03"
stickyscrollviewVersion = "1.0.2"
strictVersionMatcherPlugin = "1.2.4"
composeCompilerVersion = "1.5.10"
glideVersion = "4.9.0"
glideVersion = "4.14.2"
googleServiceVersion = "4.3.14"
composeNavigationVersion = "2.7.7"
orbitVersion = "7.0.1"
Expand All @@ -69,6 +69,7 @@ timber = "5.0.1"
kotlinxCoroutinesTestVersion = "1.9.0"
turbineVersion = "1.2.0"
kotlinxCollectionsImmutableVersion = "0.3.8"
kspVersion = "1.9.22-1.0.16"


[libraries]
Expand Down Expand Up @@ -150,7 +151,7 @@ rxjava-android = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxa
stickyScrollView = { module = "com.github.amarjain07:StickyScrollView", version.ref = "stickyscrollviewVersion" }
strict-version-matcher-plugin = { module = "com.google.android.gms:strict-version-matcher-plugin", version.ref = "strictVersionMatcherPlugin" }
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glideVersion" }
glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glideVersion" }
glide-ksp = { module = "com.github.bumptech.glide:ksp", version.ref = "glideVersion" }
viewpager2 = { module = "androidx.viewpager2:viewpager2", version = "1.0.0" }

orbit-core = { module = "org.orbit-mvi:orbit-core", version.ref = "orbitVersion" }
Expand Down Expand Up @@ -202,6 +203,7 @@ kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", vers
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hiltVersion" }
androidLibrary = { id = "com.android.library", version.ref = "androidGradleVersion" }
google-service = { id = "com.google.gms.google-services", version.ref = "googleServiceVersion" }
ksp = { id = "com.google.devtools.ksp", version.ref = "kspVersion" }

koin-application = { id = "in.koreatech.plugin.application", version = "unspecified" }
koin-compose = { id = "in.koreatech.plugin.compose", version = "unspecified" }
Expand Down
2 changes: 1 addition & 1 deletion koin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ dependencies {
/* Dependency - glide & coil */
implementation(libs.glide)
implementation(libs.coil)
kapt(libs.glide.compiler)
ksp(libs.glide.ksp)

/* Dependency - naver api */
implementation(libs.map.sdk)
Expand Down
7 changes: 7 additions & 0 deletions koin/src/main/java/in/koreatech/koin/GlideModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package `in`.koreatech.koin

import com.bumptech.glide.annotation.GlideModule
import com.bumptech.glide.module.AppGlideModule

@GlideModule
class GlideModule: AppGlideModule()
10 changes: 5 additions & 5 deletions koin/src/main/java/in/koreatech/koin/ui/article/HtmlView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,17 @@ class HtmlView @JvmOverloads constructor(
override fun onLoadFailed(
e: GlideException?,
model: Any?,
target: com.bumptech.glide.request.target.Target<Drawable>?,
target: com.bumptech.glide.request.target.Target<Drawable>,
isFirstResource: Boolean
): Boolean {
return false
}

override fun onResourceReady(
resource: Drawable?,
model: Any?,
target: com.bumptech.glide.request.target.Target<Drawable>?,
dataSource: DataSource?,
resource: Drawable,
model: Any,
target: com.bumptech.glide.request.target.Target<Drawable>,
dataSource: DataSource,
isFirstResource: Boolean
): Boolean {
val dialog = ImageZoomableDialog(context, model as String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ class DiningAdapter(
override fun onLoadFailed(
e: GlideException?,
model: Any?,
target: Target<Drawable>?,
target: Target<Drawable>,
isFirstResource: Boolean
): Boolean {
return false
}

override fun onResourceReady(
resource: Drawable?,
model: Any?,
target: Target<Drawable>?,
dataSource: DataSource?,
resource: Drawable,
model: Any,
target: Target<Drawable>,
dataSource: DataSource,
isFirstResource: Boolean
): Boolean {
binding.lottieImageLoading.pauseAnimation()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ class DiningOriginalAdapter(
override fun onLoadFailed(
e: GlideException?,
model: Any?,
target: Target<Drawable>?,
target: Target<Drawable>,
isFirstResource: Boolean
): Boolean {
return false
}

override fun onResourceReady(
resource: Drawable?,
model: Any?,
target: Target<Drawable>?,
dataSource: DataSource?,
resource: Drawable,
model: Any,
target: Target<Drawable>,
dataSource: DataSource,
isFirstResource: Boolean
): Boolean {
binding.lottieImageLoading.pauseAnimation()
Expand Down

0 comments on commit 4e312d9

Please sign in to comment.