This repo shows a Gradle multi-project build structure that uses the Kotlin Multiplatform to build a JVM, JS, Desktop and Compose Web (wasm) applications.
# Mac OS
$ curl -s "https://get.sdkman.io" | bash
$ sdk i java 22.ea-open
$ sdk u java 22.ea-open
$ ./gradlew buildAndPublish
Run Modules
$ ./gradlew :common:run
$ ./gradlew :backend:run
$ ./gradlew :web:jsBrowserProductionRun -t
# Publishing
$ ./gradlew publishAllPublicationsToLocalRepository
# Benchmark
$ ./gradlew :benchmark:benchmark
# Dependency Graph
$ ./gradlew :backend:listResolvedArtifacts
$ ./gradlew createModuleGraph
# Misc
$ ./gradlew checkBuildLogicBestPractices
$ ./gradlew generateChangelog
$ ./gradlew cleanAll
# Upgrade yarn lock file
$ ./gradlew kotlinUpgradeYarnLock
# GitHub Actions lint
$ actionlint
- π Kotlin Multiplatform Package Search
- π¨ Compose Multiplatform Template
- π Compose Lint Rules
%%{
init: {
'theme': 'neutral'
}
}%%
graph LR
subgraph compose
desktop
web
end
subgraph dep-mgmt
bom
catalog
end
subgraph meta
compiler
ksp
end
subgraph compiler
compiler
plugin
end
subgraph ksp
ksp
processor
end
web --> common
web --> common
desktop --> common
backend --> common
web --> common
benchmark --> common