Skip to content

Instantly share code, notes, and snippets.

@akhgupta
akhgupta / gradlewSuspendAS.sh
Last active March 12, 2020 11:57
gradlew Shell script Wrapper to Suspend Android Studio before running Gradle Task and resuming once Task is completed
#!/usr/bin/env bash
echo
pkill -SIGSTOP studio
printf "============> Suspending Android Studio <============"
gradleCommand="./gradlew ${@}"
eval ${gradleCommand}
pkill -SIGCONT studio
printf "============> Resume Android Studio <============"
echo
@akhgupta
akhgupta / debug-CustomMultiDexApplication.java
Last active February 27, 2020 02:22
leakcanary-android-no-op - Class,Method not found solution
// app/src/debug/java/com/akhil/sampleapp/CustomMultiDexApplication.java
package com.akhil.sampleapp;
import android.support.multidex.MultiDexApplication;
import com.squareup.leakcanary.AndroidExcludedRefs;
import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.RefWatcher;