Google Play Services, Granular Dependency Management

It looks like it is possible to only build the apis you need with Google Play Services, as of version 6.5. I have found several examples of how to do this with a search, such as this:

However, we are currently building with ant. Every example I have found says to add code into the build.gradle file, which we dont have. I guess eventually we will look at moving over to gradle, but in the mean time, is there a way to accomplish this with ant?

Thanks.