Skip to content

Commit

Permalink
[feature/remove-databinding] Data Binding + kapt 동시 제거 (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
l2hyunwoo authored Oct 15, 2023
1 parent 4eb5622 commit 54cf291
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 214 deletions.
4 changes: 0 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ android {
}
}

buildFeatures {
dataBinding = true
}

buildTypes {
debug {
firebaseAppDistribution {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import android.net.Uri
import android.os.Bundle
import android.util.Size
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.flowWithLifecycle
import androidx.lifecycle.lifecycleScope
import coil.load
import com.google.android.material.datepicker.CalendarConstraints
import com.google.android.material.datepicker.DateValidatorPointBackward
import com.google.android.material.datepicker.MaterialDatePicker
import com.teampophory.pophory.R
import com.teampophory.pophory.common.activity.BindingActivity
import com.teampophory.pophory.common.context.colorOf
import com.teampophory.pophory.common.context.snackBar
import com.teampophory.pophory.common.context.toast
Expand All @@ -22,6 +22,7 @@ import com.teampophory.pophory.common.image.getAdjustedSize
import com.teampophory.pophory.common.intent.stringExtra
import com.teampophory.pophory.common.time.systemNow
import com.teampophory.pophory.common.view.setOnSingleClickListener
import com.teampophory.pophory.common.view.viewBinding
import com.teampophory.pophory.databinding.ActivityAddPhotoBinding
import com.teampophory.pophory.feature.home.store.model.AlbumItem
import dagger.hilt.android.AndroidEntryPoint
Expand All @@ -34,12 +35,14 @@ import java.util.Locale
import java.util.TimeZone

@AndroidEntryPoint
class AddPhotoActivity : BindingActivity<ActivityAddPhotoBinding>(R.layout.activity_add_photo) {
class AddPhotoActivity : AppCompatActivity() {
private val binding by viewBinding(ActivityAddPhotoBinding::inflate)
private val viewModel: AddPhotoViewModel by viewModels()
private val imageUri by stringExtra()

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)
loadImage()
initView()
subscribeEvent()
Expand Down Expand Up @@ -152,7 +155,7 @@ class AddPhotoActivity : BindingActivity<ActivityAddPhotoBinding>(R.layout.activ
}

companion object {
const val IMAGE_URL_EXTRA = "imageUri"
private const val IMAGE_URL_EXTRA = "imageUri"
const val ALBUM_ITEM_EXTRA = "albumItem"
const val IMAGE_MIME_TYPE = "image/*"

Expand Down
289 changes: 141 additions & 148 deletions app/src/main/res/layout/activity_add_photo.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AndroidHiltPlugin : Plugin<Project> {
"implementation"(libs.findLibrary("hilt").get())
"ksp"(libs.findLibrary("hilt.compiler").get())
"testImplementation"(libs.findLibrary("hilt.testing").get())
"kaptTest"(libs.findLibrary("hilt.testing.compiler").get())
"kspTest"(libs.findLibrary("hilt.testing.compiler").get())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ internal fun Project.configureAndroidCommonPlugin() {
apply<AndroidKotlinPlugin>()
apply<KotlinSerializationPlugin>()
with(plugins) {
apply("kotlin-kapt")
apply("kotlin-parcelize")
}
apply<AndroidHiltPlugin>()
Expand Down
4 changes: 0 additions & 4 deletions core/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ plugins {
android {
namespace = "com.teampophory.pophory.common"

buildFeatures {
dataBinding = true
}

defaultConfig {
consumerProguardFiles("consumer-rules.pro")
}
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 54cf291

Please sign in to comment.