Replace MLKit with Optimaize for FOSS flavor and add fallback#139
Replace MLKit with Optimaize for FOSS flavor and add fallback#139
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Add `google` and `foss` build flavors. - Use `optimaize-language-detector` for the `foss` flavor. - Use `google-mlkit-genai-prompt` for the `google` flavor, with a fallback to `Optimaize` if MLKit fails. - Refactor `LanguageDetector` dependency injection into flavor-specific modules. - Ensure `TranslateViewModel` works with the injected `LanguageDetector`. - Resolve duplicate class issues by excluding conflicting dependencies from `optimaize`. - Fix duplicate binding in `MainActivityTest`. Co-authored-by: menny <481272+menny@users.noreply.github.com>
Replace fully qualified package names with proper imports to follow project code style guidelines. - OptimaizeLanguageDetector: Use import alias to avoid name collision with the app's LanguageDetector interface - TranslateViewModel: Add imports for DetectionResult and LanguageDetector AI Agent: Claude
69cd796 to
a52ff8b
Compare
Replaced MLKit dependency with Optimaize Language Detector for a FOSS-compliant build flavor. The
googleflavor continues to use MLKit but now falls back to Optimaize if detection fails. This involved creating flavor-specific source sets, refactoring dependency injection, and handling dependency conflicts.fixes: #129
PR created automatically by Jules for task 15535654450169405782 started by @menny