본문
180322(목) - Architecture Component (Adding Components to your Project)
Architecture/MVVM 2018. 3. 22. 23:45
Architecture Component
Adding Components to your Project
add project 'build.gradle'
allprojects {
repositories {
jcenter()
google()
}
}
Kotlin 사용시
annotationProcessor -> kapt
add 'kotlin-kapt plugin
dependencies {
// ViewModel and LiveData
implementation "android.arch.lifecycle:extensions:1.1.1"
// alternatively, just ViewModel
implementation "android.arch.lifecycle:viewmodel:1.1.1"
// alternatively, just LiveData
implementation "android.arch.lifecycle:livedata:1.1.1"
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
// Room (use 1.1.0-beta1 for latest beta)
implementation "android.arch.persistence.room:runtime:1.0.0"
annotationProcessor "android.arch.persistence.room:compiler:1.0.0"
// Paging
implementation "android.arch.paging:runtime:1.0.0-alpha7"
// Test helpers for LiveData
testImplementation "android.arch.core:core-testing:1.1.1"
// Test helpers for Room
testImplementation "android.arch.persistence.room:testing:1.0.0"
}
dependencies {
// Java8 support for Lifecycles
implementation "android.arch.lifecycle:common-java8:1.1.1"
}
dependencies {
// RxJava support for Room (use 1.1.0-beta1 for latest alpha)
implementation "android.arch.persistence.room:rxjava2:1.0.0"
// ReactiveStreams support for LiveData
implementation "android.arch.lifecycle:reactivestreams:1.1.1"
}
dependencies {
// Guava support for Room
implementation "android.arch.persistence.room:guava:1.1.0-beta1"
}
dependencies {
// Lifecycles only (no ViewModel or LiveData)
implementation "android.arch.lifecycle:runtime:1.1.1"
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
}
'Architecture > MVVM' 카테고리의 다른 글
180328(목) - Android Architecture Components (LiveData) (0) | 2018.03.29 |
---|---|
180328(수) - Android Architecture Components (Handling Lifecycles) (0) | 2018.03.28 |
180326(화) - Android Architecture Components (Adding components to Project) (0) | 2018.03.27 |
180322(목) - Android Architecture Component (Guide to App Architecture) (0) | 2018.03.23 |
180322(목) - MVVM & AAC (0) | 2018.03.22 |
댓글