| name | composewebview-development |
| description | Builds, tests, and formats ComposeWebView multiplatform library. Handles Android, iOS, Desktop (JVM), and Web (JS) platforms. Use when building, testing, running Spotless formatting, or checking platform-specific code. Supports expect/actual pattern workflows. |
ComposeWebView Development Workflow
This skill automates building, testing, and formatting for the ComposeWebView multiplatform library across Android, iOS, Desktop (JVM), and Web (JS) platforms.
Quick Commands
Format Code (REQUIRED before commits)
./gradlew spotlessApply
Run All Tests
./gradlew :compose-webview:allTests
Build All Platforms
bash .agent/skills/development/scripts/build_all.sh
Check Implementation Status
bash .agent/skills/development/scripts/platform_status.sh
Platform-Specific Workflows
Android
# Build
./gradlew :compose-webview:assembleDebug
# Test
./gradlew :compose-webview:testDebugUnitTest
# Lint
./gradlew lintDebug
iOS
# Link (build)
./gradlew :compose-webview:linkIosSimulatorArm64
# Test
./gradlew :compose-webview:iosSimulatorArm64Test
Desktop (JVM)
# Compile
./gradlew :compose-webview:compileKotlinDesktop
# Test
./gradlew :compose-webview:desktopTest
Web (JS)
# Compile
./gradlew :compose-webview:compileKotlinJs
# Test
./gradlew :compose-webview:jsTest
Adding New Features
ComposeWebView uses the expect/actual pattern for multiplatform code. Follow these steps:
Define in Common: Add
expectdeclaration incommonMain/kotlin/com/parkwoocheol/composewebview/expect class PlatformFeature { fun doSomething(): String }Implement per Platform: Add
actualimplementation in each platform's source setandroidMain/- Android WebView implementationiosMain/- WKWebView implementationdesktopMain/- CEF (Chromium Embedded Framework) implementationjsMain/- Web/JS implementation
Verify Completeness: Run platform status check
bash .agent/skills/development/scripts/platform_status.shTest: Run platform-specific tests
bash .agent/skills/development/scripts/test_all.shFormat: MUST run Spotless before committing
./gradlew spotlessApply
See reference/platform_specifics.md for detailed platform patterns and constraints.
Code Templates
Creating expect/actual
Use the template: templates/ExpectActualTemplate.kt.template
Creating Composables
Use the template: templates/ComposableTemplate.kt.template
Gradle Tasks Reference
For a complete list of available Gradle tasks, see reference/gradle_tasks.md.
Common Tasks
Clean Build
./gradlew clean
Build and Test Everything
bash .agent/skills/development/scripts/test_all.sh
Check Code Formatting (without applying)
bash .agent/skills/development/scripts/format_check.sh
Platform Constraints
iOS (WKWebView)
- Limited zoom control
- Strict security policies
- Requires message handlers for JSBridge
Desktop (CEF via KCEF)
- Asynchronous initialization required
- SwingPanel integration
- Platform-specific threading considerations
Web (JS)
- IFrame-based implementation
- postMessage bridge for communication
- Limited native features
See detailed constraints in reference/platform_specifics.md.
Scripts
This skill provides the following automation scripts:
- build_all.sh: Builds all platforms sequentially with error handling
- test_all.sh: Runs comprehensive test suite across all platforms
- format_check.sh: Checks Spotless formatting (for CI/pre-commit hooks)
- platform_status.sh: Reports expect/actual implementation completeness
All scripts are located in scripts/ and can be run from the project root.
Troubleshooting
Build Failures
- Clean Gradle cache:
./gradlew clean - Invalidate caches:
rm -rf .gradle - Check Java version:
java -version(should be 17+)
Test Failures
- Run specific platform tests to isolate issues
- Check platform-specific logs
- Verify all expect/actual pairs are implemented
Formatting Issues
Run ./gradlew spotlessApply to auto-fix formatting issues.
Related Resources
- Architecture: See
.agent/knowledge/architecture.mdfor design patterns - Commands: See
.agent/knowledge/commands.mdfor workflow reference - Code Style: See
.agent/knowledge/code_style.mdfor coding conventions