Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dagger2AndBuildVariants
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
巨大気象データと戦う ― サロゲートモデル学習を高速化する圧縮技術
gpuunite_official
0
180
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
160
自宅NWにISR4331を導入してみた話
okaits
0
120
関東Kaggler会発表資料
takoi
1
270
長期運営で肥大化したExcelマスターデータの解消に向けた移行事例
gree_tech
PRO
0
100
AI開発に用いられるHPC技術について
gpuunite_official
0
190
SmartHR Engineering Team Deck
smarthr
1
3.1k
AI for Science時代を切り開く、政府の次世代HPC戦略の展望
gpuunite_official
0
130
Sets in Go
ramalho
1
1.2k
Go 1.27 の標準パッケージに uuid が入った!のでいろいろ喋る / go_127_std_go_uuid
convto
3
560
Kiro Crew入門 - 常駐エージェントの仕組みと使いどころ / Intro to Kiro Crew
k_adachi_01
1
660
Model Studio CLI × Token Plan
maigo999
0
200
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
440
Building Adaptive Systems
keathley
44
3.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
430
Balancing Empowerment & Direction
lara
6
1.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
900
The Curious Case for Waylosing
cassininazir
1
470
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
430
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
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 ςετͷ࣌Ͳ͏ͯ͠Δ͔
͋Γ͕ͱ͏͍͟͝·ͨ͠