I find two gradle Android plugins. Is there any relationship between the two?

I tried to learn how to create an Android app with Gradle. To my surprise, I found two links: one from jvoegele and another from the Android Tools Project . They seem different prima facie. So my question is, why are there two options? Is there a connection between the two? What is their current status? Which one should I use - their pros and cons? Android seems to have just begun.

I look forward to some valuable insights from guys who have experience working in an Android app with Gradle.

Thank you and welcome

Santanu

+6
source share
3 answers

I just play with the gradle plugin from the Android tools project site and it’s hard for him to understand how everything should work. It is not well integrated into the eclipse development workflow, even the default project configuration for eclipse did not work for me. This can be fixed by expanding the creation of the project file and the classpath file and changing the layout of the project inside the gradle assembly file.

To fix the creation of the eclipse project, I got inspiration from the plugin from jvoegele (credits go there):

eclipse{ project { natures "com.android.ide.eclipse.adt.AndroidNature" def builders = new LinkedList(buildCommands) builders.addFirst(new BuildCommand("com.android.ide.eclipse.adt.PreCompilerBuilder")) builders.addFirst(new BuildCommand("com.android.ide.eclipse.adt.ResourceManagerBuilder")) builders.addLast(new BuildCommand("com.android.ide.eclipse.adt.ApkBuilder")) buildCommands = new ArrayList(builders) } classpath { containers.removeAll { it == "org.eclipse.jdt.launching.JRE_CONTAINER" } containers "com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" plusConfigurations += configurations.compile file { whenMerged { classpath -> classpath.entries.removeAll { it instanceof SourceFolder && (it.dir?.path == "gen" || it.dir?.path == "src") } classpath.entries.add(new SourceFolder("gen", null)) classpath.entries.add(new SourceFolder("src", null)) } } } } 

If you want your project to work quickly, this plugin is not suitable for you.

+1
source

The original Android gradle plugin from jvoegele is no longer supported , but the function gap between the com.android.tools.build plugin is narrowing.

+1
source

In the long run, I will undoubtedly take up the Android Tools project; it really works, but the Android tool group is very active on this. Their intention is to have this as an alternative to the current ant build system.

0
source

All Articles