There is a bug open to be able to invoke an arbitrary gradle task as
part of the run configuration. (Currently, you'll see that the run
configuration simply specifies a "Gradle-aware make" as its task, with
no arguments). You'll be able to add your custom task once that bug
gets fixed.

https://code.google.com/p/android/issues/detail?id=62343

And yes, the run and debug steps in the IDE don't use gradle to run or
test, they only use gradle to assemble the apk.

On Thu, Feb 20, 2014 at 7:19 AM, Daniel Lew <[email protected]> wrote:
> Hello,
> I've been working on getting some dependencies setup for testing an Android
> app.  We need to run one or two server configuration scripts before any
> tests run.  Command-line, I'm able to hook into
> connectedInstrumentTestGoogleDebug.  But it seems that Android Studio
> doesn't run these ever; it just assembles the test package and then runs it
> on its own.
>
> Is there any way to hook into Android Studio to run gradle tasks before
> executing a test?  Or is the only way to move the dependency up to
> assembleDebugTest?
>
> Thanks,
> Daniel
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to