Skip to content

Commit 81ba43f

Browse files
committed
Add a ":compose-web-common" subproject for code not related to Material Design
1 parent 26c5f67 commit 81ba43f

File tree

18 files changed

+106
-96
lines changed

18 files changed

+106
-96
lines changed

buildSrc/build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
plugins {
22
`kotlin-dsl`
33
}
4-
54
repositories {
5+
//mavenLocal()
66
gradlePluginPortal()
7+
//maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
8+
}
9+
10+
dependencies {
11+
implementation(kotlin("gradle-plugin", "1.7.20"))
12+
implementation("org.jetbrains.compose:compose-gradle-plugin:1.2.1")
13+
implementation("com.huanshankeji:kotlin-common-gradle-plugins:0.3.2")
14+
implementation("com.huanshankeji.team:gradle-plugins:0.3.2")
715
}

buildSrc/src/main/kotlin/Versions.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
const val projectVersion = "0.1.1-SNAPSHOT"
22

33
object DependencyVersions {
4-
val composeJb = "1.2.1"
5-
64
val webcomponents = "2.6.0"
75
val mwc = "0.25.3"
86

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import com.huanshankeji.team.`Shreck Ye`
2+
import com.huanshankeji.team.pomForTeamDefaultOpenSource
3+
import org.gradle.api.publish.maven.MavenPublication
4+
import org.gradle.api.tasks.bundling.Jar
5+
import org.gradle.kotlin.dsl.*
6+
7+
plugins {
8+
id("com.huanshankeji.kotlin-multiplatform-js-browser-conventions")
9+
id("org.jetbrains.compose")
10+
id("com.huanshankeji.sonatype-ossrh-publish")
11+
}
12+
13+
repositories {
14+
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
15+
}
16+
17+
group = "com.huanshankeji"
18+
version = projectVersion
19+
20+
val javadocJar by tasks.registering(Jar::class) {
21+
archiveClassifier.set("javadoc")
22+
}
23+
24+
publishing.publications.withType<MavenPublication> {
25+
artifact(javadocJar)
26+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import com.huanshankeji.team.`Shreck Ye`
2+
import com.huanshankeji.team.pomForTeamDefaultOpenSource
3+
4+
plugins {
5+
`lib-conventions`
6+
}
7+
8+
kotlin {
9+
sourceSets {
10+
val jsMain by getting {
11+
dependencies {
12+
implementation(compose.web.core)
13+
implementation(compose.runtime)
14+
}
15+
}
16+
}
17+
}
18+
19+
publishing.publications.withType<MavenPublication> {
20+
pomForTeamDefaultOpenSource(project, "Huanshankeji Compose for Web common", "Huanshankeji's common code for Compose for Web") {
21+
`Shreck Ye`()
22+
}
23+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import com.huanshankeji.team.`Shreck Ye`
2+
import com.huanshankeji.team.pomForTeamDefaultOpenSource
3+
4+
plugins {
5+
`lib-conventions`
6+
}
7+
8+
kotlin {
9+
sourceSets {
10+
val jsMain by getting {
11+
dependencies {
12+
implementation(compose.web.core)
13+
implementation(compose.runtime)
14+
implementation(project(":compose-web-common"))
15+
16+
implementation(npm("@webcomponents/webcomponentsjs", DependencyVersions.webcomponents))
17+
18+
fun mwcImplementation(module: String) =
19+
implementation(npm("@material/mwc-$module", DependencyVersions.mwc))
20+
21+
fun mwcImplementations(vararg modules: String) {
22+
for (module in modules) mwcImplementation(module)
23+
}
24+
25+
mwcImplementations(
26+
"button",
27+
"textfield",
28+
"select",
29+
"icon-button",
30+
"snackbar",
31+
"circular-progress",
32+
"circular-progress-four-color"
33+
)
34+
35+
implementation(npm("@material/card", DependencyVersions.mdc))
36+
}
37+
}
38+
}
39+
}
40+
41+
publishing.publications.withType<MavenPublication> {
42+
pomForTeamDefaultOpenSource(project, "Compose for Web Material", "Some Material components for Compose for Web") {
43+
`Shreck Ye`()
44+
}
45+
}

0 commit comments

Comments
 (0)