Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ac444b6
Add design system module
winter-kim Oct 23, 2025
f928aa6
Fix plugin logic
winter-kim Oct 23, 2025
9809980
Setup design-system gradle
winter-kim Oct 23, 2025
916a590
Add color token
winter-kim Oct 23, 2025
bf72aeb
Add background color token
winter-kim Oct 23, 2025
3504a71
Update lint rule - braces require
winter-kim Oct 24, 2025
5ab08f6
Update app color scheme & theme
winter-kim Oct 24, 2025
49c842c
Add stroke color token
winter-kim Oct 24, 2025
f04b764
Add Gradle JVM configuration
winter-kim Oct 24, 2025
99d5bc3
Change file name
winter-kim Oct 24, 2025
2f096b3
Add text color token
winter-kim Oct 24, 2025
cf27a24
Update git ignore
winter-kim Oct 24, 2025
0215473
Add icon color token
winter-kim Oct 24, 2025
6251fef
Remove unnecessary prefix
winter-kim Oct 24, 2025
0c0766d
Add button color token
winter-kim Oct 24, 2025
5b05e0b
Add input color token
winter-kim Oct 24, 2025
163f739
Add tag color token
winter-kim Oct 24, 2025
2e38bff
Add blue color token
winter-kim Oct 24, 2025
2550f25
Add typography tokens
winter-kim Oct 24, 2025
b3c4610
Add spacing tokens
winter-kim Oct 24, 2025
ff977d4
Add border radius tokens
winter-kim Oct 24, 2025
e487b1c
Add icon tokens
winter-kim Oct 24, 2025
860fe49
Add icon resources
winter-kim Oct 25, 2025
1f034ed
Fix plugin
winter-kim Oct 25, 2025
d860b7e
Update icon design token
winter-kim Oct 25, 2025
1c6e005
Change theme naming
winter-kim Oct 25, 2025
3428c7c
Refactoring based design token
winter-kim Oct 25, 2025
baea700
Remove system bars appearance control, already controlled in enableEd…
winter-kim Oct 26, 2025
d1391df
Add design-system document
winter-kim Oct 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ proguard/
*~
*.swp

# macOS
.DS_Store

### AndroidStudio Patch ###
!/gradle/wrapper/gradle-wrapper.jar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@ package dev.love.winter.convention

// reference : https://github.com/android/nowinandroid/blob/main/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/AndroidCompose.kt

import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import dev.love.winter.convention.extension.AndroidExtension
import dev.love.winter.convention.extension.api
import dev.love.winter.convention.extension.debugImplementation
import dev.love.winter.convention.extension.implementation
import dev.love.winter.convention.extension.libs
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

internal fun Project.configureComposeAndroid() {
internal fun Project.configureComposeAndroid(
commonExtension: AndroidExtension,
) {
with(pluginManager) {
apply("org.jetbrains.kotlin.plugin.compose")
}

val extension = extensions.getByType<BaseAppModuleExtension>()

extension.apply {
commonExtension.apply {
buildFeatures.compose = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import org.gradle.api.Project

fun Project.setNamespace(name: String) {
androidExtension.apply {
namespace = "dev.love.winter.ls.$name"
namespace = "dev.love.winter.$name"
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import dev.love.winter.convention.configureComposeAndroid
import dev.love.winter.convention.extension.implementation
import dev.love.winter.convention.extension.libs
import org.gradle.kotlin.dsl.getByType


configureComposeAndroid()
configureComposeAndroid(
commonExtension = extensions.getByType<BaseAppModuleExtension>(),
)

dependencies {
implementation(libs.findLibrary("androidX-activityCompose"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import com.android.build.gradle.LibraryExtension
import dev.love.winter.convention.configureComposeAndroid
import org.gradle.kotlin.dsl.getByType

configureComposeAndroid()
configureComposeAndroid(
commonExtension = extensions.getByType<LibraryExtension>(),
)
2 changes: 2 additions & 0 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ style:
active: false
BracesOnIfStatements:
active: true
BracesOnWhenStatements:
active: true
MandatoryBracesLoops:
active: true
MaxLineLength:
Expand Down
76 changes: 76 additions & 0 deletions core-android/design-system/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Design System

## Overview

This module provides the design system foundation for the LanguageStudy application, implementing a scalable and maintainable design token system.
It establishes a consistent visual language across the app through systematically organized design tokens and reusable components.

## Responsibilities

- Define design tokens (colors, typography, spacing, etc.) as code following industry best practices
- Compose and maintain app themes with support for light and dark modes
- Implement and maintain UI components built on top of design tokens
- Provide foundation utilities for common design system needs

# Design Tokens

Design tokens are essential in creating and maintaining a consistent design language in our projects.
They contain the values you'll use to construct Ul elements, such as colors, typography, spacing, border radius, and icons.

## Primitive tokens

> name-variant
> primary-900

The primitive tokens have a simple name structure with two levels: name and variation.

## Component tokens

> type-category-variant
> color-background-band-subtle-...

The component tokens are the ones applied in the interface and always inherit a primitive token.
The names of component tokens explain how they are used,
so they are composed of three levels: type, category, and variation.
It's possible to have more than one variation in the same token, like "brand-subtle".

## Tokens

- Colors
- Typography
- Spacing
- BorderRadius
- Icon

# Module Structure

```
design-system/
├── tokens/ # Design token definitions (primitive & component values)
│ ├── ColorToken.kt
│ ├── TypographyToken.kt
│ └── IconToken.kt ...
├── theme/ # Theme aggregation (composing tokens into themes)
│ ├── Theme.kt
│ ├── Colors.kt
│ ├── Typography.kt
│ └── Icon.kt ...
├── foundation/ # Foundation utilities
│ └── ModifierExtensions, Ripple
└── component/ # UI components
├── Button.kt
└── TextField.kt
```

## Package Descriptions

- **tokens**: Raw design token values (colors, typography scales, spacing units)
- **theme**: Aggregated theme objects accessible via `WinterTheme`
- **foundation**: Core utilities and helpers for the design system
- **component**: Reusable UI components built with design tokens

# Usage

10 changes: 10 additions & 0 deletions core-android/design-system/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import dev.love.winter.convention.extension.setNamespace

plugins {
id("winter.android.library")
id("winter.compose.library")
}

android {
setNamespace("designsystem")
}
4 changes: 4 additions & 0 deletions core-android/design-system/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,34 @@
package dev.love.winter.designsystem.theme

import androidx.compose.runtime.Immutable
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.graphics.Shape
import dev.love.winter.designsystem.tokens.BorderRadiusExtraLarge
import dev.love.winter.designsystem.tokens.BorderRadiusExtraSmall
import dev.love.winter.designsystem.tokens.BorderRadiusLarge
import dev.love.winter.designsystem.tokens.BorderRadiusMedium
import dev.love.winter.designsystem.tokens.BorderRadiusPill
import dev.love.winter.designsystem.tokens.BorderRadiusSmall

@Immutable
data class BorderRadius(
val extraSmall: Shape,
val small: Shape,
val medium: Shape,
val large: Shape,
val extraLarge: Shape,
val pill: Shape,
)

internal val BorderRadiusTheme = BorderRadius(
extraSmall = BorderRadiusExtraSmall,
small = BorderRadiusSmall,
medium = BorderRadiusMedium,
large = BorderRadiusLarge,
extraLarge = BorderRadiusExtraLarge,
pill = BorderRadiusPill,
)

internal val LocalBorderRadius = staticCompositionLocalOf {
BorderRadiusTheme
}
Loading