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

后端 未结 3 1753
星月不相逢
星月不相逢 2021-02-14 05:40

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 b

相关标签:
3条回答
  • 2021-02-14 06:22

    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.

    0 讨论(0)
  • 2021-02-14 06:30

    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

    0 讨论(0)
  • 2021-02-14 06:34

    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

    0 讨论(0)
提交回复
热议问题