In an android studio project with the plugin 'maven' applied, the install task is not available

In an android studio project, i can’t use the install task of the maven plugin to install apk in my local repository.

I have added :

apply plugin: 'maven'

When i display the tasks with ./gradlew tasks, i can see :

Upload tasks
------------
uploadArchives - Uploads all artifacts belonging to configuration
   ':plugin:archives'

But the following is missing :

Other tasks
-----------
install - Installs the 'archives' artifacts into the local Maven repository.

Seems like the issue is that the Android plugins creates a task rule matching any task name with the prefix “install”. I would consider using the new maven publishing mechanism which also allows publishing to maven local.

Another solution :

https://github.com/dcendents/android-maven-plugin

It’s a fork of the maven plugin, and it includes fixes so it can work with the android plugin.