|
1 |
| -import com.huanshankeji.team.ShreckYe |
2 |
| -import com.huanshankeji.team.pomForTeamDefaultOpenSource |
3 |
| -import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi |
4 |
| - |
5 | 1 | plugins {
|
6 | 2 | `lib-conventions`
|
7 | 3 | }
|
8 |
| - |
9 |
| -kotlin { |
10 |
| - sourceSets { |
11 |
| - /* |
12 |
| - Use `api`. See: |
13 |
| - https://github.com/JetBrains/compose-multiplatform-core/blob/jb-main/compose/foundation/foundation/build.gradle |
14 |
| - https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-main/compose/foundation/foundation/build.gradle |
15 |
| - */ |
16 |
| - commonMain { |
17 |
| - dependencies { |
18 |
| - api(compose.runtime) |
19 |
| - //compileOnly(compose.foundation) // for KDoc element links only |
20 |
| - /* |
21 |
| - The units from Compose are used directly. |
22 |
| - This is an ideal dependency whose APIs should be exposed and shared on all platforms including JS |
23 |
| - therefore we don't need to create wrappers for them, |
24 |
| - because a depending `ui-graphics` module would be too much as it depends on `skiko`, |
25 |
| - and more such as `ui` and `ui-text` depend on `ui-graphics`. |
26 |
| - A dependency of `ui-unit` is `ui-geometry` which might be useful too. |
27 |
| - */ |
28 |
| - api("org.jetbrains.compose.ui:ui-unit:${DependencyVersions.composeMultiplatform}") |
29 |
| - implementation("org.jetbrains.compose.annotation-internal:annotation:${DependencyVersions.composeMultiplatform}") |
30 |
| - } |
31 |
| - } |
32 |
| - /*composeUiMain { |
33 |
| - dependencies { |
34 |
| - api(compose.foundation) |
35 |
| - implementation(compose.ui) |
36 |
| - } |
37 |
| - }*/ |
38 |
| - jsMain { |
39 |
| - dependencies { |
40 |
| - api(compose.html.core) |
41 |
| - // see: https://github.com/varabyte/kobweb/blob/main/frontend/kobweb-compose/build.gradle.kts |
42 |
| - api("com.varabyte.kobweb:kobweb-compose:${DependencyVersions.kobweb}") |
43 |
| - implementation("com.huanshankeji:compose-html-common:${DependencyVersions.huanshankejiComposeHtml}") |
44 |
| - |
45 |
| - /* |
46 |
| - The UI module depends on the lifecycle module to use `androidx.lifecycle.ViewModelStoreOwner`. |
47 |
| - See https://github.com/JetBrains/compose-multiplatform-core/blob/jb-main/compose/ui/ui/build.gradle#L87. |
48 |
| - This is actually only needed for JS DOM. |
49 |
| - */ |
50 |
| - implementation(commonDependencies.jetbrainsAndroidx.lifecycle.viewmodel()) |
51 |
| - } |
52 |
| - } |
53 |
| - } |
54 |
| -} |
55 |
| - |
56 |
| -publishing.publications.withType<MavenPublication> { |
57 |
| - pomForTeamDefaultOpenSource( |
58 |
| - project, |
59 |
| - "Unified Compose Multiplatform common wrappers $FOR_COMPOSE_TARGETS_IN_TITLE", |
60 |
| - "Common wrappers of components (including layouts) and modifiers $FOR_COMPOSE_TARGETS_IN_DESCRIPTION" |
61 |
| - ) { |
62 |
| - ShreckYe() |
63 |
| - } |
64 |
| -} |
0 commit comments