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.
0x0me source share