From 84ca221184bf88665782d4bb277cb665aa254746 Mon Sep 17 00:00:00 2001 From: Sam Carlberg Date: Fri, 25 Jul 2025 00:28:29 -0400 Subject: [PATCH] Set Automatic-Module-Name manifest attribute This is a useful property for modularized libraries and applications to be able to use OpenCV A full module-info.java file for true compatibility with the Java module system would require compiling with Java 9+ and either use a multi-release JAR (which can be tricky to maintain) or compile the entire library with Java 9+ (which would break Android consumers on older SDK versions). In the interest of causing the least disruption, only an automatic module name is set so that modular Java 9+ consumers can use OpenCV but not break anybody else. --- modules/java/jar/MANIFEST.MF.in | 1 + modules/java/jar/build.xml.in | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/java/jar/MANIFEST.MF.in b/modules/java/jar/MANIFEST.MF.in index 07d2fda79b..b26719ce22 100644 --- a/modules/java/jar/MANIFEST.MF.in +++ b/modules/java/jar/MANIFEST.MF.in @@ -3,3 +3,4 @@ Specification-Version: @OPENCV_VERSION@ Implementation-Title: OpenCV Implementation-Version: @OPENCV_VCSVERSION@ Implementation-Date: @OPENCV_TIMESTAMP@ +Automatic-Module-Name: org.opencv diff --git a/modules/java/jar/build.xml.in b/modules/java/jar/build.xml.in index 41ef1d55ba..58bd27727b 100644 --- a/modules/java/jar/build.xml.in +++ b/modules/java/jar/build.xml.in @@ -24,6 +24,7 @@ +