Why Google choose Gradle based Android Studio?
When an app is build, it was
mainly done using Eclipse and Ant building system. Eclipse was the IDE, on the
other side Ant was the command-line tool. Eclipse was a complete package and
does not use Ant for building Android projects, but rather has its own build
system. After Google release of Android Studio is based on the IntelliJ
IDEA IDE. It uses the new Gradle-based build system as its native approach
for building Android projects. While the IntelliJ IDEA IDE that serves as
Android Studio’s core also has its own build system (much like Eclipse has
one), IDEA is more amenable to replaceable build systems. Over time, this will
allow Google to focus on a single build system (Gradle) for all supported
scenarios, rather than having to deal with a collection of independent build
systems. Now Google only focues on Android Studio and Gradle based system. For
this reason it becomes familiar with the IDE basics, such as navigation, code
completion, and keyboard shortcuts, interface, easy tools access and other owesome
facilities. Android Studio does not use
workspaces, so separate projects open in separate Android Studio windows. It means
every project keep separate from each other. Android Studio organizes code into projects,
which contain everything that defines your Android app, from app source code to
build configurations and test code. Each project contains one or more modules,
which allow you to divide your project into discrete units of functionality.
Modules can be independently built, tested, and debugged. Althoudh Android
Studio, Eclipse tools successfully building a million-plus apps. You may use
this tools and it still work today.
Now we look some factors for shifting:
- Maintaining two separate build systems (Ant and Eclipse’s native approach) was becoming time consuming. Hence, Google maintain a single build system, based upon Gradle, for IDE and command-line scenarios.
- Ant scripts to do everything that Google needed for builds was getting a bit creaky.
- Ant has no frst-class support for “external libraries” (e.g., libraries) and dependency management of those libraries. Gradle offers much better support in this area than do Eclipse or Ant, and will help make it easier for developers to reliably consume libraries from a variety of authors.
- Gradle is designed to be integrated into IDEs as a library, much more than Ant is.
No comments:
Post a Comment