Skip to content

chore(scanner): remove the OpenCV Gradle module, its Java sources and plugin - #1606

Merged
bmc08gt merged 3 commits into
code/cashfrom
chore/remove-opencv-gradle-module
Sep 28, 2026
Merged

bmc08gt merged 3 commits into
code/cashfrom
chore/remove-opencv-gradle-module

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

After #1604 nothing depends on :vendor:opencv:sdk, but settings.gradle.kts still includes it, so every build configures the module and compiles its Java sources. This removes the include and the files only that module read:

  • vendor/opencv/sdk/java/: 427 files, 16 MB, mostly generated javadoc plus the org.opencv sources.
  • vendor/opencv/sdk/build.gradle: the module's build script.
  • vendor/opencv/sdk/libcxx_helper/: a dummy CMake target that build script used to package libc++_shared.so.
  • vendor/opencv/sdk/etc/: the 22 Haar and LBP cascades (9.6 MB) and two valgrind suppression files. The scanner loads no cascade.

It also drops com.ahasbini.tools:android-opencv-gradle-plugin from the root buildscript classpath. No build script applies that plugin.

The scanner's CMake still sets OpenCV_DIR to vendor/opencv/sdk/native/jni and reads the headers and static libraries from there, so native/ stays. etc/licenses/ stays too, because those licences still cover the statically linked code.

After I deleted the scanner's .cxx and build/, configureCMakeDebug and buildCMakeDebug ran fresh for all four ABIs and passed, and :apps:flipcash:app:assembleDebug passed. The scanner's 20 on-device tests passed on a Seeker.

@bmc08gt bmc08gt self-assigned this Sep 28, 2026
@github-actions github-actions Bot added type: chore Maintenance, config, CI/CD area: build-system Gradle, convention plugins, build-logic labels Sep 28, 2026
Nothing depends on :vendor:opencv:sdk once the scanner stops packaging
libopencv_java4.so, and no build script applies the OpenCV Gradle
plugin. CMake reads OpenCV from vendor/opencv/sdk/native on disk, so
those files stay.
@bmc08gt
bmc08gt force-pushed the chore/remove-opencv-gradle-module branch from b2a56ef to 626a680 Compare September 28, 2026 21:16
@bmc08gt
bmc08gt changed the base branch from fix/drop-unused-opencv-so to code/cash September 28, 2026 21:16
With the module no longer included, java/, build.gradle and
libcxx_helper/ were only read by that module's own build. CMake uses
native/, and etc/ keeps the OpenCV and third-party licences that still
apply to the statically linked code.
@bmc08gt bmc08gt changed the title chore(scanner): remove the OpenCV Gradle module and plugin chore(scanner): remove the OpenCV Gradle module, its Java sources and plugin Sep 28, 2026
The scanner never loads a Haar or LBP cascade, and nothing reads the
valgrind suppressions. etc/ now holds only the licences.
@bmc08gt
bmc08gt merged commit abd6088 into code/cash Sep 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic type: chore Maintenance, config, CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant