Skip to content

Commit

Permalink
[CHORE]#7 Kakao sdk 기본 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
flash159483 committed Jun 21, 2024
1 parent 227ab7b commit dd973a9
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 1 deletion.
21 changes: 21 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import org.jetbrains.kotlin.konan.properties.Properties


val properties = Properties()
properties.load(rootProject.file("local.properties").inputStream())

plugins {
alias(libs.plugins.wespot.android.application)
alias(libs.plugins.wespot.android.hilt)
Expand All @@ -7,6 +13,19 @@ plugins {

android {
namespace = "com.bff.wespot"

defaultConfig {
buildConfigField("String", "KAKAO_APP_KEY", properties.getProperty("KAKAO_APP_KEY"))
resValue(
"string",
"SCHEME_KAKAO_APP_KEY",
properties.getProperty("SCHEME_KAKAO_APP_KEY")
)
}

buildFeatures {
buildConfig = true
}
}

dependencies {
Expand All @@ -17,6 +36,8 @@ dependencies {
implementation(project(":core:ui"))
implementation(project(":core:common"))
implementation(project(":feature:auth"))

implementation(libs.kakao.sdk)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.core.ktx)
Expand Down
19 changes: 19 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".WeSpotApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
Expand All @@ -23,6 +26,22 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
android:launchMode="singleTask"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="oauth"
android:scheme="@string/SCHEME_KAKAO_APP_KEY" />
</intent-filter>
</activity>
</application>

</manifest>
5 changes: 5 additions & 0 deletions app/src/main/kotlin/com/bff/wespot/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ package com.bff.wespot

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import com.bff.wespot.auth.AuthScreen

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
AuthScreen()
}
}
}
11 changes: 11 additions & 0 deletions app/src/main/kotlin/com/bff/wespot/WeSpotApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.bff.wespot

import android.app.Application
import com.kakao.sdk.common.KakaoSdk

class WeSpotApplication : Application() {
override fun onCreate() {
super.onCreate()
KakaoSdk.init(this, BuildConfig.KAKAO_APP_KEY)
}
}
2 changes: 2 additions & 0 deletions feature/auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ dependencies {
implementation(project(":core:model"))
implementation(project(":core:ui"))
implementation(project(":designsystem"))

implementation(libs.kakao.sdk)
implementation(libs.bundles.androidx.compose)
implementation(libs.bundles.orbit)
implementation(libs.junit)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.bff.wespot.auth

import androidx.compose.runtime.Composable

@Composable
fun AuthScreen() {

}
1 change: 0 additions & 1 deletion feature/auth/src/main/kotlin/com/bff/wespot/auth/empty

This file was deleted.

4 changes: 4 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ junit-version = "1.1.5"
espresso-core = "3.5.1"
appcompat = "1.7.0"

kakao_sdk = "2.12.1"

[libraries]
android-build = { module = "com.android.tools.build:gradle", version.ref = "gradle-plugin" }
kotlin-gradle = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
Expand Down Expand Up @@ -91,6 +93,8 @@ androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "j
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }

kakao_sdk = { group = "com.kakao.sdk", name = "v2-user", version.ref = "kakao_sdk" }

[bundles]
androidx-compose = [
"androidx-activity-compose",
Expand Down
3 changes: 3 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url = uri("https://devrepo.kakao.com/nexus/content/groups/public/")
}
}
}

Expand Down

0 comments on commit dd973a9

Please sign in to comment.