Get correct path to adb from Android Studio

If adb really isn't found (unsure what conditions would cause that to happen), then `false` will be called which will result in that warning message being displayed instead.

Fixes #351
This commit is contained in:
Scott Kyle 2016-03-29 10:56:51 -07:00
parent d62f78050e
commit e2d1bc4520

View File

@ -17,7 +17,8 @@ allprojects {
apply plugin: 'com.android.library'
task forwardDebugPort(type: Exec) {
commandLine 'adb', 'forward', 'tcp:8082', 'tcp:8082'
def adb = android.getAdbExe()?.toString() ?: 'false'
commandLine adb, 'forward', 'tcp:8082', 'tcp:8082'
ignoreExitValue true
doLast {
if (execResult.getExitValue() != 0) {