chore(scanner): remove the OpenCV Gradle module, its Java sources and plugin - #1606
Merged
Merged
Conversation
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
force-pushed
the
chore/remove-opencv-gradle-module
branch
from
September 28, 2026 21:16
b2a56ef to
626a680
Compare
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.
The scanner never loads a Haar or LBP cascade, and nothing reads the valgrind suppressions. etc/ now holds only the licences.
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.
After #1604 nothing depends on
:vendor:opencv:sdk, butsettings.gradle.ktsstill 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 theorg.opencvsources.vendor/opencv/sdk/build.gradle: the module's build script.vendor/opencv/sdk/libcxx_helper/: a dummy CMake target that build script used to packagelibc++_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-pluginfrom the root buildscript classpath. No build script applies that plugin.The scanner's CMake still sets
OpenCV_DIRtovendor/opencv/sdk/native/jniand reads the headers and static libraries from there, sonative/stays.etc/licenses/stays too, because those licences still cover the statically linked code.After I deleted the scanner's
.cxxandbuild/,configureCMakeDebugandbuildCMakeDebugran fresh for all four ABIs and passed, and:apps:flipcash:app:assembleDebugpassed. The scanner's 20 on-device tests passed on a Seeker.