Android(Kotlin)

자주쓰는 라이브러리 implementation 정리 (그때 그때 추가 예정)

E.I.T.U 2023. 8. 11. 09:55

1. dagger-hilt

//project 수준의 build.gradle
plugins {
  ...
  id 'com.google.dagger.hilt.android' version '2.44' apply false
}

----------------------------------------------------------------------

//app 수준의 build.gradle
plugins {
  id 'kotlin-kapt'
  id 'com.google.dagger.hilt.android'
}

android {
  ...
}

dependencies {
  implementation "com.google.dagger:hilt-android:2.44"
  kapt "com.google.dagger:hilt-compiler:2.44"
}

// Allow references to generated code
kapt {
  correctErrorTypes true
}

2. Retrofit2

//app 수준의 build.gradle
dependencies {
	implementation 'com.google.code.gson:gson:2.9.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.9.0'
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
}

3. Glide & Glide-Compose

//app 수준의 build.gradle
dependencies {
	//Glide
	implementation 'com.github.bumptech.glide:glide:4.15.1'
    //Glide-Compose
    implementation "com.github.bumptech.glide:compose:1.0.0-alpha.1"
}

3. KTX

implementation {
	//by viewModels()
    implementation 'androidx.activity:activity-ktx:1.5.0'
    implementation 'androidx.fragment:fragment-ktx:1.5.0'
}