Remove call blur feature for generic flavor#6377
Open
mahibi wants to merge 3 commits into
Open
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
com.google.mediapipe:tasks-vision pulls in com.google.android.datatransport. This transitively brings firebase-encoders. That is rejected by F-Droid. See the failiing build https://gitlab.com/fdroid/fdroiddata/-/jobs/14758239564 Search for the dependency to see which pulls it in: ./gradlew :app:dependencyInsight --configuration genericDebugRuntimeClasspath --dependency com.google.firebase:firebase-encoders Configuration on demand is an incubating feature. Calculating task graph as no cached configuration is available for tasks: :app:dependencyInsight --configuration genericDebugRuntimeClasspath --dependency com.google.firebase:firebase-encoders > Configure project :app WARNING: The option setting 'android.newDsl=false' is deprecated. The current default is 'true'. It will be removed in version 10.0 of the Android Gradle plugin. WARNING: The option setting 'android.enableJetifier=true' is deprecated. The current default is 'false'. It will be removed in version 10.0 of the Android Gradle plugin. > Task :app:dependencyInsight com.google.firebase:firebase-encoders:17.0.0 Variant runtime: | Attribute Name | Provided | Requested | |--------------------------------------------------------|--------------|--------------| | org.gradle.libraryelements | jar | | | org.gradle.status | release | | | org.gradle.category | library | library | | org.gradle.usage | java-runtime | java-runtime | | com.android.build.api.attributes.AgpVersionAttr | | 9.2.1 | | com.android.build.api.attributes.BuildTypeAttr | | debug | | com.android.build.api.attributes.ProductFlavor:default | | generic | | org.gradle.jvm.environment | | android | | org.jetbrains.kotlin.platform.type | | androidJvm | com.google.firebase:firebase-encoders:17.0.0 +--- com.google.android.datatransport:transport-backend-cct:3.1.0 | \--- com.google.mediapipe:tasks-core:0.10.26 | \--- com.google.mediapipe:tasks-vision:0.10.26 | \--- genericDebugRuntimeClasspath +--- com.google.android.datatransport:transport-runtime:3.1.0 | +--- com.google.mediapipe:tasks-core:0.10.26 (*) | \--- com.google.android.datatransport:transport-backend-cct:3.1.0 (*) +--- com.google.firebase:firebase-encoders-json:18.0.0 | \--- com.google.android.datatransport:transport-backend-cct:3.1.0 (*) \--- com.google.firebase:firebase-encoders-proto:16.0.0 \--- com.google.android.datatransport:transport-runtime:3.1.0 (*) com.google.firebase:firebase-encoders-json:18.0.0 Variant runtime: | Attribute Name | Provided | Requested | |--------------------------------------------------------|--------------|--------------| | org.gradle.libraryelements | jar | | | org.gradle.status | release | | | org.gradle.category | library | library | | org.gradle.usage | java-runtime | java-runtime | | com.android.build.api.attributes.AgpVersionAttr | | 9.2.1 | | com.android.build.api.attributes.BuildTypeAttr | | debug | | com.android.build.api.attributes.ProductFlavor:default | | generic | | org.gradle.jvm.environment | | android | | org.jetbrains.kotlin.platform.type | | androidJvm | com.google.firebase:firebase-encoders-json:18.0.0 \--- com.google.android.datatransport:transport-backend-cct:3.1.0 \--- com.google.mediapipe:tasks-core:0.10.26 \--- com.google.mediapipe:tasks-vision:0.10.26 \--- genericDebugRuntimeClasspath com.google.firebase:firebase-encoders-proto:16.0.0 Variant runtime: | Attribute Name | Provided | Requested | |--------------------------------------------------------|--------------|--------------| | org.gradle.libraryelements | jar | | | org.gradle.status | release | | | org.gradle.category | library | library | | org.gradle.usage | java-runtime | java-runtime | | com.android.build.api.attributes.AgpVersionAttr | | 9.2.1 | | com.android.build.api.attributes.BuildTypeAttr | | debug | | com.android.build.api.attributes.ProductFlavor:default | | generic | | org.gradle.jvm.environment | | android | | org.jetbrains.kotlin.platform.type | | androidJvm | com.google.firebase:firebase-encoders-proto:16.0.0 \--- com.google.android.datatransport:transport-runtime:3.1.0 +--- com.google.mediapipe:tasks-core:0.10.26 | \--- com.google.mediapipe:tasks-vision:0.10.26 | \--- genericDebugRuntimeClasspath \--- com.google.android.datatransport:transport-backend-cct:3.1.0 \--- com.google.mediapipe:tasks-core:0.10.26 (*) (*) - Indicates repeated occurrences of a transitive dependency subtree. Gradle expands transitive dependency subtrees only once per project; repeat occurrences only display the root of the subtree, followed by this annotation. ---- The fix is to exclude com.google.android.datatransport Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…K scan
com.google.mediapipe:tasks-vision (used for background blur) transitively
pulls in com.google.firebase:firebase-encoders* via
com.google.android.datatransport, which F-Droid's APK scanner rejects.
Excluding datatransport entirely breaks MediaPipe initialization; excluding
only firebase-encoders causes a fatal crash in CctTransportBackend.<init>
because it instantiates JsonDataEncoderBuilder directly in its constructor.
The only viable fix is to keep MediaPipe out of the generic (F-Droid) build:
- Move tasks-vision to gplayImplementation
- Split ImageSegmenterHelper into a gplay source set (real) and a generic
source set (no-op stub with the same API surface)
- Add BuildConfig.BACKGROUND_BLUR_ENABLED (false for generic, true otherwise)
to hide the blur button and skip the video processor observer
AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
87f1123 to
d8b14f5
Compare
LoganSquare's kapt annotation processor generates List<long> for LongArray fields, which is invalid Java — generics require the boxed type. This caused a compile failure in compileGenericDebugJavaWithJavac. List<Long> serializes identically over JSON and works correctly with LoganSquare's code generator. Why it's necessary: LoganSquare is a Java annotation processor. When it sees LongArray (a Kotlin type that maps to long[] in Java), it tries to generate list serialization code using the primitive long as the generic type parameter — producing List<long>, which Java's type system rejects. List<Long> (boxed) is the correct form for generics. The JSON wire format is unchanged; it's purely a codegen quirk. AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6) Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #6376
Checked the generic build with the fdroid scanner. It's fine now.
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)