Skip to content

Drop unused camera-view dependency and fix gradle.properties trailing newline#28

Merged
MustafaNazeer merged 1 commit into
mainfrom
polish/build-cleanup-camera-view-newline
Jun 24, 2026
Merged

Drop unused camera-view dependency and fix gradle.properties trailing newline#28
MustafaNazeer merged 1 commit into
mainfrom
polish/build-cleanup-camera-view-newline

Conversation

@MustafaNazeer

Copy link
Copy Markdown
Owner

Summary

Two small build cleanups flagged by the Code Reviewer on PR #26 and PR #27, batched into one PR. No production behavior change.

  1. Remove androidx.camera:camera-view:1.4.2. CameraX is used only for headless frame analysis in the vision test (ImageAnalysis, ImageProxy, CameraSelector from camera-core; ProcessCameraProvider from camera-lifecycle). The app never instantiates a PreviewView or CameraController, so the camera-view UI artifact was pulled into the build for nothing. A source-wide search confirms zero androidx.camera.view, PreviewView, CameraController, or LifecycleCameraController references.
  2. Add the missing trailing newline to gradle.properties (cosmetic nit from the PR Target Android 15 (API 35) for Play upload #26 review).

Verification

  • :app:assembleDebug succeeds.
  • Full unit test suite green at 483 passing, 0 failures, 4 skipped, identical to the main baseline, confirming the dependency removal regressed nothing.

Permissions

No change. The manifest still declares CAMERA and RECORD_AUDIO only.

… newline

Remove the androidx.camera:camera-view:1.4.2 implementation dependency. The
app uses CameraX only for headless frame analysis (ImageAnalysis, ImageProxy,
CameraSelector from camera-core and ProcessCameraProvider from camera-lifecycle);
it never instantiates a PreviewView or CameraController, so the camera-view UI
layer was dead weight pulled into the build. Source has zero androidx.camera.view
references.

Also add the missing trailing newline to gradle.properties.

Debug build succeeds and the full unit test suite stays green at 483 passing,
0 failures, 4 skipped, identical to the pre-change baseline.
@MustafaNazeer

Copy link
Copy Markdown
Owner Author

Code Reviewer verdict: APPROVED

Independently verified against the source tree, not taken on the PR description's word.

camera-view removal is safe. Grep of app/src/ returns zero matches for androidx.camera.view, PreviewView, CameraController, LifecycleCameraController, and AndroidView, and no res/ reference to a camera preview. The only CameraX symbols actually used are ImageProxy, ImageAnalysis, CameraSelector (camera-core) and ProcessCameraProvider (camera-lifecycle), confirming the headless ImageAnalysis pattern in AndroidCameraSource.kt (bindToLifecycle with DEFAULT_FRONT_CAMERA and an analyzer, no PreviewView).

Required-to-stay dependencies confirmed present. camera-core, camera-camera2, and camera-lifecycle are all still declared. camera-camera2 correctly has no direct import (it is the runtime Camera2 backend loaded reflectively) and was not removed; dropping it would break the camera at runtime with no compile-time signal.

Build and tests. :app:assembleDebug BUILD SUCCESSFUL; full unit suite 483 passing, 0 failures, 0 errors, 4 skipped, identical to the main baseline. A removed-but-unused library cannot affect tests, and the green compile confirms nothing referenced the dropped artifact.

No inherited-rule concerns (config-only diff, no prose added). No new dependency, so no Security sign-off triggered. Ready to merge.

@MustafaNazeer MustafaNazeer merged commit ec822bf into main Jun 24, 2026
1 check passed
@MustafaNazeer MustafaNazeer deleted the polish/build-cleanup-camera-view-newline branch June 24, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant