I'm setting up a CI build system for an android project and am having trouble using gradle to download the artifacts from the build.
In the first step I use gradle to build an .apk and then I push it to a Nexus repository as an artifact. This works successfully and I can see my apk in my repo.
In the second step I am attempting to pull the .apk down from the repository and push it to a device farm. The .apk uploads to the repository just fine, but I can't figure out how to get gradle to download it.
Ideally, in the same build.gradle file that is used to upload the file, I'd have some sort of gradle task that would download the file from the repo and allow me to manipulate it.
So far I've tried:
- Specifying the file as a dependency. I add the dependencies closure with a compile(group, name, version, classifier, apk) inside of it. When I run it, it seems that gradle can find the file, however I get this error
apk on project app resolves to an APK archive which is not supported as a compilation dependency.
I believe this is because I'm using the compile command and since I'm downloading an .apk that's not really a thing that you can do to it.
- I attempted to use this library
but am running into issues running it on my machine because of the native .so libraries.
Does anyone know how to use gradle to download an .apk from a nexus repository?