Contributions are welcome. ROADMAP.md lists work that is already known to need doing, if you want somewhere to start.
Open an issue with a clear title, steps to reproduce, the app version, your device and Android version, and any logs or screenshots.
Open an issue describing the feature and why it is worth having. Mockups help.
- Fork and branch off
main. - Make your change.
- Format everything:
./gradlew spotlessApply - Run what CI runs:
./gradlew detekt spotlessCheck testDebugUnitTest :app:assembleDebug --parallel- If you changed UI on purpose, regenerate the references and commit them:
./gradlew :app:updateDebugScreenshotTest- Open the pull request. CI runs the same checks, comments the coverage figure, and the merge queue re-runs them before anything lands on
main.
Commit messages follow Conventional Commits; release-please builds the changelog and version bump from them. See RELEASE.md.
| Module | Holds |
|---|---|
:app |
UI, entry point, sensor and location access |
:feature:optimizer |
SolPanViewModel and the optimisation logic |
:core:model |
TiltMode, LocationData, OptimalPanelParameters |
:core:data |
repository implementations, DataStore access |
:core:analytics |
the AnalyticsTracker seam and its Firebase implementation |
:core:designsystem |
shared composables, theme, design tokens |
:core:solar |
SolarCalculator, AlignmentState |
:baselineprofile |
macrobenchmarks and the profile generator |
build-logic/ |
Gradle convention plugins |
ARCHITECTURE.md covers how they fit together.
AGP 9.4.1 on Gradle 9.7.1 and Kotlin 2.4.20, with the configuration cache and build cache both on. Shared configuration lives in build-logic/ rather than being repeated per module:
| Plugin | Applies |
|---|---|
solpan.android.application |
app defaults, compileSdk/compileSdkMinor, R8 on release, spotless |
solpan.android.library |
library defaults, Dokka, spotless |
solpan.jacoco.report |
the aggregate coverage report |
Dependency versions are pinned in gradle/libs.versions.toml. Renovate raises the bumps; group a toolchain change (Gradle and AGP move together) into one pull request, because neither passes alone.
# build
./gradlew :app:assembleDebug
./gradlew :app:assembleRelease
# tests
./gradlew testDebugUnitTest
./gradlew :feature:optimizer:testDebugUnitTest --tests "*SolPanViewModelTest"
./gradlew app:jacocoTestReport
./gradlew app:jacocoCoverageVerification
# quality
./gradlew spotlessApply # every module
./gradlew spotlessCheck # every module
./gradlew detekt # every module
# docs
./gradlew :dokkaGenerate # build/dokka/htmlSpotless runs ktfmt then ktlint 1.8.0 with the Compose rule set, configured once in build-logic and applied to every module. Detekt uses configs/detekt/detekt.yml and runs on every module too.
There is no detekt baseline. A finding gets fixed, or the rule gets turned off in detekt.yml with a comment saying why. Two are currently off: the formatting ruleset, because spotless owns formatting and detekt's bundled ktlint is older and disagrees with it, and LongMethod for @Composable, because a long composable is usually a large UI tree rather than a complex function. CyclomaticComplexMethod still applies to composables.
- Apache 2.0 licence headers are required on Kotlin files and are added by
spotlessApply. - No star imports.
- No dependency injection framework. Dependencies are constructor-injected and wired at the call site, which is what keeps the fakes in tests simple.
- Platform types get an interface in front of them (
MagneticDeclinationProvideroverGeomagneticField) so they can be faked.
Public declarations carry KDoc. Dokka 2 publishes it to https://mobilemobilellc.github.io/solpan/ on every push to main.
- Document what a thing does and any non-obvious invariant, not how it is implemented.
@paramand@returnwhere the name does not already say it.- Link with
[Type]so Dokka resolves it. - A file-level comment that belongs to no declaration must be
/* */, not/** */; ktlint rejects a dangling top-level KDoc.
Build it locally with ./gradlew :dokkaGenerate and open build/dokka/html/index.html.
app.mobilemobile.solpan.optimizer.SolPanViewModel- the state containerapp.mobilemobile.solpan.solar.SolarCalculator- sun positionapp.mobilemobile.solpan.orientation.DeviceOrientationController- accelerometer and magnetometer fusionapp.mobilemobile.solpan.location.DeviceLocationManager- location updatesapp.mobilemobile.solpan.ui.screen.SolPanScreen- the main screenapp.mobilemobile.solpan.designsystem.theme.SolPanTheme- theming
Open a GitHub Discussion, or check existing issues.