improve build & sync times
This commit is contained in:
+38
-30
@@ -21,37 +21,41 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
listOf(
|
jvm()
|
||||||
iosX64(),
|
|
||||||
iosArm64(),
|
if (providers.gradleProperty("include_ios").get().toBoolean()) {
|
||||||
iosSimulatorArm64()
|
listOf(
|
||||||
).forEach { iosTarget ->
|
iosX64(),
|
||||||
iosTarget.binaries.framework {
|
iosArm64(),
|
||||||
baseName = "ComposeApp"
|
iosSimulatorArm64()
|
||||||
isStatic = true
|
).forEach { iosTarget ->
|
||||||
|
iosTarget.binaries.framework {
|
||||||
|
baseName = "ComposeApp"
|
||||||
|
isStatic = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jvm()
|
if (providers.gradleProperty("include_wasm").get().toBoolean()) {
|
||||||
|
@OptIn(ExperimentalWasmDsl::class)
|
||||||
@OptIn(ExperimentalWasmDsl::class)
|
wasmJs {
|
||||||
wasmJs {
|
outputModuleName = "composeApp"
|
||||||
outputModuleName = "composeApp"
|
browser {
|
||||||
browser {
|
val rootDirPath = project.rootDir.path
|
||||||
val rootDirPath = project.rootDir.path
|
val projectDirPath = project.projectDir.path
|
||||||
val projectDirPath = project.projectDir.path
|
commonWebpackConfig {
|
||||||
commonWebpackConfig {
|
outputFileName = "composeApp.js"
|
||||||
outputFileName = "composeApp.js"
|
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
|
||||||
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
|
static = (static ?: mutableListOf()).apply {
|
||||||
static = (static ?: mutableListOf()).apply {
|
// Serve sources to debug inside browser
|
||||||
// Serve sources to debug inside browser
|
add(rootDirPath)
|
||||||
add(rootDirPath)
|
add(projectDirPath)
|
||||||
add(projectDirPath)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
binaries.executable()
|
||||||
}
|
}
|
||||||
binaries.executable()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
@@ -104,14 +108,18 @@ kotlin {
|
|||||||
implementation(libs.kstore.file)
|
implementation(libs.kstore.file)
|
||||||
}
|
}
|
||||||
|
|
||||||
iosMain.dependencies {
|
findByName("iosMain")?.run {
|
||||||
implementation(libs.ktor.client.darwin)
|
dependencies {
|
||||||
implementation(libs.kstore.file)
|
implementation(libs.ktor.client.darwin)
|
||||||
|
implementation(libs.kstore.file)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wasmJsMain.dependencies {
|
findByName("wasmJsMain")?.run {
|
||||||
implementation(libs.kstore.storage)
|
dependencies {
|
||||||
implementation(libs.ktor.client.js)
|
implementation(libs.kstore.storage)
|
||||||
|
implementation(libs.ktor.client.js)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,3 +16,8 @@ android.nonTransitiveRClass=true
|
|||||||
|
|
||||||
#Compose
|
#Compose
|
||||||
org.jetbrains.compose.experimental.jscanvas.enabled=true
|
org.jetbrains.compose.experimental.jscanvas.enabled=true
|
||||||
|
|
||||||
|
include_wasm=true
|
||||||
|
include_ios=false
|
||||||
|
#Flip this to false when including the ios targets
|
||||||
|
org.gradle.unsafe.configuration-cache=true
|
||||||
|
|||||||
Reference in New Issue
Block a user