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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this change or should project.group be set to com.microsoft.onnxruntime.extensions? Not sure what is preferred.
Does build-android.gradle need updating? It doesn't seem to set Automatic-Module-Name. That Android package is used in example apps without any issues AFAIK.
https://github.com/microsoft/onnxruntime-inference-examples/blob/1c2199208a9084ec0e4ceb188cb5192608d75938/mobile/examples/super_resolution/android/app/build.gradle#L49
https://github.com/microsoft/onnxruntime-inference-examples/blob/1c2199208a9084ec0e4ceb188cb5192608d75938/mobile/examples/super_resolution/android/app/src/main/java/ai/onnxruntime/example/superresolution/MainActivity.kt#L4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project.group
sets the group name for Maven Central, and that can becom.microsoft.onnxruntime
. Maven has both a group and artifact name, so it's fine for it to be groupcom.microsoft.onnxruntime
and artifactonnxruntime-extensions
. The namespacing will keep things together on Maven - https://central.sonatype.com/namespace/com.microsoft.onnxruntime. Maven Central's name doesn't matter for the Java platform module check.I don't believe Android cares about Java modules, but anyway ORT-extensions targets a version of Android which only supports Java 8 and modules came in Java 9. Adding the automatic module name wouldn't cause problems if added to the
build-android.gradle
as it'll ignore things in the manifest it doesn't care about, but it probably wouldn't do anything either.The problem in Java occurs if the user has modularized their application and then tries to run it with both the ORT and ORT-extensions jars as dependencies. As ORT-extensions (for non-Android Java) isn't on Maven Central yet there aren't too many people doing that, but it'll likely cause problems when it gets there. For example the stable diffusion example I wrote (https://github.com/oracle/sd4j) won't compile properly when migrated to use ORT-extensions from Maven Central without this change.