I have a workspace containing several different apps and a common library project that I am looking to convert from Eclipse to Android Studio and from Ant to Gradle. Curren
As of Android Gradle Plugin v3.0.0, the plugin could choose the build type to compile for the sub-module library based on the build type being compiled for the app. Hence debug would compile debug type of library, and release would compile release type of the library. Furthermore there are even added extensions for resolving non-standard build types or flavors using matchingFallback or missingDimensionStrategy.
More info can be found here: Use variant-aware dependency management