Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
boogi-woogi committed Feb 27, 2024
2 parents f3cd72d + 60470b5 commit 45e4d47
Show file tree
Hide file tree
Showing 25 changed files with 255 additions and 125 deletions.
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ dependencies {
implementation(project(":core:network"))
implementation(project(":core:datastore"))
implementation(project(":core:domain"))
implementation(project(":core:designsystem"))
}
10 changes: 0 additions & 10 deletions app/src/main/java/com/withpeace/withpeace/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
package com.withpeace.withpeace

import android.os.Bundle
import android.util.Log
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.ui.Modifier
import androidx.lifecycle.lifecycleScope
import com.withpeace.withpeace.core.data.repository.DefaultTokenRepository
import com.withpeace.withpeace.core.domain.repository.TokenRepository
import com.withpeace.withpeace.feature.login.LoginScreen
import com.withpeace.withpeace.ui.theme.WithpeaceTheme
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.launch
import javax.inject.Inject

@AndroidEntryPoint
class MainActivity : ComponentActivity() {

@Inject
lateinit var repository: TokenRepository

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/java/com/withpeace/withpeace/ui/theme/Color.kt

This file was deleted.

70 changes: 0 additions & 70 deletions app/src/main/java/com/withpeace/withpeace/ui/theme/Theme.kt

This file was deleted.

34 changes: 0 additions & 34 deletions app/src/main/java/com/withpeace/withpeace/ui/theme/Type.kt

This file was deleted.

1 change: 1 addition & 0 deletions build-logic/src/main/kotlin/convention.feature.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ plugins {
dependencies{
implementation(project(":core:data"))
implementation(project(":core:domain"))
implementation(project(":core:designsystem"))
}
1 change: 1 addition & 0 deletions core/designsystem/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
9 changes: 9 additions & 0 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins {
id("com.android.library")
id("convention.android.base")
id("convention.android.compose")
}

android {
namespace = "com.withpeace.withpeace.core.designsystem"
}
Empty file.
21 changes: 21 additions & 0 deletions core/designsystem/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
4 changes: 4 additions & 0 deletions core/designsystem/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.withpeace.withpeace.core.designsystem.theme

import androidx.compose.ui.graphics.Color

val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)

val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)

val mainpink = Color(0xFFFEA0A1)
val subPink = Color(0xFFF5D6DB)
val subApricot = Color(0xFFFED9C9)
val subBlue = Color(0xFFDFF2F9)

val systemBlack = Color(0xFF212529)
val systemGray1 = Color(0xFF3D3D3D)
val systemGray2 = Color(0xFFA7A7A7)
val systemGray3 = Color(0xFFECECEF)
val systemError = Color(0xFFF0474B)
val systemSuccess = Color(0xFF3BD569)

data class WithPeaceColor(
val MainPink: Color = mainpink,
val SubPink: Color = subPink,
val SubApricot: Color = subApricot,
val SubBlue: Color = subBlue,
val SystemBlack: Color = systemBlack,
val SystemGray1: Color = systemGray1,
val SystemGray2: Color = systemGray2,
val SystemGray3: Color = systemGray3,
val SystemError: Color = systemError,
val SystemSuccess: Color = systemSuccess,
)

val lightColor = WithPeaceColor()
val darkColor = WithPeaceColor()
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.withpeace.withpeace.core.designsystem.theme

import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp

data class WithPeacePadding(
val BasicHorizontalPadding: Dp = 24.dp,
val BasicContentPadding: Dp = 8.dp,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.withpeace.withpeace.core.designsystem.theme

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.staticCompositionLocalOf

val LocalCustomColors =
staticCompositionLocalOf {
WithPeaceColor()
}

val LocalCustomTypography =
staticCompositionLocalOf {
WithPeaceTypography()
}
val LocalCustomPadding =
staticCompositionLocalOf {
WithPeacePadding()
}

@Composable
fun WithpeaceTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable () -> Unit,
) {
val colorScheme =
when {
darkTheme -> darkColor
else -> lightColor
}
CompositionLocalProvider(
LocalCustomColors provides colorScheme,
LocalCustomTypography provides WithPeaceTypography(),
LocalCustomPadding provides WithPeacePadding(),
content = content,
)
}

object WithpeaceTheme {
val colors: WithPeaceColor
@Composable
get() = LocalCustomColors.current
val typography: WithPeaceTypography
@Composable
get() = LocalCustomTypography.current
val padding: WithPeacePadding
@Composable
get() = LocalCustomPadding.current
}
Loading

0 comments on commit 45e4d47

Please sign in to comment.