Writing Android Libraries
summary
Practical checklist: design a clear API that is hard to misuse, produce source jars, and prefer use JUnit 4 for parametric tests; automate builds and matrix permutations with automate with Jenkins and publish to Bintray/JCenter rather than fighting Maven Central. Prefer annotation processing to avoid runtime reflection and note a real-world case where switching from Dex maker runtime generation to compile‑time generation yields about 10× faster builds; use bytecode weaving only for the few places annotation processors cannot modify.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:34WHY WOULD YOU WRITE AN ANDROID LIBRARY?
- 3:05HOW TO START AN ANDROID LIBRARY PROJECT?
- 3:311. Create a new Application project 2. Add a new Library module
- 4:35API DESIGN
- 5:08SOLUTION DEFINE WHAT A GOOD APLIS
- 9:59TESTING IS EVEN MORE IMPORTANT FOR LIBRARIES THAN FOR APPLICATIONS BECAUSE YOU HAVE NO IDEA HOW YOUR USERS ARE GOING TO USE IT.
- 11:08LET JENKINS BECOME YOUR BEST FRIEND
- 14:01SOLUTION 3 WRITE SAMPLE APPS
- 15:07JAR OR AAR?
- 16:01SOLUTION USE AAR
- 16:31WHERE TO PUBLISH?
- 19:27REFLECTION IS SLOW
- 20:00SOLUTION ANNOTATION PROCESSING
- 23:43SOMETIMES ANNOTATION PROCESSING IS NOT POWERFUL ENOUGH
- 24:09SOLUTION BYTECODE WEAVING
- 29:13NATIVE CODE
- 31:29QUESTIONS?
related talks
47mThe definitive guide to Android library development
37mAndroid Librarian's Guide: Building Robust Libraries a…
44mBuilding and Publishing Android Libraries the Missing Guide
26mArchitecting Your Android Library
29mDon't reinvent the wheel, use libraries: Modern Android Stack
39mAndroid Open-source repositories 101
41mFirst, Do No Harm
37mPerforming Due Diligence as Android Developers
