Build Trestle from source
Set up the Kotlin Multiplatform project, run the desktop app, build the Android and iOS apps, and run the checks that CI runs.
Trestle is a Kotlin Multiplatform project with a Compose Multiplatform interface. The shared module contains the interface, product logic, network clients, persistence, installer, and domain model. Platform source sets provide runtime adapters and app storage paths.
androidApp/ Android application and entry point
desktopApp/ Desktop application and entry point
iosApp/ iOS application and Xcode project
shared/ Shared UI, resources, domain model, and tests
site/ This website
gradle/ Version catalog and Gradle wrapper files
licenses/ Licenses for bundled third-party assetsRequirements
- JDK 21
- Android SDK 37 for Android builds
- Xcode 16.4 or newer for iOS builds
Use the included Gradle wrapper. You do not need a separate Gradle installation.
Run the desktop app
./gradlew :desktopApp:runModrinth works without an access key. CurseForge requires a key that CurseForge issued for Trestle. If you have an approved Trestle key, set it before you build or run the application:
export TRESTLE_CURSEFORGE_API_KEY="your-approved-key"
./gradlew :desktopApp:runDo not use the key from another launcher. Without a key, Trestle shows CurseForge as unavailable, and the other catalogs still work.
Build the Android app
./gradlew :androidApp:assembleDebugThe command creates ARM64, x64, and universal debug APKs under androidApp/build/outputs/apk/debug. The Android build reads the same TRESTLE_CURSEFORGE_API_KEY variable and adds it to the application manifest.
Release APKs and app bundles use a dedicated signing key. See Android release signing. The Android runtime guide explains which devices and Minecraft versions Android supports.
Build the iOS app
Open iosApp/Trestle.xcodeproj on a Mac. Select a development team, then build the Trestle scheme.
To compile the shared iOS target from Gradle:
./gradlew :shared:compileKotlinIosSimulatorArm64Device builds include the iOS runtime payload. The simulator supports launcher workflows but cannot start the ARM64 device runtime. See the iOS launcher target for the build, signing, and runtime requirements.
Validate changes
GitHub Actions runs these checks for each pull request and each push to main.
./gradlew :shared:allTests
./gradlew :androidApp:lintDebug
./gradlew :desktopApp:classes
./gradlew ktlintCheck detektFix formatting with ./gradlew ktlintFormat. ktlint reads its rules from .editorconfig. detekt reads config/detekt/detekt.yml and ignores the existing findings in each module's detekt-baseline.xml. Fix new detekt findings instead of adding them to the baseline.
Local Git checks
Install Lefthook 1.13.6 or newer and Python 3.10 or newer. Run lefthook install once in each clone or linked worktree.
The commit hook checks staged whitespace. The push hook selects checks from the files that the push changes. Kotlin, Gradle, Python, and website changes each run their own checks.
To preview the complete local check plan:
python3 scripts/check-push.py --all --dry-run --verboseEdit this website
The website lives in site/ and uses TanStack Start, Fumadocs, and Vite. The site README explains how to run, check, and publish it.