diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e0e4bb1d..12859af5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,6 +5,7 @@ import java.net.URL plugins { id("com.android.application") + id("com.google.devtools.ksp") id("kotlin-android") id("kotlin-kapt") id("org.jetbrains.dokka") @@ -87,6 +88,11 @@ android { ) testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + ksp { + arg("room.schemaLocation", "$projectDir/schemas") + arg("exportSchema", "true") + } + kapt { includeCompileClasspath = true } @@ -181,9 +187,13 @@ dependencies { implementation("androidx.preference:preference-ktx:1.2.1") - implementation("com.github.bumptech.glide:glide:4.13.1") - kapt("com.github.bumptech.glide:compiler:4.13.1") - implementation("com.github.bumptech.glide:okhttp3-integration:4.13.0") + implementation("com.github.bumptech.glide:glide:4.15.1") + ksp("com.github.bumptech.glide:ksp:4.15.1") + implementation("com.github.bumptech.glide:okhttp3-integration:4.15.1") + // for ksp + ksp("dev.zacsweers.autoservice:auto-service-ksp:1.1.0") + implementation("dev.zacsweers.autoservice:auto-service-ksp:1.1.0") + implementation("com.google.guava:guava:32.1.2-android") implementation("jp.wasabeef:glide-transformations:4.3.0") @@ -207,9 +217,6 @@ dependencies { implementation("ch.acra:acra-core:5.11.2") implementation("ch.acra:acra-toast:5.11.2") - compileOnly("com.google.auto.service:auto-service-annotations:1.1.1") - //either for java sources: - annotationProcessor("com.google.auto.service:auto-service:1.1.1") //or for kotlin sources (requires kapt gradle plugin): kapt("com.google.auto.service:auto-service:1.1.1") diff --git a/app/src/main/java/com/lagradost/cloudstream3/AcraApplication.kt b/app/src/main/java/com/lagradost/cloudstream3/AcraApplication.kt index 5f3162b4..c93f0f9b 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/AcraApplication.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/AcraApplication.kt @@ -8,7 +8,6 @@ import android.content.Intent import android.widget.Toast import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentActivity -import com.google.auto.service.AutoService import com.lagradost.cloudstream3.mvvm.normalSafeApiCall import com.lagradost.cloudstream3.mvvm.suspendSafeApiCall import com.lagradost.cloudstream3.plugins.PluginManager @@ -37,7 +36,6 @@ import java.lang.ref.WeakReference import kotlin.concurrent.thread import kotlin.system.exitProcess - class CustomReportSender : ReportSender { // Sends all your crashes to google forms override fun send(context: Context, errorContent: CrashReportData) { @@ -65,7 +63,6 @@ class CustomReportSender : ReportSender { } } -@AutoService(ReportSenderFactory::class) class CustomSenderFactory : ReportSenderFactory { override fun create(context: Context, config: CoreConfiguration): ReportSender { return CustomReportSender() diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginAdapter.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginAdapter.kt index eb0082b8..c3fb4fc2 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginAdapter.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginAdapter.kt @@ -21,7 +21,6 @@ import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTrueT import com.lagradost.cloudstream3.utils.AppUtils.html import com.lagradost.cloudstream3.utils.Coroutines.ioSafe import com.lagradost.cloudstream3.utils.Coroutines.main -import com.lagradost.cloudstream3.utils.GlideApp import com.lagradost.cloudstream3.utils.SubtitleHelper.fromTwoLettersToLanguage import com.lagradost.cloudstream3.utils.SubtitleHelper.getFlagFromIso import com.lagradost.cloudstream3.utils.UIHelper.setImage @@ -87,7 +86,7 @@ class PluginAdapter( override fun onViewRecycled(holder: RecyclerView.ViewHolder) { if (holder is PluginViewHolder) { holder.binding.entryIcon.let { pluginIcon -> - GlideApp.with(pluginIcon).clear(pluginIcon) + com.bumptech.glide.Glide.with(pluginIcon).clear(pluginIcon) } } super.onViewRecycled(holder) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt index d5357e0c..231a634d 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt @@ -301,7 +301,7 @@ object UIHelper { } ?: return false return try { - var builder = GlideApp.with(this) + var builder = com.bumptech.glide.Glide.with(this) .load(glideImage) .skipMemoryCache(true) .diskCacheStrategy(DiskCacheStrategy.ALL).let { req -> @@ -368,7 +368,7 @@ object UIHelper { ) { if (this == null || url.isNullOrBlank()) return try { - val res = GlideApp.with(this) + val res = com.bumptech.glide.Glide.with(this) .load(GlideUrl(url) { headers ?: emptyMap() }) .apply(bitmapTransform(BlurTransformation(radius, sample))) .transition( diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt index d108daed..50a8df02 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt @@ -234,7 +234,7 @@ object VideoDownloadManager { return cachedBitmaps[url] } - val bitmap = GlideApp.with(this) + val bitmap = com.bumptech.glide.Glide.with(this) .asBitmap() .load(GlideUrl(url) { headers ?: emptyMap() }) .into(720, 720) diff --git a/build.gradle.kts b/build.gradle.kts index 762e4588..5d7ea527 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,6 +22,10 @@ allprojects { } } +plugins { + id("com.google.devtools.ksp") version "1.8.20-1.0.11" apply false +} + tasks.register("clean", Delete::class) { delete(rootProject.buildDir) } \ No newline at end of file