Skip to content

Commit 62f0178

Browse files
committed
Merge branch 'main' into dependent-on-snapshots
2 parents a62f8df + 9265d9a commit 62f0178

File tree

8 files changed

+29
-37
lines changed

8 files changed

+29
-37
lines changed

.github/workflows/demo-gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
uses: gradle/actions/setup-gradle@v4
4242

4343
- name: Build the distribution with Gradle Wrapper
44-
run: ./gradlew :demo:sideBySideBrowserDistribution
44+
run: ./gradlew :compose-multiplatform-html-unified-demo:sideBySideBrowserDistribution
4545

4646
- name: Upload artifact
4747
uses: actions/upload-pages-artifact@v3

buildSrc/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies {
1414
implementation(kotlin("gradle-plugin", kotlinVersion))
1515
implementation("org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlinVersion")
1616
implementation("org.jetbrains.compose:compose-gradle-plugin:1.7.1")
17-
implementation("com.huanshankeji.team:gradle-plugins:0.8.0") // don't use a snapshot version in a main branch
17+
implementation("com.huanshankeji.team:gradle-plugins:0.9.0") // don't use a snapshot version in a main branch
1818
implementation("com.android.tools.build:gradle:8.5.2")
19-
implementation("com.huanshankeji:common-gradle-dependencies:0.8.0-20241016") // don't use a snapshot version in a main branch
19+
implementation("com.huanshankeji:common-gradle-dependencies:0.9.0-20241203") // don't use a snapshot version in a main branch
2020
}

buildSrc/src/main/kotlin/common-conventions.gradle.kts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
2-
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
2+
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
33

44
plugins {
55
kotlin("multiplatform")
@@ -38,7 +38,21 @@ kotlin {
3838
js()
3939

4040

41+
4142
@OptIn(ExperimentalKotlinGradlePluginApi::class)
43+
applyDefaultHierarchyTemplate {
44+
common {
45+
group("composeUi") {
46+
withJvm()
47+
withAndroidTarget()
48+
group("ios")
49+
withWasmJs()
50+
}
51+
}
52+
}
53+
54+
55+
4256
compilerOptions {
4357
freeCompilerArgs.add("-Xexpect-actual-classes")
4458
}

buildSrc/src/main/kotlin/lib-conventions-without-publishing.gradle.kts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
2-
31
plugins {
42
id("common-conventions")
53
id("com.huanshankeji.kotlin-multiplatform-conventional-targets")
@@ -11,20 +9,6 @@ kotlin {
119
publishLibraryVariants("release", "debug")
1210
}
1311

14-
// move to `common-conventions` if necessary
15-
16-
@OptIn(ExperimentalKotlinGradlePluginApi::class)
17-
applyDefaultHierarchyTemplate {
18-
common {
19-
group("composeUi") {
20-
withJvm()
21-
withAndroidTarget()
22-
group("ios")
23-
withWasmJs()
24-
}
25-
}
26-
}
27-
2812
/*
2913
sourceSets {
3014
val composeUiMain by creating { dependsOn(commonMain.get()) }

demo/build.gradle.kts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import com.huanshankeji.cpnProject
2-
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
2+
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
33

44
plugins {
55
`common-conventions`
@@ -57,30 +57,22 @@ kotlin {
5757
implementation(commonDependencies.kotlinx.coroutines.core())
5858
}
5959
}
60+
composeUiMain {
61+
dependencies {
62+
implementation(compose.ui)
63+
}
64+
}
6065
jvmMain {
6166
dependencies {
6267
implementation(compose.desktop.currentOs)
6368
}
6469
}
6570
androidMain {
6671
dependencies {
67-
// TODO consider putting this in `composeUiMain`
68-
implementation(compose.ui)
69-
7072
implementation(commonDependencies.androidx.activity.compose())
7173
implementation(commonDependencies.androidx.compose.ui.module("tooling-preview"))
7274
}
7375
}
74-
iosMain {
75-
dependencies {
76-
implementation(compose.ui)
77-
}
78-
}
79-
wasmJsMain {
80-
dependencies {
81-
implementation(compose.ui)
82-
}
83-
}
8476
jsMain {
8577
dependencies {
8678
implementation(compose.html.core)

demo/iosApp/iosApp.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
);
176176
runOnlyForDeploymentPostprocessing = 0;
177177
shellPath = /bin/sh;
178-
shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/../..\"\n./gradlew :demo:embedAndSignAppleFrameworkForXcode\n";
178+
shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/../..\"\n./gradlew :compose-multiplatform-html-unified-demo:embedAndSignAppleFrameworkForXcode\n";
179179
};
180180
/* End PBXShellScriptBuildPhase section */
181181

demo/src/commonMain/kotlin/com/huanshankeji/compose/material/demo/Common.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.huanshankeji.compose.foundation.ext.outerBorder
77
import com.huanshankeji.compose.foundation.ext.roundedCornerBackgroundAndOuterBorder
88
import com.huanshankeji.compose.foundation.ext.roundedCornerOuterBorder
99
import com.huanshankeji.compose.foundation.layout.*
10+
import com.huanshankeji.compose.foundation.layout.ext.outerPadding
1011
import com.huanshankeji.compose.foundation.lazy.LazyColumn
1112
import com.huanshankeji.compose.foundation.lazy.LazyListScope
1213
import com.huanshankeji.compose.foundation.lazy.LazyRow
@@ -26,7 +27,7 @@ fun Common(/*modifier: Modifier = Modifier*/) {
2627

2728
@Composable
2829
fun ColorBox(color: Color) =
29-
Box(Modifier.padding(8.dp).background(color).size(40.dp))
30+
Box(Modifier.outerPadding(8.dp).background(color).size(40.dp))
3031

3132
val halfGreen = Color(0, 0x80, 0x00)
3233

demo/src/commonMain/kotlin/com/huanshankeji/compose/material/demo/Material2.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import androidx.compose.ui.unit.dp
55
import com.huanshankeji.compose.foundation.VerticalScrollBox
66
import com.huanshankeji.compose.foundation.background
77
import com.huanshankeji.compose.foundation.layout.*
8+
import com.huanshankeji.compose.foundation.layout.ext.outerPadding
89
import com.huanshankeji.compose.foundation.text.KeyboardActions
910
import com.huanshankeji.compose.foundation.text.KeyboardOptions
1011
import com.huanshankeji.compose.foundation.text.input.ImeAction
@@ -73,7 +74,7 @@ fun Material2(/*modifier: Modifier = Modifier*/) {
7374
IconButton(onClick, icon = Icons.Default.Add, contentDescription = "increment count")
7475
}
7576

76-
val listModifier = Modifier.padding(16.dp).height(listSize)
77+
val listModifier = Modifier.outerPadding(16.dp).height(listSize)
7778
List(listModifier) {
7879
item {
7980
Text("Ungrouped item")

0 commit comments

Comments
 (0)