Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Modern Java Libraries with Kotlin

Modern Java Libraries with Kotlin

potatotips #40

Keisuke Kobayashi

May 24, 2017
Tweet

More Decks by Keisuke Kobayashi

Other Decks in Programming

Transcript

  1. NG: Ϗϧυ͕௨Βͳ͍ @Module class AppModule(private val context: Context) { @Singleton

    @Provides fun provideOrmaDatabase(context: Context): OrmaDatabase { return OrmaDatabase.builder(context).build() } }
  2. Dagger Module @Module class AppModule(private val context: Context) { @Singleton

    @Provides fun provideOrmaHolder(context: Context): OrmaHolder { return OrmaHolder(context) } }
  3. Data binding • dependenciesʹkaptͰ௥Ճ android { dataBinding { enabled true

    } } dependencies { kapt 'com.android.databinding:compiler:x.y.z' }