Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luncliff/muffin
Experiments with the Android NDK
https://github.com/luncliff/muffin
android android-library android-ndk cmake example-project gradle jni-android mobile-development ndk
Last synced: 3 months ago
JSON representation
Experiments with the Android NDK
- Host: GitHub
- URL: https://github.com/luncliff/muffin
- Owner: luncliff
- License: unlicense
- Created: 2018-09-21T15:35:05.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2022-10-17T04:41:29.000Z (over 2 years ago)
- Last Synced: 2023-02-28T09:51:52.811Z (almost 2 years ago)
- Topics: android, android-library, android-ndk, cmake, example-project, gradle, jni-android, mobile-development, ndk
- Language: C
- Homepage:
- Size: 16 MB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE
Awesome Lists containing this project
README
# Muffin
[![Build Status](https://dev.azure.com/luncliff/personal/_apis/build/status/luncliff.Muffin?branchName=main)](https://dev.azure.com/luncliff/personal/_build/latest?definitionId=34&branchName=main)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/luncliff/Muffin/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/luncliff/Muffin/tree/main)
![Gradle](https://img.shields.io/badge/Gradle-7.2+-02303a)
![Android NDK](https://img.shields.io/badge/NDK-22+-3ecf7d)
![CMake](https://img.shields.io/badge/CMake-3.21+-00529b)Template for Android NDK module
### References
* [NDK Samples(GitHub)](https://github.com/android/ndk-samples)
* [Android Developer Guide](https://developer.android.com/guide)
* [Testing](https://developer.android.com/training/testing/unit-testing)
* [Testing with JUnit 5 for Android](https://github.com/mannodermaus/android-junit5)
* https://developer.android.com/studio/projects/gradle-external-native-builds
* https://developer.android.com/studio/build/native-dependencies?hl=en
* https://google.github.io/prefab/#### Android
* https://developer.android.com/ndk/reference/group/a-hardware-buffer
* https://developer.android.com/ndk/guides/neuralnetworks#### EGL
* https://github.com/fuyufjh/GraphicBuffer
* https://registry.khronos.org/EGL/extensions/ANDROID/## How to
### Setup
#### ~~NDK Sanitizers~~
It won't be used anymore.
```bash
cd ${ANDROID_NDK_HOME}/build/tools
INSTALL_PATH=/tmp/llvm/prebuilt/"$(echo $(uname -s)-$(uname -m) | tr '[:upper:]' '[:lower:]')"
./make_standalone_toolchain.py --arch=arm64 --api=27 --stl=libc++ --install-dir=${INSTALL_PATH} --force
cd ${INSTALL_PATH}
tree -L 2 ./lib64/clang/9.0.0/lib
```### Build
The build step uses [Gradle 7.2.0+](https://docs.gradle.org/current/userguide/userguide.html). If you don't know how to use it, latest [Android Studio](https://developer.android.com/studio/) can do the work.
```console
$ git clone https://github.com/luncliff/Muffin
$ cd ./Muffin
$ gradle clean assemble
```### Test
Connect your device and run the test with Gradle.
Please reference the [test codes](./android/test/).```console
$ gradle connectedAndroidTest # Run test
```