A Kotlin Multiplatform (Compose Multiplatform) mobile application for measuring and calculating the Energy Efficiency Index (EEI) of mobile devices, following EU Regulation 2023/1669.
Open source under EUPL-1.2.
The EEI measures how energy-efficient a device is during a standardized "Day of Use" scenario defined by the EU regulation. This tool automates the measurement process across Android and iOS from a single shared codebase.
Current status: foundational structure in place — battery UI, Appium tests, EUPL compliance tooling. Core EEI features (battery measurement, Day of Use scenario, EEI calculation, reporting) are under active development.
├── composeApp/ # Shared Compose Multiplatform UI + business logic
│ └── src/
│ ├── commonMain/ # Common code (UI, EEI logic)
│ ├── androidMain/ # Android-specific implementations
│ └── iosMain/ # iOS-specific implementations
├── androidApp/ # Android application module
├── iosApp/ # iOS application (Xcode project)
├── appiumTests/ # Appium E2E tests (Kotlin/JUnit 5)
├── sharedTestTags/ # Shared test tag constants (KMP)
├── scripts/ # Build and compliance scripts
└── gradle/ # Gradle wrapper and version catalog
- JDK 17+
- Android Studio (Hedgehog or later) with Android SDK 34+
- Xcode 15+ (iOS, macOS only)
- Kotlin Multiplatform Mobile plugin (Android Studio)
# Install Gradle wrapper (already included)
./gradlew --version- Node.js 16+
- Appium 2.x
npm install -g appium
appium driver install uiautomator2 # Android
appium driver install xcuitest # iOS# Android APK
./scripts/build_apps.sh --android
# iOS simulator app
./scripts/build_apps.sh --ios
# Both platforms
./scripts/build_apps.sh --all| Platform | Output path |
|---|---|
| Android | androidApp/build/outputs/apk/debug/androidApp-debug.apk |
| iOS | build/ios-derived-data/Build/Products/Debug-iphonesimulator/ |
Static analysis is enforced via detekt:
./gradlew detektConfiguration: detekt.yml. Rules are applied to all modules. Compose Multiplatform generated sources are automatically excluded.
No device or emulator required. Runs on JVM.
# Run all unit tests
./gradlew :composeApp:testDebugUnitTest
# Open HTML report
open composeApp/build/reports/tests/testDebugUnitTest/index.htmlCovered by unit tests:
BatteryServiceTest(11 tests) — battery level range, availability, edge cases- Uses
FakeBatteryDataSource— no platform runtime needed
Start Appium server first:
appium --port 4723 --address 127.0.0.1Then run:
./gradlew :appiumTests:androidTest # Android
./gradlew :appiumTests:iosTest # iOS
./gradlew :appiumTests:allAppiumTestsOverride APK path or device via system properties:
./gradlew :appiumTests:androidTest -DapkPath=/path/to/app.apkSee appiumTests/README.md and appiumTests/ANDROID_STUDIO_SETUP.md for IDE setup.
| Element | Tag |
|---|---|
| Start Measurement Button | start_measurement_button |
| Result Label | result_label |
Android
- Verify
ANDROID_HOMEis set - Check emulator is running:
adb devices
iOS
- Install Xcode CLI tools:
xcode-select --install - List simulators:
xcrun simctl list devices
Appium
- Check server status:
curl http://127.0.0.1:4723/status - List installed drivers:
appium driver list --installed
This project enforces EUPL-1.2 compliance on all dependencies.
python scripts/check-licenses.py # Check compliance
python scripts/update-dependencies-md.py # Update DEPENDENCIES.mdAll new dependencies must be EUPL-1.2 compatible. See DEPENDENCIES.md for the full analysis.
Compliance status:
- All dependencies are EUPL-compatible
- All source files carry EUPL-1.2 license headers
- Automated compliance checks run on every push (GitHub Actions)
References: EUPL-1.2 text · EUPL compatibility guidelines
See CONTRIBUTING.md. This project uses conventional commits and semantic versioning. Changes are tracked in CHANGELOG.md.
Copyright © 2026 Ahmed ADOUANI
Licensed under the EUPL, Version 1.2. You may obtain a copy of the licence at: https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
SPDX-License-Identifier: EUPL-1.2