Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(bindings/java): Added an example of adding dependencies using Gradle #3158

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions bindings/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

This project is built upon the native OpenDAL lib. And it is released for multiple platforms that you can use a classifier to specify the platform you are building the application on.

### Maven

Generally, you can first add the `os-maven-plugin` for automatically detect the classifier based on your platform:

```xml
Expand Down Expand Up @@ -39,6 +41,29 @@ Then add the dependency to `opendal-java` as following:
</dependency>
```

### Gradle

For Gradle you can first add the `com.google.osdetector` for automatically detect the classifier based on your platform:

```groovy
plugins {
...
id "com.google.osdetector" version "1.7.3"
}

```

Then add the dependency to `opendal-java` as following:

```groovy
dependencies {
...
// OpenDAL
implementation "org.apache.opendal:opendal-java:0.40.0"
implementation "org.apache.opendal:opendal-java:0.40.0:$osdetector.classifier"
}
```

tisonkun marked this conversation as resolved.
Show resolved Hide resolved
Note that the dependency without classifier ships all classes and resources except the "opendal_java" shared library. And those with classifier bundle only the shared library.

For downstream usage, it's recommended:
Expand Down