Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
BUILDING A POPULAR OPEN-SOURCE ANDROID LIBRARY BEST PRACTICES AND LESSONS LEARNED
Slide 2
Slide 2 text
JAMES SMITH loopj loopj
Slide 3
Slide 3 text
No content
Slide 4
Slide 4 text
android-async-http http://loopj.com/android-async-http
Slide 5
Slide 5 text
WHAT IS A LIBRARY?
Slide 6
Slide 6 text
WHY SHOULD I BUILD A LIBRARY?
Slide 7
Slide 7 text
HOW DO OTHER PEOPLE USE LIBRARIES? https://github.com/google/gson https://github.com/bugsnag/bugsnag-android https://github.com/square/leakcanary http://square.github.io/picasso/
Slide 8
Slide 8 text
CREATING A LIBRARY
Slide 9
Slide 9 text
USE GRADLE $ android create lib-project --target \ --path path/to/your/project \ --package com.mylib \ --gradle \ --gradle-version 1.3.1
Slide 10
Slide 10 text
AAR VS JAR
Slide 11
Slide 11 text
HOW TO STRUCTURE YOUR PROJECT # Build configuration build.gradle # Tests! src/androidTest/com/mylib/ # Main library classes src/main/com/mylib/
Slide 12
Slide 12 text
BUILDING THE LIBRARY $ gradle $ ./gradlew or
Slide 13
Slide 13 text
TESTING YOUR LIBRARY
Slide 14
Slide 14 text
WRITE AND USE UNIT TESTS http://developer.android.com/tools/testing/testing_android.html
Slide 15
Slide 15 text
RUN YOUR TESTS $ gradle clean connectedCheck
Slide 16
Slide 16 text
DOCUMENTING YOUR LIBRARY
Slide 17
Slide 17 text
README.MD JAVADOC EXAMPLE APPS
Slide 18
Slide 18 text
PUBLISHING YOUR LIBRARY
Slide 19
Slide 19 text
MAVEN CENTRAL vs JCENTER
Slide 20
Slide 20 text
AUTOMATING A RELEASE https://docs.gradle.org/current/userguide/publishing_maven.html https://github.com/chrisbanes/gradle-mvn-push https://github.com/bintray/gradle-bintray-plugin
Slide 21
Slide 21 text
TELL THE WORLD - GET FEEDBACK
Slide 22
Slide 22 text
REDDIT.COM/R/ANDROID ANDROID SUBREDDIT
Slide 23
Slide 23 text
NEWS.YCOMBINATOR.COM HACKER NEWS
Slide 24
Slide 24 text
https://plus.google.com/communities/ 105153134372062985968 OFFICIAL ANDROID GOOGLE+
Slide 25
Slide 25 text
CHECK OUT THE BUGSNAG LIBRARY https://github.com/bugsnag/bugsnag-android
Slide 26
Slide 26 text
THANK YOU!
Slide 27
Slide 27 text
QUESTIONS?