Installation
Greenhouse Admin supports Web, Android, iOS, and Desktop platforms. Follow the platform-specific instructions below to install and configure the application.
System requirements
JDK 11 or higher - For Gradle and Kotlin compilation
Git - For version control
8GB RAM minimum - 16GB recommended for optimal performance
Modern browser with WebAssembly support:
Chrome 119+
Firefox 120+
Safari 17+
Edge 119+
Node.js 18+ (automatically managed by Gradle)
Yarn (automatically managed by Gradle)
Android Studio Hedgehog (2023.1.1) or later
Android SDK with API levels:
Minimum: API 24 (Android 7.0)
Target: API 36 (Android 15)
Compile: API 36
Android device or emulator
macOS 12.0 or later
Xcode 14.0 or later
CocoaPods (for dependency management)
iOS 14.0+ device or simulator
Apple Developer account (for device deployment)
Windows: Windows 10 or later
macOS: macOS 11.0 or later
Linux: Ubuntu 20.04 or equivalent
JVM 11 or higher
Installation steps
1. Clone the repository
git clone https://github.com/apptolast/greenhouse-admin.git
cd greenhouse-admin
Create a local.properties file in the project root:
# API Configuration
API_BASE_URL =https://your-api-endpoint.com/api/v1/
# Android SDK path (auto-detected by Android Studio)
sdk.dir =/path/to/Android/sdk
The API_BASE_URL must include the trailing /api/v1/ path. This value is injected at build time using BuildKonfig.
3. Verify Gradle setup
Test your Gradle installation:
Expected output:
Gradle 8.x
Kotlin: 2.3.0
JVM: 11.x or higher
Building for web Greenhouse Admin supports two web targets: WebAssembly (Recommended) For modern browsers with better performance: # Development build with hot reload
./gradlew :composeApp:wasmJsBrowserDevelopmentRun
# Production build
./gradlew :composeApp:wasmJsBrowserProductionWebpack
Output: composeApp/build/dist/wasmJs/productionExecutable/ JavaScript (Legacy) For older browser compatibility: # Development build with hot reload
./gradlew :composeApp:jsBrowserDevelopmentRun
# Production build
./gradlew :composeApp:jsBrowserProductionWebpack
Output: composeApp/build/dist/js/productionExecutable/ Updating web dependencies After modifying dependencies in build.gradle.kts, update the Yarn lock files:
# For JavaScript target
./gradlew kotlinUpgradeYarnLock
# For WebAssembly target
./gradlew kotlinWasmUpgradeYarnLock
Deploying to production After building, deploy the contents of the output directory to your web server: # Example: Deploy to nginx
cp -r composeApp/build/dist/wasmJs/productionExecutable/ * /var/www/html/
Building for Android Using Android Studio
Open the project in Android Studio
Select the composeApp configuration from the run widget
Choose your target device/emulator
Click Run
Using command line Build debug APK: # macOS/Linux
./gradlew :composeApp:assembleDebug
# Windows
. \ gradlew.bat :composeApp:assembleDebug
Output: composeApp/build/outputs/apk/debug/composeApp-debug.apk Build release APK: ./gradlew :composeApp:assembleRelease
Android configuration The app is configured with the following settings (from build.gradle.kts): android {
namespace = "com.apptolast.greenhouse.admin"
compileSdk = 36
defaultConfig {
applicationId = "com.apptolast.greenhouse.admin"
minSdk = 24 // Android 7.0
targetSdk = 36 // Android 15
versionCode = 1
versionName = "1.0"
}
}
Signing for release Add signing configuration to local.properties: RELEASE_STORE_FILE =/path/to/keystore.jks
RELEASE_STORE_PASSWORD =your_store_password
RELEASE_KEY_ALIAS =your_key_alias
RELEASE_KEY_PASSWORD =your_key_password
Installing on device # Install debug build
adb install composeApp/build/outputs/apk/debug/composeApp-debug.apk
# Or use Gradle
./gradlew :composeApp:installDebug
Building for iOS Prerequisites
Install Xcode from the App Store
Install Xcode Command Line Tools:
Using Xcode
Generate the Xcode project (first time only):
./gradlew :composeApp:embedAndSignAppleFrameworkForXcode
Open the iOS project:
open iosApp/iosApp.xcodeproj
Select your target device or simulator
Click the Run button
iOS framework configuration The Kotlin framework is configured in build.gradle.kts: listOf (
iosArm64 (), // Physical devices
iosSimulatorArm64 () // Simulator on M1/M2 Macs
). forEach { iosTarget ->
iosTarget.binaries. framework {
baseName = "ComposeApp"
isStatic = true
}
}
Koin is initialized in the iOS app (Swift): import ComposeApp
@main
struct iOSApp : App {
init () {
KoinInitializerKt. doInitKoin ()
}
var body: some Scene {
WindowGroup {
ContentView ()
}
}
}
Testing on simulator # List available simulators
xcrun simctl list devices
# Boot a simulator
xcrun simctl boot "iPhone 15 Pro"
Building for desktop Run during development # macOS/Linux
./gradlew :composeApp:run
# Windows
. \ gradlew.bat :composeApp:run
Create distributable packages # Create native installers
./gradlew :composeApp:packageDistributionForCurrentOS
# Or specify format:
./gradlew :composeApp:packageDmg # macOS
./gradlew :composeApp:packageMsi # Windows
./gradlew :composeApp:packageDeb # Linux
Output formats (from build.gradle.kts): compose. desktop {
application {
mainClass = "com.apptolast.greenhouse.admin.MainKt"
nativeDistributions {
targetFormats (
TargetFormat.Dmg, // macOS
TargetFormat.Msi, // Windows
TargetFormat.Deb // Linux
)
packageName = "com.apptolast.greenhouse.admin"
packageVersion = "1.0.0"
}
}
}
Desktop-specific dependencies The JVM target uses Swing coroutines: jvmMain. dependencies {
implementation (compose.desktop.currentOs)
implementation (libs.kotlinx.coroutinesSwing)
implementation (libs.ktor.client.okhttp)
}
Desktop-specific code goes in composeApp/src/jvmMain/kotlin/: // jvmMain/kotlin/Platform.jvm.kt
actual fun getPlatform (): Platform = Platform.Desktop
Dependency management
Version catalog
All dependencies are managed in gradle/libs.versions.toml:
[ versions ]
kotlin = "2.3.0"
composeMultiplatform = "1.10.0"
koin-bom = "4.1.1"
ktor = "3.4.0"
kotlinx-serialization = "1.10.0"
[ libraries ]
koin-bom = { module = "io.insert-koin:koin-bom" , version.ref = "koin-bom" }
koin-core = { module = "io.insert-koin:koin-core" }
ktor-client-core = { module = "io.ktor:ktor-client-core" , version.ref = "ktor" }
Ktor uses different HTTP engines per platform:
Platform Engine Library Android OkHttp ktor-client-okhttpiOS Darwin ktor-client-darwinDesktop (JVM) OkHttp ktor-client-okhttpWeb (JS/Wasm) JavaScript ktor-client-js
IDE setup
IntelliJ IDEA / Android Studio
Install required plugins:
Kotlin Multiplatform Mobile (KMM)
Compose Multiplatform IDE Support
Configure Kotlin plugin:
Go to Settings → Languages & Frameworks → Kotlin
Ensure “Use compiler from ‘kotlin-compiler-embeddable’” is enabled
Set up run configurations:
The IDE will automatically detect available run configurations
Use the run widget in the toolbar to switch between platforms
Recommended settings
// Enable experimental features
compilerOptions {
freeCompilerArgs. add ( "-Xexpect-actual-classes" )
}
languageSettings {
enableLanguageFeature ( "ExplicitBackingFields" )
}
Verification
Verify your installation by running the test suite:
# Run all tests
./gradlew test
# Run tests for specific platform
./gradlew :composeApp:jvmTest
./gradlew :composeApp:iosSimulatorArm64Test
All tests should pass before proceeding with development. If tests fail, check your JDK version and environment configuration.
Troubleshooting
Gradle build fails
Issue: Could not resolve all dependencies
Solution: Clear Gradle cache and rebuild:
./gradlew clean
rm -rf ~/.gradle/caches
./gradlew build --refresh-dependencies
iOS build fails
Issue: Framework not found ComposeApp
Solution: Rebuild the Kotlin framework:
./gradlew :composeApp:embedAndSignAppleFrameworkForXcode
Web build fails with Yarn errors
Issue: Yarn lock file is outdated
Solution: Upgrade the Yarn lock files:
./gradlew kotlinUpgradeYarnLock
./gradlew kotlinWasmUpgradeYarnLock
Android build fails
Issue: SDK location not found
Solution: Ensure local.properties contains the correct SDK path:
sdk.dir =/Users/username/Library/Android/sdk
Next steps
Quickstart Learn how to run your first build
Building Build for all platforms
Architecture Understand the project structure
Development setup Complete development environment setup