Skip to content

Commit

Permalink
Merge pull request #64 from PLUB2022/feature/compose-setting
Browse files Browse the repository at this point in the history
Feature/compose setting
  • Loading branch information
jinukeu authored Oct 3, 2023
2 parents c831019 + 98647bf commit 1ecbf1a
Show file tree
Hide file tree
Showing 29 changed files with 440 additions and 20 deletions.
14 changes: 13 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}

composeOptions {
kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPLIER
}

buildFeatures {
compose = true
dataBinding = true
}
}

dependencies {
implementation(project(":presentation"))
implementation(project(":domain"))
implementation(project(":data"))

Expand All @@ -54,6 +59,13 @@ dependencies {
implementation(AndroidX.ROOM_KTX)
kapt(AndroidX.ROOM_COMPILER)

implementation(Compose.COMPOSE_ACTIVITY)
implementation(Compose.COMPOSE_MATERIAL)
implementation(Compose.COMPOSE_PREVIEW)
implementation(Compose.COMPOSE_UI)
implementation(Compose.COMPOSE_NAV)
implementation(Compose.COMPOSE_ANI_NAV)

implementation(Google.MATERIAL)
implementation(Google.TINK)
implementation(platform(Google.FIREBASE_BOM))
Expand Down
13 changes: 13 additions & 0 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ object Libraries {
const val POWER_MENU = "com.github.skydoves:powermenu:${Versions.POWER_MENU}"
}

object Compose {
const val COMPOSE_UI = "androidx.compose.ui:ui:${Versions.COMPOSE}"
const val COMPOSE_MATERIAL = "androidx.compose.material:material:${Versions.COMPOSE}"
const val COMPOSE_PREVIEW = "androidx.compose.ui:ui-tooling-preview:${Versions.COMPOSE}"
const val COMPOSE_ACTIVITY = "androidx.activity:activity-compose:${Versions.ACTIVITY_COMPOSE}"
const val COMPOSE_TEST = "androidx.compose.ui:ui-test-junit4:${Versions.COMPOSE}"
const val COMPOSE_UI_TOOL = "androidx.compose.ui:ui-tooling:${Versions.COMPOSE}"
const val COMPOSE_NAV = "androidx.navigation:navigation-compose:${Versions.NAV}"
const val COMPOSE_ANI_NAV = "com.google.accompanist:accompanist-navigation-animation:${Versions.ANI_NAV}"
const val COMPOSE_HILT_NAV = "androidx.hilt:hilt-navigation-compose:${Versions.HILT_NAV}"
const val COMPOSE_WEBVOEW = "com.google.accompanist:accompanist-webview:0.24.13-rc"
}

object AndroidTest {
const val ANDROID_JUNIT = "junit:junit:${Versions.ANDROID_JUNIT}"
const val ESPRESSO_CORE = "androidx.test.espresso:espresso-core:${Versions.ESPRESSO_CORE}"
Expand Down
8 changes: 8 additions & 0 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ object Versions {

const val POWER_MENU = "2.2.2"

const val COMPOSE_COMPLIER = "1.5.3"
const val COMPOSE = "1.2.0-alpha07"
const val ACTIVITY_COMPOSE = "1.7.2"
const val COMPOSE_WEBVIEW = "0.24.13-rc"
const val ANI_NAV = "0.24.5-alpha"
const val HILT_NAV = "1.0.0"
const val NAV = "2.4.1"

/* [ AndroidTest ] */
const val ANDROID_JUNIT = "4.13.2"
const val ANDROID_JUNIT_EXT = "1.1.5"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
package com.plub.data.dto.kakaoLocation

import com.google.gson.annotations.SerializedName
import com.plub.data.base.DataDto
import kotlinx.serialization.SerialName

data class KakaoLocationInfoResponse(
@SerializedName("documents")
@SerialName("documents")
val documents: List<KakaoLocationInfoDocument> = emptyList(),

@SerializedName("meta")
val meta: Meta = Meta()
): DataDto
@SerialName("meta")
val meta: Meta = Meta(),
) : DataDto

data class KakaoLocationInfoDocument(
@SerializedName("place_name")
@SerialName("place_name")
val placeName: String = "",
@SerializedName("x")
val placePositionX: String = "",
@SerializedName("y")
val placePositionY: String = "",
@SerializedName("address_name")
val addressName: String = "",
@SerializedName("road_address_name")
val roadAddressName: String = ""
)

data class Meta(
@SerializedName("is_end")
@SerialName("is_end")
val isEnd: Boolean = false,
@SerializedName("pageable_count")
val documentTotalCount: Int = 0
)
@SerialName("pageable_count")
val documentTotalCount: Int = 0,
)
1 change: 1 addition & 0 deletions design-system/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
63 changes: 63 additions & 0 deletions design-system/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}

android {
namespace = "com.plub.design_system"
compileSdk = 33

defaultConfig {
applicationId = "com.plub.design_system"
minSdk = 26
targetSdk = 33
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

buildFeatures {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPLIER
}

kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
implementation(AndroidX.CORE_KTX)
implementation(AndroidX.APP_COMPAT)
implementation(Google.MATERIAL)

implementation(Compose.COMPOSE_ACTIVITY)
implementation(Compose.COMPOSE_MATERIAL)
implementation(Compose.COMPOSE_PREVIEW)
implementation(Compose.COMPOSE_UI)
implementation(Compose.COMPOSE_NAV)
implementation(Compose.COMPOSE_ANI_NAV)
implementation(Compose.COMPOSE_UI_TOOL)

androidTestImplementation(AndroidTest.ANDROID_JUNIT)
androidTestImplementation(AndroidTest.ESPRESSO_CORE)
androidTestImplementation(AndroidTest.ANDROID_JUNIT_EXT)
}
21 changes: 21 additions & 0 deletions design-system/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.plub.design_system

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.plub.design_system", appContext.packageName)
}
}
12 changes: 12 additions & 0 deletions design-system/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.PlubAndroid" />

</manifest>
Loading

0 comments on commit 1ecbf1a

Please sign in to comment.