From 61cd3f558dbf82b00fb39431b60ea65e5bf6366c Mon Sep 17 00:00:00 2001 From: oluiscabral Date: Mon, 16 Dec 2024 08:44:53 -0300 Subject: [PATCH] Update Android NDK and `java/README.md` instructions --- .github/workflows/build.yml | 6 +++--- .github/workflows/release.yml | 2 +- java/README.md | 19 +++++-------------- java/lib/build.gradle | 2 +- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2adc614..d7d5311f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,7 @@ jobs: uses: nttld/setup-ndk@v1 with: link-to-sdk: true - ndk-version: r28-beta1 + ndk-version: r28-beta2 - name: Java tests run: gradle test @@ -113,7 +113,7 @@ jobs: uses: nttld/setup-ndk@v1 with: link-to-sdk: true - ndk-version: r28-beta1 + ndk-version: r28-beta2 - name: Java tests run: gradle test @@ -159,7 +159,7 @@ jobs: uses: nttld/setup-ndk@v1 with: link-to-sdk: true - ndk-version: r28-beta1 + ndk-version: r28-beta2 - name: Java tests run: gradle test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e6b8590..f312ef2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: uses: nttld/setup-ndk@v1 with: link-to-sdk: true - ndk-version: r28-beta1 + ndk-version: r28-beta2 - name: Java tests run: gradle test diff --git a/java/README.md b/java/README.md index 44c50984..a88e7112 100644 --- a/java/README.md +++ b/java/README.md @@ -12,19 +12,20 @@ To build the bindings and set up the environment, follow these steps: ### Prerequisites +- Ensure you have Gradle installed. You can install it from [Gradle](https://gradle.org/install/_) - Ensure you have the Rust toolchain installed. You can install it from [rustup](https://rustup.rs/). - Ensure you have a JDK installed. You can download it from [AdoptOpenJDK](https://adoptopenjdk.net/). -- Ensure you have Gradle installed. You can install it from [Gradle](https://gradle.org/install/_) +- Ensure you have Android NDK version `28.0.12674087` installed. You can install it from [NDK](https://github.com/android/ndk/releases/tag/r28-rc1) ### Steps -1. **Build the Rust Library:** Run the following command to compile the Rust code and generate the dynamic library: +1. **Add Android Architecture Targets:** Run the following command to add support for different Android OS architectures: ```sh -cargo build --release +rustup add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android ``` -This will compile the Rust code and generate the dynamic library in the `target/release` directory. +This will make possible to compile the Rust code for different Android OS architectures. 2. **Build the Java Project:** To compile build the project, run: @@ -34,16 +35,6 @@ This will compile the Rust code and generate the dynamic library in the `target/ This will compile the Java code and generate the JAR file in the `lib/build/libs` directory. This will also run the unit tests. -## Documentation - -To generate the Javadoc documentation, run: - -```sh -./gradlew javadoc -``` - -The documentation will be generated in the `lib/build/docs/javadoc` directory. - ## Cleaning the Build To clean the build, run: diff --git a/java/lib/build.gradle b/java/lib/build.gradle index 2753e99b..a60aa658 100644 --- a/java/lib/build.gradle +++ b/java/lib/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'com.android.library' apply plugin: 'org.mozilla.rust-android-gradle.rust-android' android { - ndkVersion '28.0.12433566' + ndkVersion '28.0.12674087' namespace 'dev.arkbuilders.core' defaultConfig { compileSdk 35