Maven Integration for Android Development - android

How can we used Maven for android?
I'm using Lint tool in android for programming error solution.
Is it Maven same as this tool or provide more features over android?
Because i'm using Maven tool in Java programming for different kinds of testing like integration testing unit testing with predefined test cases.
If Maven work same in android also, than provide me help to implement in my existing project. What basic steps needs to be done for integrate Maven in android?

Following two links help you to start with Maven integration in android:
m2eclipse-android-integration
New Maven Android Plugin features
If you have any specific requirement or query than you can ask me.

Related

Is it possible to use Maven instead of Gradle in Android?

I want to remove gradle completely from my app, and start using Maven. I know that Gradle is the official and default way, but due to some restrictions, I need Maven. I have investigated but did not come up with a solution. Is is possible? How?
In case that it is possible, how can you set the different parameters? e.g. multiDexEnable, compileSdkVersion, buildTypes...
You can use the Android Maven Plugin
The Android Maven Plugin is used to build applications for the Android operating system as well as build libraries to be used in these efforts in AAR and the legacy APKLIB format using Apache Maven.
It seems quite updated and there's also a GitHub page. Beside, some examples will help you setup your project.

Robotium project and maven

I tried to create an android test project using Robotium as testing framework and maven as builder. But, is it necessary for my android application to use maven as builder ???
No, you do not per se need Maven. As a matter of fact, the Getting Started of Robotium gives a basic example of how to do this in just Eclipse.
Now, would life be better when using Maven. I generally like "yes" for an answer to that question. Testing is only one part of your iterative development, and it is great to have all your steps automated. Doing that with Maven allows you to leverage the entire lifecycle that it offers for your project from test driven development, perhaps in an IDE, to packaging and deployment. And the Android Maven Plugin fits into that approach.

How to create an eclipse-compatible, mavenised Android project?

I need to create a Maven project for my Android application. When I use the normal Android Maven plugin, it produces a file structure with incorrect location of test classes (the test classes lie where Maven expects them, but eclipse doesn't and it leads to difficulties debugging unit tests in eclipse). There is a workaround for this, but it isn't very elegant.
How can I create a Maven project, which will be compatible with eclipse (allow me to run unit tests in eclipse and - ideally - deploy my application to an emulator from within eclipse) ?
Maybe this project can serve you as inspiration.
Sonatype, one of the main developers of Maven and related projects, has a free chapter about using Maven for Android.

How to use code automation for Android Projects?

I am extremely new to the idea of Build Automation, and am not sure if it would be helpful for me or not. Honestly, I'm not exactly sure what it does or the benefits of it. I've been looking up a lot of information about Maven, and am having a bit of trouble piecing it all together.
Right now I develop a lot of similar Android applications. Most of these applications have a similar base of functionality which I copy from one application to the next. However, when I make changes to one part of that "main functionality," I need to go back and apply the changes to other applications. This is horribly inefficient, obviously. What I've been beginning to do is to set the main functionality as a library which is then imported by each application. So far so good.
So in addition to the library approach I'm using, would Maven be helpful? Is there something else more helpful that I haven't seen yet? Sorry for the really basic questions and thanks for the help!
Maven will not help you for code generation it will only help you to automate your build process.
You can configure your eclipse using maven plugin for android Android SDK Full Javdocs with Maven in Eclipse
I have not used Maven for android project as of now since currently I am using Ant for that purpose. You will find sample maven and ant files in the examples in android SDK
About code Generation:
I have read that Acceleo provides support for android based UML Code generations.

What benefits does Maven give (over ant) for building android projects?

I've recently been trying to setup maven for building my android projects, using the maven-android-plugin.
Whilst this is a good exercise, I'm not convinced that the benefits will outweigh the frustration in getting it working.
Can anyone give me some pros/cons on using Maven for android? I'm not looking for subjective answers, but the facts on whether its worth the effort.
Regards
Well maven is worth it if you are developing a j2ee application to save you from the jar hell
when using external apis
So if you are not going to use the maven repositories its not worth it.
I hate maven because of the problems you already mentioned. But it saves a lot time if you need xy jars. Im currently developing a eclipse plugin which can download required jars and dependencies form maven without the maven compiler or pom files. But its far from ready
You can also create a separate maven project and include it in the android project
im not sure if it works with android but you can do it in standart jdk
Maybe the gradle makes more sense.
Google released an ide called AndroidStudio, it uses gradle. Seems like google will suggest gradle in building an Android project.
I tried to use Maven to build my android project, it's hard to use, finally I changed to gradle.
Another good answer on stackoverflow why-use-gradle-instead-of-ant-or-maven
My android app shares business objects and other functionality with my back-end server so I pulled this out into a common maven project which both the app and the server (as maven projects) have a dependency on. Maven is perfect for this sort of thing, so its helpful in this instance, but if you are writing fairly straightforward apps, I'm not sure what benefit maven would have, especially when getting the android-maven-plugin to behave took me so long.

Categories

Resources