Skip to content

Commit fa54cd1

Browse files
committed
feat: integrate Firebase for Web and Crashlytics for iOS
Migrate iOS SQLCipher to SwiftPM, automate screenshots, prepare the disabled Room 3.0 module for future use, and update tests, tooling, and CI.
1 parent 2f80f7e commit fa54cd1

308 files changed

Lines changed: 4831 additions & 286820 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
5+
PROJECT_NAME="${PROJECT_NAME:-NoteDelight}"
6+
PREVIEW_FILE="core/test/ui/src/androidMain/kotlin/com/softartdev/notedelight/screenshot_preview/ScreenshootPreview.kt"
7+
OUTPUT_ROOT="$REPO_ROOT/docs/screenshoots/store"
8+
9+
SCREENSHOTS=(
10+
"phone|light|01|notes|StorePhoneLightNotesPreview|1080|1920"
11+
"phone|light|02|note-detail|StorePhoneLightNoteDetailPreview|1080|1920"
12+
"phone|light|03|sign-in|StorePhoneLightSignInPreview|1080|1920"
13+
"phone|light|04|security-settings|StorePhoneLightSecuritySettingsPreview|1080|1920"
14+
"phone|dark|01|notes|StorePhoneDarkNotesPreview|1080|1920"
15+
"phone|dark|02|note-detail|StorePhoneDarkNoteDetailPreview|1080|1920"
16+
"phone|dark|03|sign-in|StorePhoneDarkSignInPreview|1080|1920"
17+
"phone|dark|04|security-settings|StorePhoneDarkSecuritySettingsPreview|1080|1920"
18+
"tablet|light|01|notes|StoreTabletLightNotesPreview|1920|1200"
19+
"tablet|light|02|sign-in|StoreTabletLightSignInPreview|1920|1200"
20+
"tablet|light|03|security-settings|StoreTabletLightSecuritySettingsPreview|1920|1200"
21+
"tablet|dark|01|notes|StoreTabletDarkNotesPreview|1920|1200"
22+
"tablet|dark|02|sign-in|StoreTabletDarkSignInPreview|1920|1200"
23+
"tablet|dark|03|security-settings|StoreTabletDarkSecuritySettingsPreview|1920|1200"
24+
)
25+
26+
for screenshot in "${SCREENSHOTS[@]}"; do
27+
IFS="|" read -r form theme number scenario composable expected_width expected_height <<< "$screenshot"
28+
output_file="$OUTPUT_ROOT/$form/$theme/$number-$scenario.png"
29+
mkdir -p "$(dirname "$output_file")"
30+
31+
echo "Rendering $composable -> ${output_file#"$REPO_ROOT"/}"
32+
android studio render-compose-preview \
33+
--project="$PROJECT_NAME" \
34+
"$PREVIEW_FILE" \
35+
"$composable" \
36+
--output-image-file="$output_file"
37+
38+
if [[ ! -s "$output_file" ]]; then
39+
echo "Screenshot was not created or is empty: $output_file" >&2
40+
exit 1
41+
fi
42+
43+
actual_width="$(sips -g pixelWidth "$output_file" | awk '/pixelWidth/ {print $2}')"
44+
actual_height="$(sips -g pixelHeight "$output_file" | awk '/pixelHeight/ {print $2}')"
45+
if [[ "$actual_width" != "$expected_width" || "$actual_height" != "$expected_height" ]]; then
46+
echo "Unexpected dimensions for $output_file: ${actual_width}x${actual_height}, expected ${expected_width}x${expected_height}" >&2
47+
exit 1
48+
fi
49+
done
50+
51+
echo "Generated ${#SCREENSHOTS[@]} screenshots in ${OUTPUT_ROOT#"$REPO_ROOT"/}"

.github/workflows/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: macos-latest
1616
steps:
1717
- name: Check out
18-
uses: actions/checkout@v6
18+
uses: actions/checkout@v7
1919
- name: Set up JDK 17
2020
uses: actions/setup-java@v5
2121
with:

.github/workflows/desktop.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
os: [ ubuntu-latest, macos-latest, windows-latest ]
2020
steps:
2121
- name: Check out
22-
uses: actions/checkout@v6
22+
uses: actions/checkout@v7
2323
- name: Set up JDK 17
2424
uses: actions/setup-java@v5
2525
with:

.github/workflows/ios.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Check out
18-
uses: actions/checkout@v6
18+
uses: actions/checkout@v7
1919
- name: Show Xcode version
2020
run: |
2121
xcodebuild -version
@@ -44,7 +44,7 @@ jobs:
4444
KEYCHAIN_NAME: app-signing
4545
run: fastlane setup_certificates_lane
4646
- name: Pre-build with Gradle
47-
run: ./gradlew :app:ios-kit:linkPodReleaseFrameworkIosArm64
47+
run: ./gradlew :app:ios-kit:linkReleaseFrameworkIosArm64
4848
- name: AppStore build lane with gym
4949
working-directory: ./app/iosApp
5050
run: fastlane appstore_build_gym_lane

.github/workflows/kmp.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ permissions:
1414
jobs:
1515
build_job:
1616
name: Build (Unit-tests & Android-Lint)
17-
runs-on: macos-latest
17+
runs-on: macos-26
1818
continue-on-error: true
1919
steps:
2020
- name: Check out
21-
uses: actions/checkout@v6
21+
uses: actions/checkout@v7
2222
- name: Gradle Wrapper Validation
2323
uses: gradle/actions/wrapper-validation@v6
2424
- name: Set up JDK 17
@@ -35,7 +35,7 @@ jobs:
3535
id: kotlin-version
3636
run: echo "version=$(.github/scripts/extract-kotlin-version.sh)" >> "$GITHUB_OUTPUT"
3737
- name: Cache Kotlin/Native
38-
uses: actions/cache@v4
38+
uses: actions/cache@v6
3939
with:
4040
path: ~/.konan
4141
key: kotlin-${{ steps.kotlin-version.outputs.version }}
@@ -49,6 +49,7 @@ jobs:
4949
with:
5050
name: output-build-artifacts
5151
path: |
52+
core/data/db-sqldelight/build/reports
5253
ui/shared/build/reports
5354
ui/test/build/reports
5455
app/android/build/reports
@@ -66,7 +67,7 @@ jobs:
6667
target: [default]
6768
steps:
6869
- name: Check out
69-
uses: actions/checkout@v6
70+
uses: actions/checkout@v7
7071
- name: Set up JDK 17
7172
uses: actions/setup-java@v5
7273
with:
@@ -83,7 +84,7 @@ jobs:
8384
sudo udevadm control --reload-rules
8485
sudo udevadm trigger --name-match=kvm
8586
- name: AVD cache
86-
uses: actions/cache@v4
87+
uses: actions/cache@v6
8788
id: avd-cache
8889
with:
8990
path: |

.github/workflows/web.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: macos-latest
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v6
27+
uses: actions/checkout@v7
2828
- name: Set up JDK 17
2929
uses: actions/setup-java@v5
3030
with:

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,19 @@ app/android/note_room_key_store.jks
6565

6666
### iOS
6767
# Generated files
68-
/app/iosApp/iosApp.xcworkspace/xcuserdata/
68+
/app/iosApp/KotlinMultiplatformLinkedPackage/.build/
69+
/app/iosApp/KotlinMultiplatformLinkedPackage/**/.swiftpm/
70+
/.swiftpm-locks/default/swiftImport/.build/
71+
/.swiftpm-locks/default/swiftImport/Package.swift
72+
/.swiftpm-locks/default/swiftImport/Sources/
73+
/.swiftpm-locks/default/swiftImport/subpackages/
74+
/.swiftpm-locks/default/swiftPMCheckout/
6975
/app/iosApp/fastlane/report.xml
7076

77+
# Xcode user-specific state
78+
**/xcuserdata/
79+
*.xcuserstate
80+
7181
# Built application files
7282
/app/iosApp/iosApp.app.dSYM.zip
7383
/app/iosApp/iosApp.ipa

.swiftpm-locks/default/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
swiftPMCheckout/

.swiftpm-locks/default/swiftImport/Package.resolved

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
## Quick Reference
99

1010
### Project Structure & Module Organization
11-
- Core: `core/domain`, `core/presentation`, `core/data/db-sqldelight` (default), `core/data/db-room` (optional), `core/test/common`.
11+
- Core: `core/domain`, `core/presentation`, selectable `core/data/db-sqldelight` or `core/data/db-room`, `core/test/common`.
1212
- Features: `feature/backup/{domain,ui}`, `feature/console/{domain,presentation,ui}`, `feature/file-explorer/data`.
1313
- UI: `core/ui` (common Compose code and resources), `core/test/ui` (multiplatform Compose UI tests), `core/test/jvm` (JVM-specific UI test utilities).
14-
- Apps: `app/android`, `app/desktop`, `app/web`, `app/ios-kit` (CocoaPods framework), `app/iosApp` (Xcode project).
14+
- Apps: `app/android`, `app/desktop`, `app/web`, `app/ios-kit` (SwiftPM-linked framework), `app/iosApp` (Xcode project).
1515
- Tooling: `build-logic` (Gradle conventions), `thirdparty` (vendored modules), `gradle/libs.versions.toml` (versions).
1616
- Switch DB module via `gradle.properties` key `CORE_DATA_DB_MODULE`.
1717

@@ -21,7 +21,7 @@
2121
- Android instrumentation tests: `./gradlew :app:android:connectedCheck` (requires emulator/device; uses AndroidX Test Orchestrator).
2222
- Desktop app: `./gradlew :app:desktop:run` (launches JVM desktop Compose app).
2323
- Desktop UI tests: `./gradlew :app:desktop:jvmTest` (uses `uiTestJUnit4`).
24-
- iOS: `cd iosApp && pod install` then open `iosApp/iosApp.xcworkspace` in Xcode and run. Regenerate podspec if needed: `./gradlew :app:ios-kit:podspec`.
24+
- iOS: open `app/iosApp/iosApp.xcodeproj` in Xcode and run. Kotlin frameworks and SwiftPM packages are built and embedded by the Gradle build phase.
2525
- iOS UI tests: `./gradlew :app:ios-kit:iosSimulatorArm64Test` (requires iOS simulator; uses multiplatform Compose UI tests).
2626
- Web app: `./gradlew :app:web:wasmJsBrowserDevelopmentRun --continuous` (launches the web app in a browser with hot reload).
2727
- Web UI tests: `./gradlew :app:web:wasmJsBrowserTest` (requires Chrome binary via `CHROME_BIN` environment variable; uses Karma/Chrome headless).

0 commit comments

Comments
 (0)