From 8d7502a6e43c93b2012192f321e8354e686e30c0 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Fri, 7 Jun 2024 15:44:56 +0900 Subject: [PATCH 1/2] week7 clear --- app/src/main/java/com/sopt/now/compose/di/NetModule.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/sopt/now/compose/di/NetModule.kt b/app/src/main/java/com/sopt/now/compose/di/NetModule.kt index 9fa37b6..fb331c5 100644 --- a/app/src/main/java/com/sopt/now/compose/di/NetModule.kt +++ b/app/src/main/java/com/sopt/now/compose/di/NetModule.kt @@ -1,8 +1,8 @@ package com.sopt.now.compose.di import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory -import com.sopt.now.compose.BuildConfig.BASE_URL -import com.sopt.now.compose.BuildConfig.REQRES_URL +import com.sopt.now.BuildConfig.BASE_URL +import com.sopt.now.BuildConfig.REQRES_URL import com.sopt.now.compose.di.qualifier.AUTH import com.sopt.now.compose.di.qualifier.HEADER import com.sopt.now.compose.di.qualifier.REQRES @@ -17,6 +17,7 @@ import okhttp3.Interceptor import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor +import org.json.JSONArray import org.json.JSONObject import retrofit2.Converter import retrofit2.Retrofit @@ -50,7 +51,7 @@ object NetModule { Timber.tag(OKHTTP).d(JSONObject(message).toString(UNIT_TAB)) message.isJsonArray() -> - Timber.tag(OKHTTP).d(JSONObject(message).toString(UNIT_TAB)) + Timber.tag(OKHTTP).d(JSONArray(message).toString(UNIT_TAB)) else -> { Timber.tag(OKHTTP).d("CONNECTION INFO -> $message") From fb8a197ed58f35e1e8adf85eca52c3f976acf8b1 Mon Sep 17 00:00:00 2001 From: Dongmin Date: Mon, 17 Jun 2024 13:46:40 +0900 Subject: [PATCH 2/2] kapt -> ksp --- app/build.gradle | 4 ++-- app/src/main/java/com/sopt/now/compose/di/NetModule.kt | 4 ++-- build.gradle | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d9c043b..93a1aa5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,7 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' - id 'kotlin-kapt' + id 'com.google.devtools.ksp' id 'dagger.hilt.android.plugin' id 'kotlin-parcelize' id 'org.jetbrains.kotlin.plugin.serialization' @@ -82,7 +82,7 @@ dependencies { //noinspection GradleDependency implementation "com.google.dagger:hilt-android:$hilt_version" - kapt "com.google.dagger:hilt-android-compiler:$hilt_version" + ksp "com.google.dagger:hilt-android-compiler:$hilt_version" implementation 'androidx.hilt:hilt-navigation-compose:1.2.0' // Glide diff --git a/app/src/main/java/com/sopt/now/compose/di/NetModule.kt b/app/src/main/java/com/sopt/now/compose/di/NetModule.kt index fb331c5..7074f14 100644 --- a/app/src/main/java/com/sopt/now/compose/di/NetModule.kt +++ b/app/src/main/java/com/sopt/now/compose/di/NetModule.kt @@ -1,8 +1,8 @@ package com.sopt.now.compose.di import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory -import com.sopt.now.BuildConfig.BASE_URL -import com.sopt.now.BuildConfig.REQRES_URL +import com.sopt.now.compose.BuildConfig.BASE_URL +import com.sopt.now.compose.BuildConfig.REQRES_URL import com.sopt.now.compose.di.qualifier.AUTH import com.sopt.now.compose.di.qualifier.HEADER import com.sopt.now.compose.di.qualifier.REQRES diff --git a/build.gradle b/build.gradle index 2623a72..d1f9494 100644 --- a/build.gradle +++ b/build.gradle @@ -2,9 +2,11 @@ buildscript { ext { hilt_version = "2.51" + ksp_version = "1.9.0-1.0.13" } dependencies { + classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:$ksp_version" classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version" } } @@ -13,4 +15,5 @@ plugins { id 'com.android.library' version '8.3.1' apply false id 'org.jetbrains.kotlin.android' version '1.9.0' apply false id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.20' apply false + id 'com.google.devtools.ksp' version "$ksp_version" apply false }