-
-
Save skydoves/5d17bea13ec439ceff564a15dc934a76 to your computer and use it in GitHub Desktop.
kmp_arch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kotlin { | |
@OptIn(ExperimentalWasmDsl::class) | |
wasmJs { | |
moduleName = "composeApp" | |
browser { | |
val rootDirPath = project.rootDir.path | |
val projectDirPath = project.projectDir.path | |
commonWebpackConfig { | |
outputFileName = "composeApp.js" | |
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply { | |
static = (static ?: mutableListOf()).apply { | |
// Serve sources to debug inside browser | |
add(rootDirPath) | |
add(projectDirPath) | |
} | |
} | |
} | |
} | |
binaries.executable() | |
} | |
androidTarget { | |
@OptIn(ExperimentalKotlinGradlePluginApi::class) | |
compilerOptions { | |
jvmTarget.set(JvmTarget.JVM_11) | |
} | |
} | |
listOf( | |
iosX64(), | |
iosArm64(), | |
iosSimulatorArm64() | |
).forEach { iosTarget -> | |
iosTarget.binaries.framework { | |
baseName = "ComposeApp" | |
isStatic = true | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment