I have an android project with multiple build variants. If variantA is run then A.apk is build, if variantB is run then B.apk is build. If variant C is run C1.apk and C2.apk are built. When each variant is run I would like to upload the artifact(s) to a maven repo.
The issue I’m having is that the maven plugin provides uploadArchives however I can’t find a good way to tell uploadArchives what it is supposed to upload based on which build variant is currently being used. Is there a good way to do this? Currently I am checking for the existence of files (if A.apk exists then we must be running build variant A, etc…) However this feels clunky and wrong.