Slide 14
Slide 14 text
Decide what you are providing
Library Project
jar
(Java ARchive)
Apk Lib
aar
(Android Archive Resource)
Library project, oldest standard android library project, standard checkout source code, you can link your source to, you can make reviews and edit it, but it’s not easy upgradable, there
is no versioning. So it’s not the most flexible.
JARs: great if you want to create a java library but they don’t include views or anything coming from android so if you don’t need it, it’s fine but as soon as you try to use some android
related functionality it won’t work.
ApkLibs: community focused effort around delivering library projects over a maven repository. It’s basically a compressed version of an android library project where the android maven
plugin includes the library project in the generated source code folder. But it’s not the recommended way and it doesn’t play well with some tools.
aar: recommended way by google, integrates seemlessly into gradle, supported by maven, it supports views. It’s a zip that compiles code and resources.