diff --git a/build.gradle b/build.gradle index 470636f..f9b3a91 100644 --- a/build.gradle +++ b/build.gradle @@ -23,6 +23,7 @@ plugins { // Mozilla decided to live with the duplication: https://github.com/mozilla-mobile/focus-android/issues/1886 // Possible solution that requires changing to Gradle Kotlin DSL: https://github.com/gradle/gradle/issues/1697 id "io.gitlab.arturbosch.detekt" version "1.23.1" + id "com.google.devtools.ksp" version "1.7.22-1.0.8" } allprojects { diff --git a/bunnies/build.gradle b/bunnies/build.gradle index 667c629..3288ac7 100644 --- a/bunnies/build.gradle +++ b/bunnies/build.gradle @@ -1,8 +1,11 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' -apply plugin: 'kotlin-android-extensions' -apply plugin: "androidx.navigation.safeargs.kotlin" +plugins { + id 'com.android.application' + id 'kotlin-android' + id 'kotlin-kapt' + id 'kotlin-android-extensions' + id "androidx.navigation.safeargs.kotlin" + id 'com.google.devtools.ksp' +} androidExtensions { experimental = true @@ -104,14 +107,14 @@ dependencies { def roomVersion = "2.4.3" implementation "androidx.room:room-runtime:$roomVersion" implementation "androidx.room:room-rxjava2:$roomVersion" - kapt "androidx.room:room-compiler:$roomVersion" + ksp "androidx.room:room-compiler:$roomVersion" def pagingVersion = "2.1.2" implementation "androidx.paging:paging-runtime-ktx:$pagingVersion" implementation "androidx.paging:paging-rxjava2-ktx:$pagingVersion" - def epoxyVersion = "4.6.4" + def epoxyVersion = "5.1.1" implementation "com.airbnb.android:epoxy:$epoxyVersion" - kapt "com.airbnb.android:epoxy-processor:$epoxyVersion" + ksp "com.airbnb.android:epoxy-processor:$epoxyVersion" // Dependency injection def daggerVersion = "2.44" @@ -128,9 +131,9 @@ dependencies { implementation "com.jakewharton.rxbinding3:rxbinding:$rxBindingVersion" implementation "com.jakewharton.rxbinding3:rxbinding-appcompat:$rxBindingVersion" - def glideVersion = '4.13.2' + def glideVersion = '4.15.1' implementation "com.github.bumptech.glide:glide:$glideVersion" - kapt "com.github.bumptech.glide:compiler:$glideVersion" + ksp "com.github.bumptech.glide:compiler:$glideVersion" implementation "me.saket:better-link-movement-method:2" implementation 'com.futuremind.recyclerfastscroll:fastscroll:0.2.5' diff --git a/bunnies/src/main/java/com/fueledbycaffeine/bunnypedia/ui/card/details/CardSectionViewHolder.kt b/bunnies/src/main/java/com/fueledbycaffeine/bunnypedia/ui/card/details/CardSectionViewHolder.kt index 7453fb0..f6d2838 100644 --- a/bunnies/src/main/java/com/fueledbycaffeine/bunnypedia/ui/card/details/CardSectionViewHolder.kt +++ b/bunnies/src/main/java/com/fueledbycaffeine/bunnypedia/ui/card/details/CardSectionViewHolder.kt @@ -7,6 +7,7 @@ import android.widget.ImageView import androidx.annotation.StringRes import androidx.core.content.ContextCompat import androidx.core.content.res.ResourcesCompat +import com.bumptech.glide.Glide import com.bumptech.glide.request.target.Target import com.fueledbycaffeine.bunnypedia.R import com.fueledbycaffeine.bunnypedia.database.model.Card @@ -20,7 +21,6 @@ import com.fueledbycaffeine.bunnypedia.database.model.SpecialSeries import com.fueledbycaffeine.bunnypedia.database.model.ZodiacAnimal import com.fueledbycaffeine.bunnypedia.database.model.ZodiacSign import com.fueledbycaffeine.bunnypedia.ui.EpoxyLayoutContainer -import com.fueledbycaffeine.bunnypedia.ui.GlideApp import com.google.android.flexbox.FlexboxLayout import kotlinx.android.synthetic.main.card_hero_details.view.* import java.time.LocalDate @@ -35,7 +35,7 @@ class CardSectionViewHolder : EpoxyLayoutContainer() { fun display(card: Card) { itemView.cardType.text = getString(card.type.description) - GlideApp.with(context) + Glide.with(context) .load(card.imageURI) .override(Target.SIZE_ORIGINAL) .into(itemView.cardThumbnail) diff --git a/bunnies/src/main/java/com/fueledbycaffeine/bunnypedia/ui/card/list/CardAdapter.kt b/bunnies/src/main/java/com/fueledbycaffeine/bunnypedia/ui/card/list/CardAdapter.kt index c2c8722..0cc667f 100644 --- a/bunnies/src/main/java/com/fueledbycaffeine/bunnypedia/ui/card/list/CardAdapter.kt +++ b/bunnies/src/main/java/com/fueledbycaffeine/bunnypedia/ui/card/list/CardAdapter.kt @@ -4,10 +4,10 @@ import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.paging.PagedListAdapter import androidx.recyclerview.widget.DiffUtil +import com.bumptech.glide.Glide import com.fueledbycaffeine.bunnypedia.R import com.fueledbycaffeine.bunnypedia.database.model.CardWithRules import com.fueledbycaffeine.bunnypedia.ext.android.layoutInflater -import com.fueledbycaffeine.bunnypedia.ui.GlideApp import com.futuremind.recyclerviewfastscroll.SectionTitleProvider class CardAdapter( @@ -44,7 +44,7 @@ class CardAdapter( if (cardWithRules == null) { holder.clear() } else { - holder.bind(GlideApp.with(fragment), cardWithRules) + holder.bind(Glide.with(fragment), cardWithRules) holder.itemView.setOnClickListener { onCardSelected(cardWithRules.card.id) } } } @@ -66,6 +66,6 @@ class CardAdapter( override fun getSectionTitle(position: Int): String { val (card) = getItem(position) ?: return "???" - return card.id.toString() + return card.id } }