mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +01:00
Re-organize gradle modules.
This commit is contained in:
committed by
jeffrey-signal
parent
f4863efb2e
commit
e162eb27c7
2
lib/glide-config/src/main/AndroidManifest.xml
Normal file
2
lib/glide-config/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest />
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.thoughtcrime.securesms.mms
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.GlideBuilder
|
||||
import com.bumptech.glide.Registry
|
||||
import com.bumptech.glide.annotation.GlideModule
|
||||
import com.bumptech.glide.module.AppGlideModule
|
||||
|
||||
/**
|
||||
* A [GlideModule] to configure Glide for the app. This class is discovered by Glide's annotation
|
||||
* processor, and delegates its logic to a [RegisterGlideComponents]. It exists outside of the main
|
||||
* Gradle module to reduce the scope of classes that KAPT needs to look at.
|
||||
*/
|
||||
@GlideModule
|
||||
class SignalGlideModule : AppGlideModule() {
|
||||
|
||||
override fun isManifestParsingEnabled(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun registerComponents(context: Context, glide: Glide, registry: Registry) {
|
||||
registerGlideComponents.registerComponents(context, glide, registry)
|
||||
}
|
||||
|
||||
override fun applyOptions(context: Context, builder: GlideBuilder) {
|
||||
builder.setLogLevel(Log.ERROR)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
lateinit var registerGlideComponents: RegisterGlideComponents
|
||||
}
|
||||
}
|
||||
|
||||
interface RegisterGlideComponents {
|
||||
|
||||
fun registerComponents(context: Context, glide: Glide, registry: Registry)
|
||||
}
|
||||
Reference in New Issue
Block a user