I have an OpenCV Java class processImage
that I would like to share between an Android program and a Java program. If possible, it'd be great to keep all of the code in the same projects, and have modules for the Android app, Java App, and the shared code. The Java and Android APIs are the same, just the JARs that the systems use are different.
Since the Android and Java OpenCV programs have different JVMs and OpenCV JARs that they need to use, I know that I can't just share the compiled library between the two. But I also need a way to share the Java interface.
Are there any Gradle or Android Studio tricks that could help me achieve this?