Skip to content

Build

ToolVersionNotes
JDK21Temurin recommended
Android SDKAPI 34+Required for Android targets
GradleWrapperUse ./gradlew, not a local install

Gradle downloads dependencies on first run. A warm build cache on a mid-range machine takes under 30 seconds for JVM tests.

Terminal window
./gradlew run
Terminal window
./gradlew allTests
Terminal window
./gradlew jvmTest
Terminal window
./gradlew jvmTest --tests "dev.stapler.stelekit.SomeTest"
Terminal window
./gradlew testDebugUnitTest

Build and install on a connected Android device

Section titled “Build and install on a connected Android device”
Terminal window
./gradlew installAndroid
Terminal window
./gradlew packageDistributionForCurrentOS

Requires enableJs=true in gradle.properties:

Terminal window
./gradlew :kmp:wasmJsBrowserDistribution --build-cache -PenableJs=true

Output lands in kmp/build/dist/wasmJs/productionExecutable/.

All source code is in kmp/src/:

Source setPurpose
commonMainPlatform-agnostic UI, domain, repository, database, parser
jvmMainDesktop entry point, file watching, JVM logging
androidMainAndroid entry point, SQLDelight driver factory
iosMainiOS SQLDelight driver
wasmJsMainWeb target (enabled via gradle.properties enableJs=true)
jvmTestJVM UI and integration tests (Roborazzi screenshot tests)
commonTestShared test utilities
businessTestBusiness logic tests without UI
FileRole
kmp/build.gradle.ktsAll dependencies, targets, SQLDelight config
kmp/src/commonMain/.../ui/App.ktRoot Compose composable, screen routing
kmp/src/commonMain/.../ui/AppState.ktGlobal app state model
kmp/src/commonMain/.../db/GraphManager.ktMulti-graph lifecycle
kmp/src/commonMain/.../db/GraphLoader.ktFile import and markdown parsing
kmp/src/commonMain/.../db/GraphWriter.ktFile export and conflict detection
kmp/src/commonMain/.../model/Models.ktPage, Block, Property data classes
kmp/src/commonMain/.../repository/RepositoryFactory.ktBackend abstraction
kmp/src/jvmMain/.../desktop/Main.ktDesktop entry point
kmp/src/commonMain/sqldelight/.../SteleDatabase.sqSQLDelight schema

Gradle build cache is enabled by default. CI uses an encrypted remote cache via gradle/actions/setup-gradle. For local development, the local cache is in ~/.gradle/caches/.

Pass --build-cache to reuse cached task outputs across builds.