This feature will be available in Gradle 4.1 thanks to a community contribution by https://github.com/blindpirate.