Skip to content

Commit

Permalink
common:uiモジュールを作成しui.themeを移動
Browse files Browse the repository at this point in the history
  • Loading branch information
kwmt committed Jan 7, 2024
1 parent 6c0c8e0 commit e613e88
Show file tree
Hide file tree
Showing 31 changed files with 75 additions and 135 deletions.
2 changes: 2 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ android {
}

dependencies {
implementation project(":camerax")
implementation(projects.common.ui)
implementation(projects.camerax)
implementation(projects.legacy)
implementation(projects.slide)
implementation(libs.androidx.compose.foundation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.compositeOver
import androidx.compose.ui.tooling.preview.Preview
import androidx.navigation.compose.rememberNavController
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.legacy.utils.LocalSysUiController
import net.kwmt27.jetpackcomposeplayground.legacy.utils.SystemUiController
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.utils.LocalSysUiController
import net.kwmt27.jetpackcomposeplayground.common.ui.utils.SystemUiController

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.coroutine.CancellationExceptionSampleViewModel.State
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme

@Composable
fun CancellationExceptionSample(
Expand Down
1 change: 1 addition & 0 deletions camerax/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ android {
}

dependencies {
implementation(projects.common.ui)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.material)
debugImplementation(libs.androidx.compose.ui.tooling)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import net.kwmt27.camerax.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

class CameraXActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
8 changes: 0 additions & 8 deletions camerax/src/main/java/net/kwmt27/camerax/ui/theme/Color.kt

This file was deleted.

65 changes: 0 additions & 65 deletions camerax/src/main/java/net/kwmt27/camerax/ui/theme/Theme.kt

This file was deleted.

28 changes: 0 additions & 28 deletions camerax/src/main/java/net/kwmt27/camerax/ui/theme/Type.kt

This file was deleted.

1 change: 1 addition & 0 deletions common/ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
21 changes: 21 additions & 0 deletions common/ui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
alias(libs.plugins.jetpackcomposeplayground.android.library)
alias(libs.plugins.jetpackcomposeplayground.android.library.compose)
}
android {
namespace = "net.kwmt27.jetpackcomposeplayground.common.ui"
}

dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.google.material)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.espresso)

implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.material)
debugImplementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.ui.tooling.preview)
}
Empty file added common/ui/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions common/ui/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 common/ui/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
@@ -1,4 +1,4 @@
package net.kwmt27.jetpackcomposeplayground.legacy.ui.theme
package net.kwmt27.jetpackcomposeplayground.common.ui.theme

import androidx.compose.ui.graphics.Color

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.kwmt27.jetpackcomposeplayground.ui.theme
package net.kwmt27.jetpackcomposeplayground.common.ui.theme

import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Shapes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.kwmt27.jetpackcomposeplayground.legacy.ui.theme
package net.kwmt27.jetpackcomposeplayground.common.ui.theme

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material.MaterialTheme
Expand All @@ -7,21 +7,19 @@ import androidx.compose.material.lightColors
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.ui.graphics.Color
import net.kwmt27.jetpackcomposeplayground.legacy.utils.LocalSysUiController
import net.kwmt27.jetpackcomposeplayground.common.ui.utils.LocalSysUiController

private val DarkColorPalette = darkColors(
primary = purple200,
primaryVariant = purple700,
secondary = teal200,
background = Color(0xff121212),
)

private val LightColorPalette = lightColors(
primary = purple500,
primaryVariant = purple700,
secondary = teal200,
background = Color.White,

/* Other default colors to override
surface = Color.White,
onPrimary = Color.White,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.kwmt27.jetpackcomposeplayground.legacy.ui.theme
package net.kwmt27.jetpackcomposeplayground.common.ui.theme

import androidx.compose.material.Typography
import androidx.compose.ui.text.TextStyle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.kwmt27.jetpackcomposeplayground.legacy.utils
package net.kwmt27.jetpackcomposeplayground.common.ui.utils

import android.os.Build
import android.view.View
Expand Down
1 change: 1 addition & 0 deletions legacy/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ android {
}

dependencies {
implementation(projects.common.ui)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.google.material)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

@Composable
fun BoxDashedBoarderSample() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

@Composable
fun VerticalGridSample() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

@Composable
fun GridCustomItem() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

@Composable
fun SampleVerticalList() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.zIndex
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

@Composable
fun OverlapImageListSample() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

private const val TAG = "InstagramSearchList"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

private const val TAG = "InstagramSearchList"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

private const val TAG = "InstagramSearchList"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import net.kwmt27.jetpackcomposeplayground.legacy.ui.theme.JetpackComposePlayGroundTheme
import net.kwmt27.jetpackcomposeplayground.common.ui.theme.JetpackComposePlayGroundTheme

private const val TAG = "InstagramSearchList"

Expand Down

This file was deleted.

2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ include(":app")
include(":legacy")
include(":camerax")
include(":slide")
include(":common:ui")

0 comments on commit e613e88

Please sign in to comment.