Skip to content

Commit

Permalink
fix: 빌드 에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
jinukeu committed Oct 4, 2023
1 parent 371628a commit b7d7d8e
Show file tree
Hide file tree
Showing 21 changed files with 259 additions and 85 deletions.
7 changes: 4 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {

android {
compileSdk = Configs.COMPILE_SDK
namespace = "com.plub.plubandroid"

defaultConfig {
applicationId = "com.plub.plubandroid"
Expand All @@ -29,11 +30,11 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
}

composeOptions {
Expand Down
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false
}

buildscript {
repositories {
google()
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/Configs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ object Configs {
const val KOTLIN_KAPT = "kotlin-kapt"

//Android Config
const val COMPILE_SDK = 33
const val COMPILE_SDK = 34

//Android Default Config
const val MIN_SDK = 23
const val MIN_SDK = 26
const val TARGET_SDK = 33
const val VERSION_CODE = 1
const val VERSION_NAME = "1.0.0"
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
object Versions {
const val GRADLE = "7.3.1"
const val GRADLE = "8.1.1"

/* [ Kotlin ] */
const val KOTLIN_VERSION = "1.7.10"
const val KOTLIN_VERSION = "1.9.10"
const val KOTLIN_COROUTINE = "1.6.4"
const val KOTLIN_SERIALIZATION = "1.7.0"
const val KOTLIN_SERIALIZATION_JSON = "1.3.2"
Expand All @@ -25,7 +25,7 @@ object Versions {

/* [ Google ] */
const val GOOGLE_PLAY_SERVICE = "20.3.0"
const val HILT = "2.42"
const val HILT = "2.48"
const val MATERIAL = "1.6.1"
const val TINK = "1.7.0"
const val PROTOBUF = "3.21.7"
Expand Down
15 changes: 8 additions & 7 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ plugins {
id("com.android.library")
id("dagger.hilt.android.plugin")
id("org.jetbrains.kotlin.plugin.serialization")
id("com.google.protobuf") version "0.8.19"
id("com.google.protobuf") version "0.9.1"
kotlin("android")
kotlin("kapt")
id("com.google.devtools.ksp")
}

android {
compileSdk = Configs.COMPILE_SDK
namespace = "com.plub.data"

defaultConfig {
minSdk = Configs.MIN_SDK
Expand All @@ -19,11 +21,11 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
}
}

Expand All @@ -41,7 +43,7 @@ dependencies {
implementation(AndroidX.PAGING3_COMMON_KTX)
implementation(AndroidX.ROOM)
implementation(AndroidX.ROOM_KTX)
kapt(AndroidX.ROOM_COMPILER)
ksp(AndroidX.ROOM_COMPILER)

implementation(Libraries.RETROFIT)
implementation(Libraries.RETROFIT_CONVERTER_GSON)
Expand All @@ -63,12 +65,11 @@ protobuf {
}
generateProtoTasks {
all().forEach { task ->
task.plugins {
task.builtins {
create("java") {
option("lite")
}
}

}
}
}
16 changes: 8 additions & 8 deletions data/src/main/java/com/plub/data/dao/RecentSearchDao.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ import kotlinx.coroutines.flow.Flow

@Dao
interface RecentSearchDao {
@Query("SELECT * FROM ${EntityTable.RECENT_SEARCH} ORDER BY saveTime DESC LIMIT :count")
@Query("SELECT * FROM ${EntityTable.RECENT_SEARCH} ORDER BY saveTime DESC LIMIT :arg0")
fun getSearches(count: Int): Flow<List<RecentSearchEntity>>

@Query("SELECT COUNT(*) FROM ${EntityTable.RECENT_SEARCH}")
suspend fun getSearchesCount(): Int
fun getSearchesCount(): Int

@Query("DELETE FROM ${EntityTable.RECENT_SEARCH} WHERE search = :search")
suspend fun deleteBySearch(search: String)
@Query("DELETE FROM ${EntityTable.RECENT_SEARCH} WHERE search = :arg0")
fun deleteBySearch(search: String): Int

@Insert(onConflict = REPLACE)
suspend fun insert(recentSearchEntity: RecentSearchEntity)
fun insert(recentSearchEntity: RecentSearchEntity)

@Query("DELETE FROM ${EntityTable.RECENT_SEARCH} WHERE saveTime IN (SELECT saveTime FROM ${EntityTable.RECENT_SEARCH} ORDER BY saveTime ASC LIMIT :count )")
suspend fun deleteOldestSearch(count: Int)
@Query("DELETE FROM ${EntityTable.RECENT_SEARCH} WHERE saveTime IN (SELECT saveTime FROM ${EntityTable.RECENT_SEARCH} ORDER BY saveTime ASC LIMIT :arg0 )")
fun deleteOldestSearch(count: Int): Int

@Query("DELETE FROM ${EntityTable.RECENT_SEARCH}")
suspend fun deleteAll()
fun deleteAll()
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ data class KakaoLocationInfoResponse(
data class KakaoLocationInfoDocument(
@SerialName("place_name")
val placeName: String = "",
@SerialName("x")
val placePositionX: String = "",
@SerialName("y")
val placePositionY: String = "",
@SerialName("address_name")
val addressName: String = "",
@SerialName("road_address_name")
val roadAddressName: String = ""
)

data class Meta(
Expand Down
12 changes: 4 additions & 8 deletions design-system/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("com.android.application")
id("com.android.library")
id("org.jetbrains.kotlin.android")
}

Expand All @@ -8,11 +8,7 @@ android {
compileSdk = 33

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

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -27,8 +23,8 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

buildFeatures {
Expand All @@ -40,7 +36,7 @@ android {
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
}
}

Expand Down
4 changes: 2 additions & 2 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Sep 10 10:41:11 KST 2022
#Wed Oct 04 15:15:31 KST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
33 changes: 30 additions & 3 deletions presentation-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ android {

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
vectorDrawables {
useSupportLibrary = true
}
}

buildTypes {
Expand All @@ -29,14 +32,27 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = JavaVersion.VERSION_17.toString()
}

composeOptions {
kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPLIER
}


buildFeatures {
viewBinding = true
compose = true
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

Expand Down Expand Up @@ -87,6 +103,15 @@ dependencies {
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.navigation:navigation-fragment-ktx:2.7.3")
implementation("androidx.navigation:navigation-ui-ktx:2.7.3")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.activity:activity-compose:1.7.2")
implementation(platform("androidx.compose:compose-bom:2023.03.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
annotationProcessor(Glide.GLIDE_COMPILER)

implementation(Compose.COMPOSE_ACTIVITY)
Expand All @@ -96,6 +121,8 @@ dependencies {
implementation(Compose.COMPOSE_NAV)
implementation(Compose.COMPOSE_ANI_NAV)
implementation(Compose.COMPOSE_UI_TOOL)
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")

kapt(Google.HILT_ANDROID_COMPILER)
}

This file was deleted.

13 changes: 11 additions & 2 deletions presentation-compose/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/title_activity_main"
android:theme="@style/Theme.PlubAndroid" />
android:theme="@style/Theme.PlubAndroid">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>


</activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.plub.presentation_compose

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.plub.presentation_compose.ui.theme.PlubAndroidTheme

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
PlubAndroidTheme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
Greeting("Android")
}
}
}
}
}

@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
Text(
text = "Hello $name!",
modifier = modifier
)
}

@Preview(showBackground = true)
@Composable
fun GreetingPreview() {
PlubAndroidTheme {
Greeting("Android")
}
}
Loading

0 comments on commit b7d7d8e

Please sign in to comment.