Publish JNI bindings to Maven Central
- Dominant language
- Rust
- Stars
- 929
- Forks
- 143
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 53
Description
Chatmail core currently has official Python and Node.js bindings published to PyPI and NPM. [Maven Cental](https://maven.apache.org/repository/index.html) is the de facto primary repository for Java since [JCenter has been shutdown](https://github.com/deltachat/deltachat-android/issues/2595).
JNI bindings exist, but are only used by Delta Chat for Android at https://github.com/deltachat/deltachat-android/tree/5117b70c589fc11b5239680dabaa4f07668072db/jni
There are users trying to JNI bindings in another chatmail client and they currently do this by copying the bindings from Delta Chat for Android repository: https://support.delta.chat/t/developing-with-chatmail-core-on-android-no-events-coming-in/4185
I think we should create a separate repository with chatmail core as a Git submodule so we can directly copy existing structure from deltachat-android repo with minimal modifications. Creating the issue here in chatmail core tracker only because there is no dedicated tracker yet.
As for licensing, chatmail core and all its bindings are MPLv2-licensed and JNI bindings don't have any GPL code that comes from Signal, so we can copy-paste MPLv2 from the core repo. Since https://github.com/deltachat/deltachat-android/pull/3925 is merged JNI bindings also contain code generated with https://github.com/chatmail/dcrpcgen, this also needs to be changed to MPLv2 as it contains templates from which bindings are generated.
There are two exceptions:
- `src/main/java/com/b44t/messenger/util/concurrent/ListenableFuture.java`
- `src/main/java/com/b44t/messenger/util/concurrent/SettableFuture.java`
These two files originate from the Signal messenger, this can be seen in the original commit in Delta Chat Android repo. They are trivial, but ideally we should be able to get rid of them, also because they are nearly trivial.
I have started something at https://github.com/chatmail/jni/ by copying the code from the current `main` branch at https://github.com/deltachat/deltachat-android/commit/dfef2b41207716912c0ec874961b035b398361c4
Documentation for publishing:
- https://docs.gradle.org/current/userguide/publishing_setup.html
- https://maven.apache.org/repository/guide-central-repository-upload.html
Contributor guide
Assessment
This issue has not been assessed yet.