Skip to content

[Synced Transcripts] Add fingerprint gradle module#5322

Open
sztomek wants to merge 3 commits into
feat/synced-trans-model-parser-timingfrom
feat/synced-trans-fingerprint-module
Open

[Synced Transcripts] Add fingerprint gradle module#5322
sztomek wants to merge 3 commits into
feat/synced-trans-model-parser-timingfrom
feat/synced-trans-fingerprint-module

Conversation

@sztomek
Copy link
Copy Markdown
Contributor

@sztomek sztomek commented May 21, 2026

Description

This PR is part of the Radical Speed Month initiative.
Adds the :modules:services:fingerprint Gradle module containing auto-generated UniFFI Kotlin bindings and pre-compiled native libraries for audio fingerprinting. The Rust-based fingerprint library (link) is compiled for 4 architectures (arm64-v8a, armeabi-v7a, x86, x86_64) and exposed via UniFFI-generated Kotlin wrappers that use JNA for FFI calls.
The Kotlin bindings file is auto-generated and excluded from spotless/ktlint via targetExclude("**/uniffi/**/*.kt").
Note: the .so files add ~7MB across all architectures, which is not ideal. I'm planning to use Automattic's internal library distribution system on S3 to replace the current system of distribution, so in the future we could just simply add it as a gradle depdency.

Testing Instructions

Just review the code please.

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

@sztomek sztomek added this to the 8.13 milestone May 21, 2026
@sztomek sztomek requested a review from a team as a code owner May 21, 2026 13:36
@sztomek sztomek requested review from Copilot and geekygecko and removed request for a team May 21, 2026 13:36
@dangermattic
Copy link
Copy Markdown
Collaborator

dangermattic commented May 21, 2026

32 Warnings
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
⚠️ Class RustBuffer is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class ByValue is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class RustBufferByReference is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class ForeignBytes is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiRustCallStatus is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class InternalException is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiHandleMap is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFuture is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiByValue is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructU8 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructI8 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructU16 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructI16 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructU32 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructI32 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructU64 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructI64 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructF32 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructF64 is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructPointer is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructRustBuffer is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UniffiForeignFutureStructVoid is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class CheckpointMatcher is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class Fingerprinter is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class StreamingFingerprinter is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class StreamingWindowedFingerprinter is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class DecodeException is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class UnsupportedFormat is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class InvalidInput is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ Class IoException is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ This PR is assigned to the milestone 8.13. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new :modules:services:fingerprint Android library module intended to host UniFFI-generated Kotlin bindings plus prebuilt native .so binaries for audio fingerprinting, wiring it into the Gradle project and adding a JNA dependency.

Changes:

  • Register new :modules:services:fingerprint module in settings.gradle.kts.
  • Add a new Android library module with a JNA API dependency and bundled JNI libs.
  • Add a global Spotless exclude for **/uniffi/**/*.kt and introduce net.java.dev.jna:jna in the version catalog.

Reviewed changes

Copilot reviewed 3 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
settings.gradle.kts Includes the new fingerprint services module.
modules/services/fingerprint/build.gradle.kts Defines the new Android library module configuration and dependencies.
modules/services/fingerprint/src/main/java/uniffi/fingerprint_uniffi/fingerprint_uniffi.kt Adds the generated UniFFI Kotlin bindings and FFI scaffolding.
gradle/libs.versions.toml Adds the JNA dependency to the version catalog.
build.gradle.kts Excludes UniFFI-generated Kotlin sources from Spotless/ktlint.

Comment thread settings.gradle.kts Outdated
Comment thread modules/services/fingerprint/build.gradle.kts
@sztomek sztomek force-pushed the feat/synced-trans-model-parser-timing branch from cd17406 to 95bd8f9 Compare May 25, 2026 14:00
@sztomek sztomek force-pushed the feat/synced-trans-fingerprint-module branch from 76c3c89 to a34f814 Compare May 25, 2026 14:00
Copilot AI review requested due to automatic review settings May 25, 2026 15:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 9 changed files in this pull request and generated 6 comments.

Comment thread modules/services/fingerprint/build.gradle.kts
Copilot AI review requested due to automatic review settings May 25, 2026 15:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 9 changed files in this pull request and generated 2 comments.

@sztomek sztomek force-pushed the feat/synced-trans-model-parser-timing branch from 95bd8f9 to 63540a0 Compare May 26, 2026 17:57
@sztomek sztomek force-pushed the feat/synced-trans-fingerprint-module branch from 318df65 to 420ac0d Compare May 26, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants