Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 0 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,6 @@ jobs:
if: steps.duniverse.outputs.cache-hit != 'true'
run: echo "duniverse cache miss; the duniverse job should have populated it" >&2 && exit 1

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local.properties
Android/app/keystore.jks
Android/app/keystore.properties
Android/app/src/main/jniLibs/
flutter/android/app/src/main/jniLibs/
android/app/src/main/jniLibs/
tests/e2e/screenshots/

xcodebuild*.log
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Logseq Chat

Logseq Chat uses native SwiftUI on iOS and Flutter Material on Android, backed by an OCaml DataScript core. Canonical setup is in `README.md`.
Logseq Chat uses native SwiftUI on iOS and Kotlin/Jetpack Compose on Android, backed by an OCaml DataScript core. Canonical setup is in `README.md`.

## Testing

Expand Down
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Logseq Chat

Logseq Chat is a native SwiftUI app for iOS and a Flutter Material app for
Android. Both clients share an OCaml application model and core, backed by
Logseq Chat is a native SwiftUI app for iOS and a Kotlin/Jetpack Compose
app for Android. Both clients share an OCaml application model and core, backed by
the OCaml DataScript library and the lui reactive UI layer.

Shared core sources live in `shared/src/logseq_chat/core`, with executable entry points
Expand All @@ -12,7 +12,7 @@ in `shared/test/logseq_chat`, one alcotest suite per core module. The core test
## Repository layout

- `apple/`: Swift package, app, extensions, Xcode workspace, and Apple tests.
- `flutter/`: Flutter Android app and its platform integration.
- `android/`: Kotlin/Jetpack Compose Android app and its platform integration.
- `shared/src/`: OCaml application and core sources.
- `shared/test/`: OCaml test suites.
- `shared/native/`: Dune configuration and native bridges.
Expand All @@ -38,24 +38,27 @@ directly.

## Android

Android is built exclusively from the Flutter project:
Android is a standard Gradle project:

```sh
cd flutter
flutter pub get
flutter run
cd android
./gradlew :app:assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apk
```

Build a debug APK or Play Store app bundle with:
Release builds use `:app:assembleRelease` / `:app:bundleRelease`. The e2e
profile APK used by `scripts/test-android-e2e.sh` is `:app:assembleProfile`
(`app/build/outputs/apk/profile/app-profile.apk`). JVM unit tests run with
`./gradlew test`.

```sh
cd flutter
flutter build apk --debug
flutter build appbundle --release
```
The OCaml core shared library is built separately by
`scripts/build-android-native.sh` (per ABI), which installs
`liblogseq_chat_core.so` into `android/app/src/main/jniLibs/<abi>`; the Gradle
`buildAndroidNativeCore` task invokes it automatically (set
`-PlogseqChatRequireNativeCore=false` to compile Kotlin without it).

The Flutter Android host includes Capture and Journal app shortcuts, Capture
and Today’s Journal home-screen widgets, inbound sharing, deep links, native
The Android host includes Capture and Journal app shortcuts, Capture and
Today’s Journal home-screen widgets, inbound sharing, deep links, native
authentication, media services, and the OCaml core JNI library.

## iPhone shortcuts and widgets
Expand All @@ -82,7 +85,7 @@ the current environment. Use the supported gates instead:
```sh
swift build --package-path apple --disable-sandbox --triple arm64-apple-ios17.0-simulator \
--sdk "$(xcrun --sdk iphonesimulator --show-sdk-path)"
(cd flutter && flutter analyze && flutter test)
(cd android && ./gradlew test)
opam exec --switch=5.5.0 -- dune build @shared/test/runtest
opam exec --switch=5.5.0 -- dune build @shared/native/runtest
./scripts/test-android-e2e-runner.sh
Expand Down
Loading