Skip to content

Commit

Permalink
Improve build script code
Browse files Browse the repository at this point in the history
  • Loading branch information
mahozad committed Jul 12, 2024
1 parent f50bc87 commit 74b6b07
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurr
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import java.io.File
import java.util.*

@@ -30,6 +30,9 @@ version = "2.0.0-alpha"
// See https://central.sonatype.com/namespace/org.jetbrains.compose.material
// for the targets that Compose Multiplatform supports
kotlin {
// Publishes source files; for javadoc/kdoc/dokka see the publications block
withSourcesJar(publish = true)

androidTarget { publishLibraryVariants("release") }
// Windows, Linux, macOS (with Java runtime)
jvm(name = "desktop")
@@ -213,6 +216,7 @@ publishing {
}
}
publications.withType<MavenPublication> {
// Publishes javadoc/kdoc/dokka; for sources see the kotlin block
artifact(javadocJar) // Required a workaround. See below
pom {
url = "https://mahozad.ir/${project.name}"
3 changes: 3 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -3,6 +3,9 @@ rootProject.name = "wavy-slider-project"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

include(":library")
// We want the project name to be "wavy-slider" (suffixed with proper platform type) but its directory/folder name to be "library".
// If the project name were not set here, it would be published with its directory/folder name ("library")
// suffixed with the type of platform added by Kotlin Multiplatform.
project(":library").name = "wavy-slider"
include(":showcase:shared")
include(":showcase:androidApp")
2 changes: 1 addition & 1 deletion showcase/wasmApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
alias(libs.plugins.kotlin.multiplatform)

0 comments on commit 74b6b07

Please sign in to comment.