Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android gradle task source code

I use ./gradlew connectedAndroidtest to test my android app.

when the connectedAndroidtest task running,

from the terminal i can get the task that runed many sub-tasks.

:assembleDebugAndroidTest UP-TO-DATE
:connectedDebugAndroidTest ...

but i don't understand that sub-tasks details.

I try to find gradle source code but can't find any about connectedDebugAndroidTest tasks.

Are android tasks open source? or somewhere can know more details.

Thanks.

like image 587
Tom Avatar asked Jun 14 '17 16:06

Tom


1 Answers

If you would like to see Android Build Tools source code, there is open Google repository with it: android/platform/tools/build/master

Specifically Android Gradle Plugin: build/gradle.

If you would like to see manual for specific task, you could execute:

./gradlew help --task "${taskName}"

In your case it should be:

./gradlew help --task connectedAndroidTest

Output:

Detailed task information for connectedAndroidTest

Path
     :app:connectedAndroidTest

Type
     Task (org.gradle.api.Task)

Description
     Installs and runs instrumentation tests for all flavors on connected devices.

Group
     verification
like image 159
Andrii Abramov Avatar answered Sep 27 '22 19:09

Andrii Abramov