Project restructuring for Sample app#20
Conversation
luhmirin-s
commented
Jun 16, 2026
- Moved "SimFace" into a library sub-module
- Imported the sample app from SimFaceTester repository
- Run several rounds of code prettify on the sample app to make it as simple and clean as possible (might have overdone it a bit)
There was a problem hiding this comment.
Pull request overview
This PR restructures the project into separate Gradle modules (:simq, :simface) and adds a new Compose-based :sample app, while also updating build tooling and CI/publish workflows to target the new module layout.
Changes:
- Split SimFace into its own Android library module (
:simface) and adjusted Gradle/CI to build & publish it. - Added a new
:sampleCompose + CameraX demo app showcasing face detection, embedding, and matching flows. - Introduced/ported core SimFace runtime + Android instrumentation tests (embedding, matching, detection, alignment).
Reviewed changes
Copilot reviewed 45 out of 93 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| simq/proguard-rules.pro | Removes module-specific ProGuard rules file. |
| simq/consumer-rules.pro | Consumer rules placeholder for :simq. |
| simq/build.gradle.kts | Updates :simq Android library build configuration. |
| simface/src/main/java/com/simprints/biometrics/simface/Utils.kt | Adds utility conversions and bitmap preprocessing helpers. |
| simface/src/main/java/com/simprints/biometrics/simface/SimFaceConfig.kt | Introduces SimFace configuration object (model/quality overrides). |
| simface/src/main/java/com/simprints/biometrics/simface/SimFace.kt | Adds main SimFace API (init/detect/embed/match). |
| simface/src/main/java/com/simprints/biometrics/simface/matcher/MatchProcessor.kt | Defines internal matcher interface. |
| simface/src/main/java/com/simprints/biometrics/simface/matcher/CosineDistanceMatchProcessor.kt | Implements cosine-based scoring for verification/identification. |
| simface/src/main/java/com/simprints/biometrics/simface/embedding/TensorFlowEmbeddingProcessor.kt | Runs TFLite embedding inference pipeline. |
| simface/src/main/java/com/simprints/biometrics/simface/embedding/ReshapeOp.kt | Adds tensor reshape operator used in preprocessing. |
| simface/src/main/java/com/simprints/biometrics/simface/embedding/MLModelManager.kt | Loads TFLite model (default asset or custom file) and provides interpreter. |
| simface/src/main/java/com/simprints/biometrics/simface/embedding/EmbeddingProcessor.kt | Defines internal embedding interface. |
| simface/src/main/java/com/simprints/biometrics/simface/detection/MlKitFaceDetectionProcessor.kt | Implements MLKit-based face detection + SimQ quality scoring. |
| simface/src/main/java/com/simprints/biometrics/simface/detection/FaceDetectionProcessor.kt | Defines internal face detection interface. |
| simface/src/main/java/com/simprints/biometrics/simface/detection/FaceAlignment.kt | Adds face crop + affine warp alignment utilities. |
| simface/src/main/java/com/simprints/biometrics/simface/data/Point2D.kt | Adds point model for landmark coordinates. |
| simface/src/main/java/com/simprints/biometrics/simface/data/FacialLandmarks.kt | Adds landmark bundle model used for alignment. |
| simface/src/main/java/com/simprints/biometrics/simface/data/FaceDetection.kt | Adds detection result model + helpers to crop/align faces. |
| simface/src/main/java/com/simprints/biometrics/simface/Constants.kt | Adds shared library constants (sizes/template version). |
| simface/src/main/AndroidManifest.xml | Adds library manifest stub. |
| simface/src/androidTest/res/drawable/royalty_free_good_face_warp_aligned.png | Adds test resource image for alignment/instrumentation tests. |
| simface/src/androidTest/java/com/simprints/biometrics/TestContextExt.kt | Adds test-only helpers for loading bitmaps/model files. |
| simface/src/androidTest/java/com/simprints/biometrics/simface/matcher/VerificationTest.kt | Adds instrumentation tests for verification scoring behavior. |
| simface/src/androidTest/java/com/simprints/biometrics/simface/matcher/IdentificationTest.kt | Adds instrumentation tests for identification score ordering. |
| simface/src/androidTest/java/com/simprints/biometrics/simface/embedding/ExpectedEmbedding.kt | Adds fixed expected embedding output fixture. |
| simface/src/androidTest/java/com/simprints/biometrics/simface/embedding/EmbeddingProcessorTest.kt | Adds embedding inference tests against expected fixture. |
| simface/src/androidTest/java/com/simprints/biometrics/simface/embedding/CustomModelTest.kt | Adds test for custom model loading path. |
| simface/src/androidTest/java/com/simprints/biometrics/simface/detection/FaceDetectionProcessorTest.kt | Adds MLKit detection + SimQ quality tests. |
| simface/src/androidTest/java/com/simprints/biometrics/simface/detection/FaceAlignTest.kt | Adds crop/warp alignment tests. |
| simface/README.md | Adds SimFace usage and integration documentation. |
| simface/build.gradle.kts | Introduces :simface module Gradle config and publishing setup. |
| simface/.gitignore | Ignores module build outputs. |
| settings.gradle.kts | Updates included modules and adds foojay toolchain resolver plugin. |
| sample/src/main/res/xml/file_paths.xml | Adds FileProvider cache paths. |
| sample/src/main/res/values/themes.xml | Adds sample app theme resources. |
| sample/src/main/res/values/strings.xml | Adds sample app name string. |
| sample/src/main/res/values/colors.xml | Adds sample color resources. |
| sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | Adds launcher icon definition. |
| sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml | Adds round launcher icon definition. |
| sample/src/main/res/drawable/ic_launcher_foreground.xml | Adds launcher foreground vector. |
| sample/src/main/res/drawable/ic_launcher_background.xml | Adds launcher background vector. |
| sample/src/main/java/com/simprints/sample/wrappers/SimFaceWrapper.kt | Adds wrapper around SimFace for app usage. |
| sample/src/main/java/com/simprints/sample/wrappers/SampleImageLoader.kt | Adds resource bitmap loader for sample flows. |
| sample/src/main/java/com/simprints/sample/ui/theme/Type.kt | Adds sample typography configuration. |
| sample/src/main/java/com/simprints/sample/ui/theme/Theme.kt | Adds sample Material3 theme wrapper. |
| sample/src/main/java/com/simprints/sample/ui/theme/Color.kt | Adds sample color scheme constants. |
| sample/src/main/java/com/simprints/sample/ui/screens/root/SimFaceDemoScreen.kt | Adds root screen with bottom tab navigation. |
| sample/src/main/java/com/simprints/sample/ui/screens/root/MainActivity.kt | Adds Compose entry activity for the sample app. |
| sample/src/main/java/com/simprints/sample/ui/screens/root/DemoTab.kt | Adds demo tab enum for navigation state. |
| sample/src/main/java/com/simprints/sample/ui/screens/image/SimFaceTestImageViewModel.kt | Adds test-image demo logic (process + compare). |
| sample/src/main/java/com/simprints/sample/ui/screens/image/SimFaceTestImageUiState.kt | Adds UI state model for test-image demo. |
| sample/src/main/java/com/simprints/sample/ui/screens/image/SimFaceTestImageDemoScreen.kt | Adds Compose UI for the test-image demo. |
| sample/src/main/java/com/simprints/sample/ui/screens/camera/SimFaceCameraViewModel.kt | Adds camera demo logic (capture + compare). |
| sample/src/main/java/com/simprints/sample/ui/screens/camera/SimFaceCameraUiState.kt | Adds UI state model for camera demo. |
| sample/src/main/java/com/simprints/sample/ui/screens/camera/SimFaceCameraDemoScreen.kt | Adds Compose UI for camera capture/compare demo. |
| sample/src/main/java/com/simprints/sample/ui/screens/camera/CameraTarget.kt | Adds enum for which capture slot is active. |
| sample/src/main/java/com/simprints/sample/ui/screens/camera/CameraPreviewScreen.kt | Adds CameraX preview + analysis + capture + overlay UI. |
| sample/src/main/java/com/simprints/sample/ui/models/FaceResult.kt | Adds model for face processing results and embeddings. |
| sample/src/main/java/com/simprints/sample/ui/composables/TestImagesSection.kt | Adds Compose UI controls for test images demo. |
| sample/src/main/java/com/simprints/sample/ui/composables/DisplayFaceResult.kt | Adds Compose card to display result bitmap + text. |
| sample/src/main/java/com/simprints/sample/ui/composables/ComparisonResultCard.kt | Adds Compose card for comparison output. |
| sample/src/main/java/com/simprints/sample/ui/composables/CameraCaptureSection.kt | Adds Compose controls for camera capture/compare flow. |
| sample/src/main/java/com/simprints/sample/di/ViewModelFactory.kt | Adds simple ViewModel factories wiring wrappers/resources. |
| sample/src/main/AndroidManifest.xml | Adds sample app manifest (camera permission + FileProvider). |
| sample/build.gradle.kts | Adds sample app Gradle config + dependencies. |
| README.md | Updates root README to point to module docs and new structure. |
| gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper distribution. |
| gradle/libs.versions.toml | Updates dependency catalog (AGP/Kotlin/Compose/CameraX/etc.). |
| gradle.properties | Adds Android/Gradle flags for new build setup. |
| build.gradle.kts | Converts root build script to plugin-management-only declarations. |
| .github/workflows/publish.yml | Updates publishing workflow to build/publish only :simface. |
| .github/workflows/ci.yml | Updates CI workflow to build only :simface. |
| .editorconfig | Updates ktlint/IDE formatting rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
martin-simprints
left a comment
There was a problem hiding this comment.
Looks good to me and the demo app works well on my phone. Only things worth double-checking are the Gradle issues from the Copilot review and whether the publishing pipeline works smoothly.
| Import the dependencies in `build.gradle.kts`: | ||
|
|
||
| ```kotlin | ||
| implementation("com.simprints.biometrics:simface:2026.1.0") |
There was a problem hiding this comment.
Does this import both simface and simq?
There was a problem hiding this comment.
SimQ is added transitively, so this will add both.