New maven build native linking does not work

I was very excited to try out the new maven build. The old method of importing a module is very cumbersome and makes updating painful, so I am grateful that this option exists now.

However, I cannot get CMake to find the library. I have brought down opencv in my gradle via (trying for both 4.9 and 4.10):

implementation 'org.opencv:opencv:4.10.0'

In my previously working CMake, I replaced

#set(OpenCVAndroidSDKLocation "~/dev/OpenCV-android-sdk-4-55")
#set(OpenCV_DIR "${OpenCVAndroidSDKLocation}/sdk/native/jni/")
#message(STATUS "Searching for openCV libs at: ${OpenCV_DIR}")
#find_package(OpenCV REQUIRED java)
#message(STATUS "opencv found: ${OpenCV_LIBS}")


find_package(OpenCV REQUIRED COMPONENTS OpenCV::opencv_java4) 

as per the tutorial. However it fails on that line with:

CMake Error at CMakeLists.txt:72 (find_package):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.