On the other hand, I want to be using the best and latest tools, and stay up to date with what the broader Android dev community is doing.
Would love to hear from others with similar feelings...
On the other hand, I want to be using the best and latest tools, and stay up to date with what the broader Android dev community is doing.
Would love to hear from others with similar feelings...
Android Studio is fanciful, I used it for months during the beta. There is one gotcha which leads me to prefer Eclipse. In Eclipse, the compile process is much more integrated with the IDE. The compile step appears to happen inside the IDE app/process tree/whatever. In JetBrains, the compile process is a separate process, much more disconnected from the IDE. Hence JetBrains takes more memory and is slower and running a project build and getting errors back into the IDE. I can appreciate an external build process being flexible for Jetbrains to use their IDE with nearly any language/compiler, but Eclipse worked much faster overall on a 4GB ram setup.
Eclipse has it's own compiler and it uses that to build from within the IDE. Since this is not using Javac, it means that you might and very likely will not have equivalent binaries. Not specific to Android, but this also meant that when a new version of Java is released, IntelliJ can immediately take advantage, but you will be stuck waiting on Eclipse (and NetBeans).
Personally, I prefer the IntrlliJ approach since the IDE, javac on my workstation, and javac on the build server can output identical binaries, I trust the results even more so.
Also, if I am not mistaken, IDEA has its own compiler, as well. It just doesn't emit bytecode.
Gradle covers the 80% use case really well. Everyone new to Android should use Studio + Gradle, no question. Dependencies are a breeze, the integration between Gradle & Studio is wonderful, the syntax is super simple, and the plugin handles most things by default pretty well. There are several things like build variants & package name interpolation that were impossible with Ant, difficult with Maven, and are trivial with Gradle.
The intermediate level stuff is more of a mixed bag. Some tests work well with Gradle, others (like Robolectric) are more of a pain. The NDK support isn't worked out yet. Some of the more fringe plugins like code coverage and formatting aren't plugged in yet. Here you will probably have to understand a bit about Gradle, but the tools team is making progress fixing the issues. What was a problem 2 months ago just works out of the box today with no Gradle specific knowledge.
For advanced things like writing your own plugins, then you have to know the respective build system. I don't know Maven well enough to write my own plugins. I have written a couple Gradle plugins. I have one that uploads APKs at the end of the build to various distribution APIs, one for secure signing, and one for bumping the versions whenever I want to. It was pretty straightforward to figure out.
I'd concede that Studio/Gradle is the future, and that Gradle is more powerful than Maven; my "issues" are purely emotional :) With all that there is to learn and explore in this world, I don't want to have to spend time on another Java build tool when I already know 2 good ones (Ant and Maven).
Sixty-six.
I would certainly not call Gradle easy nor fast to learn.
[1] https://www.gradle.org/docs/current/userguide/userguide.html
Not only that, but I suspect Gradle won't use Groovy to parse the build scripts for much longer. Those scripts conform to a rough CSS-style syntax that Gradleware could easily replace with their own custom lightweight parser calling Java 8 lambdas. Given that they replaced virtually all the Groovy in their codebase with Java when they upgraded to Gradle 2.0, the next logical step is to eliminate dependence of the Groovy parser as soon as they can.
The Android specific ones are here:
* http://developer.android.com/tools/building/configuring-grad...
* http://tools.android.com/tech-docs/new-build-system/user-gui...
And then one day, I realized that the web site that I always get back to in order to fix my build files is Stack Overflow, not gradle.org.
The fact that the documentation is so big is an issue, not a feature, because at this size, it's just too big to navigate, contains extreme amounts of redundancies between sections and basically, is not usable in this form.
You know your tool has a problem when the only way to fix problems is to search Stack Overflow.
It's when your app becomes more complicated (product flavor's for example), that you need to read and understand the gradle documentation. If this is the case, then you are not a novice and 66 chapters of docs is a blessing not a curse.
and Again _the Android gradle plug-in only supports a subset of gradle_!