File tree Expand file tree Collapse file tree 4 files changed +5
-15
lines changed
src/main/kotlin/com/fernandocejas/sample Expand file tree Collapse file tree 4 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,5 @@ dependencies {
7171 androidTestImplementation(TestLibraries .espressoIntents)
7272
7373 // Development dependencies
74- // TODO: When upgrading Leak Canary to 2.x, these Noop are no longer necessary.
7574 debugImplementation(DevLibraries .leakCanary)
76- releaseImplementation(DevLibraries .leakCanaryNoop)
77- testImplementation(DevLibraries .leakCanaryNoop)
7875}
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import android.app.Application
1919import com.fernandocejas.sample.core.di.ApplicationComponent
2020import com.fernandocejas.sample.core.di.ApplicationModule
2121import com.fernandocejas.sample.core.di.DaggerApplicationComponent
22- import com.squareup.leakcanary.LeakCanary
2322
2423class AndroidApplication : Application () {
2524
@@ -33,12 +32,7 @@ class AndroidApplication : Application() {
3332 override fun onCreate () {
3433 super .onCreate()
3534 this .injectMembers()
36- this .initializeLeakDetection()
3735 }
3836
3937 private fun injectMembers () = appComponent.inject(this )
40-
41- private fun initializeLeakDetection () {
42- if (BuildConfig .DEBUG ) LeakCanary .install(this )
43- }
4438}
Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ fun ViewGroup.inflate(@LayoutRes layoutRes: Int): View =
4343 LayoutInflater .from(context).inflate(layoutRes, this , false )
4444
4545fun ImageView.loadFromUrl (url : String ) =
46- Glide .with (this .context.applicationContext)
47- .load(url)
48- .transition(DrawableTransitionOptions .withCrossFade())
49- .into(this )!!
46+ Glide .with (this .context.applicationContext)
47+ .load(url)
48+ .transition(DrawableTransitionOptions .withCrossFade())
49+ .into(this )
5050
5151fun ImageView.loadUrlAndPostponeEnterTransition (url : String , activity : FragmentActivity ) {
5252 val target: Target <Drawable > = ImageViewBaseTarget (this , activity)
Original file line number Diff line number Diff line change @@ -95,11 +95,10 @@ object TestLibraries {
9595
9696object DevLibraries {
9797 private object Versions {
98- const val leakCanary = " 1 .5"
98+ const val leakCanary = " 2 .5"
9999 }
100100
101101 const val leakCanary = " com.squareup.leakcanary:leakcanary-android:${Versions .leakCanary} "
102- const val leakCanaryNoop = " com.squareup.leakcanary:leakcanary-android-no-op:${Versions .leakCanary} "
103102}
104103
105104object ScriptPlugins {
You can’t perform that action at this time.
0 commit comments