I currently have a parent Gradle file that builds two other modules. Currently, if I want to exclude a Release build when building my parent Gradle file I have to add the following to my task:
task installToLocal(type:Exec) {
commandLine ‘cmd’, ‘/c’, ‘gradle assembleDebug & gradle installMavenLocal -x:test:packageRelease’
}
In order to exclude the Release build from test, I have to specify -x:test:packageRelease. Is there a way where I can just do something like -x:packageRelease and it will do it for all modules? If I were to add 10 other Gradle projects to the parent Gradle file, I want to avoid having to add a bunch of -x:otherProject:packageRelease to my task for each app.