Development Guide
Setting Up Development Environment
Requirements
Java Development Kit: JDK 11 or higher
Android Studio: Latest stable version (Hedgehog or newer recommended)
Android SDK: API levels 24-36
Git: For version control
Steps
Install Android Studio
Download from developer.android.com
Install with default settings
Open SDK Manager
Install Android SDK Platform 36
Install Android SDK Build-Tools 34.0.0+
Clone Repository
git clone https://github.com/yourusername/Pebbl.git cd PebblConfigure local.properties
sdk.dir=C\:\\Users\\YourUsername\\AppData\\Local\\Android\\Sdk OPENROUTER_API_KEY=your_api_key_hereSync Gradle
Open project in Android Studio
Wait for Gradle sync to complete
Resolve any dependency issues
Run on Emulator/Device
Create AVD (Android Virtual Device) with API 24+
Or connect physical device with USB debugging
Click Run (Shift+F10)
Building the App
Debug Build
Output: app/build/outputs/apk/debug/app-debug.apk
Release Build
For signed release:
Create keystore:
Add to
local.properties:Update
build.gradle.kts:Build signed release:
Output: app/build/outputs/apk/release/app-release.apk
Running Tests
Unit Tests
Located in app/src/test/
Run all tests:
Run specific test:
Instrumented Tests
Located in app/src/androidTest/
Run on connected device:
Example Unit Test
Code Style
Kotlin Style Guide
Follow Kotlin Coding Conventions
Key points:
Naming: camelCase for functions/variables, PascalCase for classes
Indentation: 4 spaces (no tabs)
Line length: Max 120 characters
Imports: No wildcard imports, organize alphabetically
Trailing commas: Use in multi-line parameter lists
Compose Best Practices
State Hoisting: Lift state to composable callers
Reusability: Create small, focused composables
remember: Use for expensive computations
LaunchedEffect: For side effects tied to lifecycle
derivedStateOf: For derived state calculations
Example Well-Formatted Code
Last updated
