I have a master gradle script with over 30 sub projects. This all works fine at the command line. I’ve imported the project into Android Studio and it all looks good when I want to build or test everything. However if I want to for instance run the tests on a single sub project, the task is run on all projects. Which not only takes a long time, but really gets in the way of testing/debugging the project that I’m interested in.
Is there a way to invoke a Gradle task on a single sub-project from within Android Studio?
The tasks in the ‘Gradle’ window are broken down by sub-project. The only thing is the tasks for the root project are listed at the top. Running a task from the root will cascade to all child projects. You might just need to scroll down a bit (Android projects have a ton of tasks) to see the list of sub-projects.
I’m experiencing the same issue here. Android Studio 3.0.1.
I can execute subprojects tasks from CLI, but from AS the root project task is executed, so cascading ends up executing all subprojects tasks.
Any solution found so far? @dealy663, could you handle this?
I found that some of my libraries that include maven plugin do show SubProject:taskName, so the task is executed only for that subproject when I click on it…