Skip to content

Commit eb9c2de

Browse files
authored
Merge pull request #3 from MarkADom/docs/update-v1.1
docs: update documentation for v1.1.0 release
2 parents b33322b + bdb1738 commit eb9c2de

4 files changed

Lines changed: 67 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55

66
## [Unreleased]
77

8+
## [1.1.0] - 2026-05-25
9+
10+
### Added
11+
- Hilt 2.56.2 DI: `@Singleton` repository, `@HiltViewModel` on all ViewModels, `AppModule`
12+
- 13 instrumented tests: `NoiseLevelDaoTest` (9) + `NavigationTest` (4)
13+
- GitHub Actions CI/CD with green badge — unit tests on every push
14+
- `HiltTestRunner`, `TestAppModule` (in-memory Room), `TestUtils` for test infrastructure
15+
16+
### Fixed
17+
- Multiple-ViewModel buffer bug: three independent `NoiseRepositoryImpl` instances
18+
caused clearing history while monitoring to silently fail
19+
- `ActivityInvoker` ClassNotFoundException on instrumented test teardown
20+
21+
## [1.0.2] - 2026-05-24
22+
23+
### Fixed
24+
- Permission flow: app now requests microphone and notification permissions
25+
on first launch via system dialog (previously showed blocked screen immediately)
26+
- Microphone unavailable toast appeared incorrectly when tapping STOP MONITORING
27+
- Version number in Settings was hardcoded as 1.0.0 (now uses BuildConfig.VERSION_NAME)
28+
- Notifications toggle showed ON even when Android notification permission was OFF
29+
30+
## [1.0.1] - 2026-05-23
31+
32+
### Fixed
33+
- License updated from CC BY-NC to BUSL-1.1
34+
- README: Hilt added to tech stack, Accompanist version corrected, Android Studio
35+
version updated to Meerkat (2025.1.1)
36+
- ARCHITECTURE.md: removed incorrect "No Hilt" section, replaced with actual DI setup
37+
- ADRs renumbered (clean sequence), ADR-004 documents Hilt decision
38+
- Calibration offset corrected to 80 dB throughout docs
39+
840
## [1.0.0] - 2026-05-19
941

1042
### Core

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,25 @@ It's a portfolio app built to demonstrate modern Android development - Compose,
5858

5959
---
6060

61+
## Testing
62+
63+
82 tests total — 69 unit and 13 instrumented.
64+
65+
Unit tests run on the JVM, no Android runtime needed. They cover noise
66+
classification, dB calculation, batch buffer logic, period filtering,
67+
and settings validation.
68+
69+
Instrumented tests run on a physical device (the emulator mic returns
70+
~20 dB regardless of environment, which makes audio tests meaningless):
71+
- `NoiseLevelDaoTest` — 9 tests against an in-memory Room database
72+
- `NavigationTest` — 4 tests verifying the bottom nav flow
73+
74+
Infrastructure: `HiltTestRunner` swaps the app component for a test
75+
component; `TestAppModule` provides the in-memory DB; `TestUtils` keeps
76+
timestamps deterministic.
77+
78+
---
79+
6180
## Tech Stack
6281

6382
| Library | Version | Purpose |

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ android {
1414
applicationId = "com.marcodomingues.noiseguard"
1515
minSdk = 24
1616
targetSdk = 36
17-
versionCode = 2
18-
versionName = "1.0.2"
17+
versionCode = 3
18+
versionName = "1.1.0"
1919
testInstrumentationRunner = "com.marcodomingues.noiseguard.HiltTestRunner"
2020
}
2121

docs/ARCHITECTURE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,17 @@ Hilt (`hilt-android 2.56.2`) wires the dependency graph. `AppModule` provides `@
5656
The singleton scope matters: without it, each ViewModel constructs its own `NoiseRepositoryImpl`, which means three independent write buffers. Clearing history while monitoring was broken until this was fixed. See [ADR-004](ADRs.md#adr-004-hilt-for-dependency-injection) for the full reasoning.
5757

5858
No multi-module, no WorkManager — neither is warranted at this scale.
59+
60+
## Testing
61+
62+
**Unit tests (69)** run on the JVM — no Android runtime, no emulator needed.
63+
`AudioAnalyzer`, `NoiseRepository`, and ViewModel logic are covered.
64+
65+
**Instrumented tests (13)** run on a physical device:
66+
- `NoiseLevelDaoTest` — Room DAO queries against an in-memory database
67+
- `NavigationTest` — Compose navigation via `createAndroidComposeRule<MainActivity>()`
68+
69+
Test infrastructure:
70+
- `HiltTestRunner` — replaces the default runner, swaps Hilt component for test component
71+
- `TestAppModule` — provides in-memory Room DB, isolates tests from on-device data
72+
- `TestUtils` — fixed `BASE_TIMESTAMP` and helpers for deterministic test data

0 commit comments

Comments
 (0)