Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Best Practices Mobile SDKs_DroidConGreece16
Search
Emma Tresanszki
July 08, 2016
Technology
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Best Practices Mobile SDKs_DroidConGreece16
Best practices in building mobile SDKs - DroidCon Greece 2016
Emma Tresanszki
July 08, 2016
Transcript
37 slides
Best Practices in Building Mobile SDKs Emma Tresanszki Android Developer
[email protected]
GitHub: @emmaChristine
About me
Agenda - SDK or Library? - Managing Dependencies - Creating
Libraries - Publishing Libraries
SDK or Library?
SDK or library ? A library -> chunk of code
An SDK -> is still a library (often with extra tool applications, data files and sample code)
Why do we need one? Make an existing service or
API easily usable Offer a mobile specific service
Examples
Examples 2FA phone number verification
Why not ?
None
None
None
Managing dependencies
Which dependency ? Developers can’t be trusted to update their
dependencies? compile 'com.android.support:appcompat-v7:23.0.+' But what has changed? In Gradle, dynamic versions use the + sign:
Dynamic dependencies are evil Dynamic versions add nondeterminism to your
build. - Behaviour changes - “But it works on my machine” - Difficult to revert Fix it
Versioning - Version numbers are used to encode compatibility for
the API. - Local store the current version/configurable file - Semantic versioning {major}.{minor}.{bugfix}. - Use stable version instead of beta.
Using <SNAPSHOT> in development - Prevent caching while developing -
or lower cache setting
None
What is .aar ? - /AndroidManifest.xml (mandatory) - /classes.jar (mandatory)
- /res/ (mandatory) - /R.txt (mandatory) - /assets/ (optional) - /libs/*.jar (optional) - /proguard.txt (optional) - /lint.jar (optional) - I/O 2013
Validation - Fail fast when rejecting invalid params. Actually not
all the time! - Do not discard future capabilities. - Should be flexible:let the API handle rejections instead.
Should your SDK include UI ? - Fabric Digits’ button
& Themes
Library size - Library size: 3rd party dependencies or not
at all - e.g. libphonenumber in a 2fa phone verification lib ( ~500KB)
Packaging: Permissions - Runtime permissions - Marker selectors - Don’t
let libraries silently add permissions to your app project/module/build/intermediates/manifests/full/[flavor]/build-type/AndroidManifest.xml.
Keep a changeLOG - Is there a standard changeLOG format?
- Why should I care? - Why can’t people just use a git log diff? - Minimize the effort by using an “UNRELEASED” section - How bad can it be? - No deprecation - Dates in region-specific formats
Keep a changeLOG What makes a good changeLOG? - Readable
- Dates YYYY-MM- DD - Group changes ADDED CHANGED DEPRECATED REMOVED FIXED SECURITY
DOCUMENTATION - Copy-paste a working demo. - How much time
you should hook the dev? - Good API reference - Advanced usage - Changelogs <version number>
Publish .aar
Publish to central repo - requirements - GAV coordinates -
Sign files with GPG/PGP
Publish to central repo - requirements - Project, description and
URL - License, Developer and SCM information
~/.gradle/gradle.properties
~/.gradle/gradle.build
~/.gradle/gradle.properties
$gradle uploadArchives
Stage & release
Done!
Thanks! Emma Tresanszki Android Developer
[email protected]
GitHub: @emmaChristine
References - Automated Gradle project deployment to Sonatype OSS repository
- Maven Repository Usage Guide - http://www.leveluplunch.com/java/examples/parse-phone-number-from-string/ - http://www.theappguruz.com/blog/integrate-paypal-in-android//dropbox - http://blog.danlew.net/2015/09/09/dont-use-dynamic-versions-for-your-dependencies/ - https://github.com/olivierlacan/keep-a-changelog - http://skife.org/src/design/libraries/2011/12/14/library_versioning.html
More Decks by Emma Tresanszki
See All by Emma Tresanszki
Improve your code with Lint checks for Kotlin
emmatresanszki
0
62
AndroidSummit2017_Best practices in building mobile libraries
emmatresanszki
0
55
Other Decks in Technology
See All in Technology
RAGの改善を速く回すための評価基盤
yosukeyoshida
6
3.3k
統制されたID・権限をどう利用するか : DPoP/FAPIによるAPIセキュリティ強化
oidfj
1
220
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
410
AIネイティブ組織の作り方。1人のPOとAIから始める、自社での実験
ama_ch
2
1.2k
メルカリの小規模チーム「Pod」で、 エンジニアがデータアナリストなしで、 AIを使ってデータ分析の自走を目指す取り組み
jackojacko_
0
250
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
3
890
飯から始まるデータエンジニア
sansantech
PRO
0
110
お風呂場をサーバルームにしよう
yusuke427
0
370
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
10
5.8k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
【AWS reInvent 2026 関西組 事前勉強会】二度あることは三度ある~調子に乗りそうな3回目の私を戒めたいです~
ttelltte
0
110
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.8k
Featured
See All Featured
Music & Morning Musume
bryan
48
7.5k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
550
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Utilizing Notion as your number one productivity tool
mfonobong
4
650
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
Facilitating Awesome Meetings
lara
57
7.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
Fireside Chat
paigeccino
43
4.1k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
490