Q:

How can integrate gradle project wih Eclipse (maven) based instrumentation tests

I have an android project in AndroidStudio, but we must outsource the Instrumentation test to Eclipse (simple Java projet which builded by maven). I don't would like to tell the whole development and QA story about why, I'm just kindly asking can anyone tell me, who can I integrate an maven independed instrumentation test project with my Android Studio based project ? 

A:

In gradle you can make a .jar from your project by building it, and then you can publish the .jar artifact to any maven repo (check this if your are not familiar with artifact publishing).
Something like this:
artifacts {
    archives file("path/to/your/project_output.jar")
}
uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: "file://${System.env.HOME}/.m2/repository/")
            pom.groupId = 'com.yourcompany'
            pom.artifactId = 'yourartifactid'
            pom.version = '0.1.0'
        }
    }
}

This will publish your project's compiled jar files to your local maven repository.
Look for the .jar file in the build/intermediates/... folder (classes.jar its default name I think)
Also, you should publish your .apk file too if your test project needs it.

