A
A
Andrey Apanasik2014-10-20 16:45:32
Android
Andrey Apanasik, 2014-10-20 16:45:32

Is Maven necessary for Android development?

Good afternoon. A couple of years ago I would not have asked, but ...
Now many open source projects are written with Maven support (and only it). To use them, you need to transfer your own project to the same assembly type.
To be honest, I could not set up Maven normally for Android development on Eclipse in a couple of days. All these dependencies, etc. If we are talking about large projects, then okay... If something is smaller, then you need to either hardcode the path to the project in the system in a .pom file, or add a lib to the local Maven repository, etc.
And the question is, does it make sense? Who works closely with Maven, tell me if there is a real profit from using it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Lanwen, 2014-10-22
@Lanwen

Maven (or gradle) seriously facilitates and standardizes the process.
There is a clear structure to the code layout. There is a well-described build process, and anyone who starts working with your project can simply run the build and tests in one command and continue working. There will be no need to explain how to build an apk - you just need to do mvn clean package- and get the package.
All dependencies are stored in one place - a couple of lines and it will be automatically copied to the right place and picked up during the build - you will no longer need to take care of it yourself. Maven support is now available in all popular Java IDEs.
Useful topic:
maven project template for android: https://github.com/d-tarasov/android-maven-template
gradle plugin that uploads an application to Googleplay: https://github.com/qiwi/gradle-android-publishing-...

F
FoxInSox, 2014-10-20
@FoxInSox

Whether it is necessary or not depends on the context, of course, but that gradle and maven at least save you from fiddling with files:
The second most obvious plus is that it is sometimes very difficult to add an additional step of building a project in an IDE. With the help of gradle / maven, this is done in 2 lines and works by itself without an IDE or with an IDE:

compile 'com.squareup.dagger:dagger:1.2.2'
provided 'com.squareup.dagger:dagger-compiler:1.2.2'

O
Oleg Gamega, 2014-10-22
@gadfi

Need? ─ yes.
Needed? ─ no.
In some cases it is more convenient and faster to do everything by hand, in some cases without assembly systems everything is very sad.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question