ankidroid / ankidroid/Anki-Android-Backend

Convert `rsdroid[-testing]` to a `java-library`

Đang mở
#674 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Kotlin
Star
91
Fork
54
Merge trung bình
1 ngày 36 phút
Pull request đã merge (30 ngày)
12

Mô tả

* Speeds up tests
* This is more useful now we're considering re-architecting the module structure of the app. If we can remove 'Robolectric' from a test suite for a module, we get huge savings. There are many tests which only use Robolectric due to the `rsdroid`/`libanki`, but we can't feasibly
* Fixes local builds: `Direct local .aar file dependencies are not supported when building an AAR.`
* https://github.com/ankidroid/Anki-Android-Backend/issues/671
* This does not impact `androidTest`
* I was asked in the past about this for a university project. It seemed feasible at the time, but I didn't have capacity.

**Initial thoughts**

1. What are the blockers? (database; Looper etc...)
* I do not believe these will cause significant problems.
2. How will packaging the `.so` files work?
* We currently have two artifacts: `rsdroid` with `.so` files for each of the 4 mainstream Android targets.
* `rsdroid-testing` with `rsdroid.dll`, `librsdroid.dylib` and `librsdroid.so` for Robolectric
* Loaded via `RustBackendLoader`
3. Document `build/generated/anki_artifacts`
* Used via `AssetManager` - mmap onto the apk

**Constraints**

* Bloating the apk size (fat JAR) is unacceptable
* Local `aar` -> `aar` references are unacceptable
* `apk` -> local `aar`
* `anki_artifacts` are heavily latency sensitive: Pages and web content used by the study screen

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.