Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.12.1

- name: Gradle Test
run: gradle jvmTest --info
run: ./gradlew jvmTest --info

markdown_lint:
runs-on: ubuntu-latest
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/publish-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.12.1

- name: Gradle Wrapper
run: |
gradle wrapper

- name: Set pub mode env var
# Note: This step is intended to allow publishing snapshot packages.
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/publish-dokka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,9 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.12.1

- name: Gradle Wrapper
run: |
gradle wrapper

- name: Build doc
run: gradle dokkaGenerate
run: ./gradlew dokkaGenerate

- name: Deploy doc
if: ${{ inputs.live-run || false }}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/publish-jvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,6 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.12.1

- name: Gradle Wrapper
run: |
gradle wrapper

- name: Set pub mode env var
# Note: This step is intended to allow publishing snapshot packages.
Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,23 @@ Basically:

- Rust ([Installation guide](https://doc.rust-lang.org/cargo/getting-started/installation.html))
- Kotlin ([Installation guide](https://kotlinlang.org/docs/getting-started.html#backend))
- Gradle ([Installation guide](https://gradle.org/install/))

and in case of targeting Android you'll also need:

- Android SDK ([Installation guide](https://developer.android.com/about/versions/11/setup-sdk))

## Gradle wrapper

This repository ships a [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) (`./gradlew` / `gradlew.bat`), so no system-wide Gradle installation is required. The wrapper pins the build to **Gradle 8.12.1** and verifies the distribution checksum before use, ensuring a reproducible and tamper-evident build environment.

Use `./gradlew` on Unix/macOS/Linux (or `gradlew.bat` on Windows) in place of `gradle` for all commands listed below.

## <img src="jvm.png" alt="JVM" height="50"> JVM

To publish a library for a JVM project into Maven local, run

```bash
gradle publishJvmPublicationToMavenLocal
./gradlew publishJvmPublicationToMavenLocal
```

This will first, trigger the compilation of Zenoh-JNI in release, and second publish the library into maven local, containing the native library
Expand Down Expand Up @@ -180,7 +185,7 @@ to install them.
So, in order to publish the library onto Maven Local, run:

```bash
gradle -Pandroid=true publishAndroidReleasePublicationToMavenLocal
./gradlew -Pandroid=true publishAndroidReleasePublicationToMavenLocal
```

This will first trigger the compilation of the Zenoh-JNI for the previously mentioned targets, and secondly will
Expand Down Expand Up @@ -215,15 +220,15 @@ Because it's a Kotlin project, we use [Dokka](https://kotlinlang.org/docs/dokka-
In order to build it, run:

```bash
gradle dokkaGenerate
./gradlew dokkaGenerate
```

## Running the tests

To run the tests, run:

```bash
gradle jvmTest
./gradlew jvmTest
```

This will compile the native library on debug mode (if not already available) and run the tests afterward against the JVM target.
Expand All @@ -235,7 +240,7 @@ Rust logs are propagated when setting the `RUST_LOG` environment variable.
For instance running the ZPub test as follows:

```bash
RUST_LOG=debug gradle ZPub
RUST_LOG=debug ./gradlew ZPub
```

causes the logs to appear in standard output.
Expand Down
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
8 changes: 8 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
251 changes: 251 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading