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
Dagger2AndBuildVariants
Search
funnelbit
February 24, 2016
Technology
480
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Dagger2AndBuildVariants
funnelbit
February 24, 2016
More Decks by funnelbit
See All by funnelbit
Hatena Engineer Seminar #9
funnelbit
5
7.5k
droidkaigi-2017-renovation
funnelbit
10
11k
Dart
funnelbit
0
300
BottomBarAndSnackBar
funnelbit
0
550
Dagger2 Optional bindings
funnelbit
0
620
WearableRecyclerView
funnelbit
1
850
QucikSettingsTileAPI
funnelbit
0
390
Mobile Vision
funnelbit
0
490
AwarenessAPI
funnelbit
0
170
Other Decks in Technology
See All in Technology
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
180
LLMに渡さなかった仕事
nanaism
0
110
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
390
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
19
14k
データ_AIの事業の勝敗をわけるもの
nek0128
0
320
GoCon2026 - Open Source, Open World
sanposhiho
4
4.4k
SQL文一行も書けない人事がCortexもろもろを使って人事業務を楽にしてみる
ponponmikankan
1
240
Screen Lens - 今見てる画面を翻訳する
komagata
0
290
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
2.9k
What the customer really needed
kawaguti
PRO
1
150
おい、エージェントを使って終わらせろ
nwiizo
0
210
品質と信頼性を地続きにする
grimoh
0
300
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Chasing Engaging Ingredients in Design
codingconduct
0
310
Build your cross-platform service in a week with App Engine
jlugia
234
19k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Between Models and Reality
mayunak
4
460
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Un-Boring Meetings
codingconduct
0
420
Documentation Writing (for coders)
carmenintech
77
5.5k
Transcript
%BHHFS ͱ #VJME7BSJBOUT ଜɹྋ
ࣗݾհ w ଜɹྋ w ͯͳJEGVOOFMCJU w 5XJUUFSJEFYQFSPQFSP
None
ͯͳϒοΫϚʔΫ
%BHHFS #VJME7BSJBOUT
%BHHFS w IUUQHPPHMFHJUIVCJPEBHHFS w %*ίϯςφ w "15ͬͯίϯύΠϧ࣌ʹґଘղܾ
#VJME7BSJBOUT w #VJME5ZQFT 1SPEVDU'MBWPST
HSBEF productFlavors { typea { applicationId "com.funnelbit.testablediconceptapplication.typea" } typeb {
applicationId "com.funnelbit.testablediconceptapplication.typeb" } }
TSDNBJOKBWB TSDUZQFBKBWB TSDUZQFCKBWB
TSDNBJOKBWB
"QQ$PNQPOFOU#BTF public interface AppComponentBase { // App void inject(App app);
// Activity void inject(MainActivity mainActivity); }
"QJ$MJFOU public interface ApiClient { void request(String query, Callback callback);
class Response { public final String body; public Response(String body) { this.body = body; } } interface Callback { void onSuccess(Response response); void onFail(Exception e); } }
&OUSZ.BOBHFS public class EntryManager { final ApiClient mApiClient; @Inject EntryManager(ApiClient
apiClient) { mApiClient = apiClient; } public void create() { mApiClient.request("create query", new ApiClient.Callback() { … }); } public void delete() { mApiClient.request("delete query", new ApiClient.Callback() { … }); } }
.BJO"DUJWJUZ public class MainActivity extends AppCompatActivity { @Inject EntryManager mEntryManager;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ((App) getApplication()).getAppComponent().inject(this); setContentView(R.layout.activity_main); mEntryManager.create(); mEntryManager.delete(); } }
TSDUZQFBKBWB
"QQ$PNQPOFOU @Component(modules = AppModule.class) public interface AppComponent extends AppComponentBase {
}
"QQ.PEVMF @Module public class AppModule { @Provides public ApiClient provideApiClient()
{ return new AppClientImpl(); } }
"QQ public class App extends Application { private AppComponent mAppComponent;
@Override public void onCreate() { super.onCreate(); mAppComponent = DaggerAppComponent.builder() .appModule(new AppModule()) .build(); } public AppComponent getAppComponent() { return mAppComponent; } }
"QQ$MJFOU*NQM public class AppClientImpl implements ApiClient { @Override public void
request(String query, Callback callback) { callback.onSuccess(new Response("production response")); } }
TSDUZQFCKBWB
"QQ$PNQPOFOU @Component(modules = {StubAppModule.class, DebugModule.class}) public interface AppComponent extends AppComponentBase
{ }
4UVC"QQ.PEVMF @Module public class StubAppModule { @Provides public ApiClient provideApiClient()
{ return new StubApiClient(); } }
"QQ public class App extends Application { private AppComponent mAppComponent;
@Inject LogUtil mLogUtil; @Override public void onCreate() { super.onCreate(); mAppComponent = DaggerAppComponent.builder() .stubAppModule(new StubAppModule()) .debugModule(new DebugModule()) .build(); mAppComponent.inject(this); mLogUtil.debugLog("͜Μʹͪ"); } public AppComponent getAppComponent() { return mAppComponent; } }
ߏ·ͱΊ w ڞ௨ͯ͠͏ͷNBJOʹ͔͘ w ৼΔ͍Λม͍͑ͨ߹*OKFDU w "QQNBJOʹஔ͔ͳ͍ w $PNQPOFOUNBJOͷ֎ w
.PEVMFNBJOҎ֎ͷ֎
·ͱΊ w ͕͍ͨ͠Ͱ͢ w ͲΜͳײ͡Ͱಋೖ͍ͯ͠Δ͔ w ςετͷ࣌Ͳ͏ͯ͠Δ͔
͋Γ͕ͱ͏͍͟͝·ͨ͠