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.
This commit is contained in:
Sam Carlberg 2025-07-25 00:28:29 -04:00
parent ec9b8de3fa
commit 84ca221184
No known key found for this signature in database
GPG Key ID: B2C92C4A6DD885CD
2 changed files with 2 additions and 0 deletions

View File

@ -3,3 +3,4 @@ Specification-Version: @OPENCV_VERSION@
Implementation-Title: OpenCV
Implementation-Version: @OPENCV_VCSVERSION@
Implementation-Date: @OPENCV_TIMESTAMP@
Automatic-Module-Name: org.opencv

View File

@ -24,6 +24,7 @@
<attribute name="Implementation-Title" value="OpenCV"/>
<attribute name="Implementation-Version" value="@OPENCV_VCSVERSION@"/>
<attribute name="Implementation-Date" value="${timestamp}"/>
<attribute name="Automatic-Module-Name" value="org.opencv"/>
</manifest>
</jar>
</target>