Skip to content

Commit

Permalink
Update Android NDK and java/README.md instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
oluiscabral committed Dec 16, 2024
1 parent 0c1fa09 commit 61cd3f5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 5 additions & 14 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion java/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61cd3f5

Please sign in to comment.