As I constantly learn new features about gradle, I often reflect on the differences between these two build systems.
The following observations are mainly focused on my experience in Android development.
3rd party libraries integration -
Assuming you use Maven in Eclipse based project, the process is tedious including adding the entire project source as a project, marking it as library dependency & modifying manually the permissions in the AndroidManifest.xml files.
In gradle, you simply define the dependency. It has the aar format concept when it will do all the merge automatically into the final apk.
Version control -
In maven, you must either specify a version for a given dependency or use the word SNAPSHOT to use a certain version that is subject to updates.
i.e if you define dependency in spring core:
or in its development version:org.springframework spring-core 4.2.4.RELEASE
org.springframework spring-core 4.2.4.SNAPSHOT
You will always get the 4.2.4 version.
so if an artifact is released with a new version (different number) you would get it automatically.
This mechanism has even finer granularity as you can specify 3.+ and get only updates which related to version 3.
The reason maven has real issues with determining which version is last is because it allows setting alphanumeric characters in the version (e.g. alpha, beta, ..).
In gradle, you are encouraged to use numbers only and hence it would automatically recognize which is the latest.
include this link to the original post
No comments :
Post a Comment