diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d732ef20..af34c840 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -25,10 +25,12 @@ test-androidX-rules = "1.5.0" test-androidX-runner = "1.5.2" kotlinSerialization = "1.4.0" +kotlinPoet = "1.12.0" plugin-androidCacheFix = "3.0.1" plugin-gradleNexusPublish = "1.3.0" plugin-gradlePluginPublish = "1.2.1" +material = "1.11.0" [libraries] base-androidX-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidX-appcompat" } @@ -40,6 +42,7 @@ base-androidX-compose-uiTooling-preview = { module = "androidx.compose.ui:ui-too base-kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "global-kotlin" } base-kotlin-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinSerialization" } +base-kotlin-poet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinPoet"} base-staticAnalysis-ktlint = { module = "com.pinterest:ktlint", version.ref = "staticAnalysis-ktlint" } base-staticAnalysis-detekt-api = { module = "io.gitlab.arturbosch.detekt:detekt-api", version.ref = "staticAnalysis-detekt" } @@ -68,6 +71,7 @@ base-gradle-paparazzi = { module = "app.cash.paparazzi:paparazzi-gradle-plugin", base-gradle-spotless= { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "staticAnalysis-spotless" } base-gradle-cacheFix= { module = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin", version.ref = "plugin-androidCacheFix" } base-gradle-nexusPublish= { module = "io.github.gradle-nexus:publish-plugin", version.ref = "plugin-gradleNexusPublish" } +material = { group = "com.google.android.material", name = "material", version.ref = "material" } [plugins] diff --git a/playground/theme-builder/build.gradle.kts b/playground/theme-builder/build.gradle.kts index 6aad0f88..06601418 100644 --- a/playground/theme-builder/build.gradle.kts +++ b/playground/theme-builder/build.gradle.kts @@ -15,3 +15,15 @@ configure { themeUrl.set("file://${projectDir.path}/new_theme_scheme.json") target.set(ThemeBuilderTarget.COMPOSE.value) } + +dependencies { + implementation("sdds-core:uikit") + implementation("sdds-core:uikit-compose") + + implementation(libs.base.androidX.core) + implementation(libs.base.androidX.appcompat) + + val composeBom = platform(libs.base.androidX.compose.bom) + implementation(composeBom) + implementation(libs.base.androidX.compose.foundation) +} diff --git a/playground/theme-builder/new_theme_scheme.json b/playground/theme-builder/new_theme_scheme.json index 5296cd6b..e46ac8e9 100644 --- a/playground/theme-builder/new_theme_scheme.json +++ b/playground/theme-builder/new_theme_scheme.json @@ -29,12 +29,14 @@ ], "type": "sweep-gradient", "value" : { - "locations": [ 0, 0.3, 0.7, 1 ], + "locations": [ 0, 0.7, 1 ], "colors" : ["#000", "#fff"], "startAngle": 0, - "endAngle" : 360 + "endAngle" : 360, + "centerX": 0.5, + "centerY": 0.5 }, - "description": "Цвет текста", + "description": "Акцентный sweep градиент поверхности", "enabled": true }, { @@ -53,6 +55,46 @@ "description": "Прозрачная акцентная поверхность", "enabled": true }, + { + "displayName": "surfaceTertiary", + "name": "light.on-dark.surface.tertiary", + "platform": "android", + "tags": [ + "light", + "on-dark", + "surface", + "tertiary" + ], + "type": "linear-gradient", + "value" : { + "locations": [ 0, 0.7, 1 ], + "colors" : ["#000", "#fff"], + "angle": 90 + }, + "description": "Третичный линейный градиент поверхности", + "enabled": true + }, + { + "displayName": "surfaceSecondary", + "name": "light.on-dark.surface.secondary", + "platform": "android", + "tags": [ + "light", + "on-dark", + "text", + "gradient" + ], + "type": "radial-gradient", + "value" : { + "locations": [ 0, 0.7, 1 ], + "colors" : ["#000", "#fff"], + "radius": 0.8, + "centerX": 0.5, + "centerY": 0.5 + }, + "description": "Вторичный радиальный градиент поверхности", + "enabled": true + }, { "displayName": "textAccent", "name": "on-dark.text.accent", @@ -163,6 +205,27 @@ }, "description": "шрифт android", "enabled": true + }, + { + "displayName": "displayL", + "name": "screen-s.display.l", + "platform": "android", + "tags": [ + "screen-s", + "display", + "l" + ], + "type": "typography", + "value": { + "fontFamily": "sans", + "fontWeight": 300, + "fontStyle": "normal", + "textSize": 72, + "letterSpacing": 0.02, + "lineHeight": 72 + }, + "description": "шрифт android", + "enabled": true } ] } diff --git a/playground/theme-builder/src/main/res/values/styles.xml b/playground/theme-builder/src/main/res/values/styles.xml new file mode 100644 index 00000000..a1cc563b --- /dev/null +++ b/playground/theme-builder/src/main/res/values/styles.xml @@ -0,0 +1,7 @@ + + + +