Skip to content

Commit

Permalink
Merge pull request #5 from ShirosakiMio/master
Browse files Browse the repository at this point in the history
Compile for android arm64
  • Loading branch information
Rongmario authored Jan 14, 2024
2 parents 345552c + 9609981 commit 973f4d9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,41 @@ jobs:
with:
name: resources
path: output_natives/

android:
name: Compile for Android
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java
id: setup-java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Make Directory
run: mkdir toolchains

- name: Setup NDK and compile
uses: nttld/setup-ndk@v1
with:
ndk-version: r25c
- run: cd src/main/cpp && ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_PLATFORM=android-21 APP_ABI=arm64-v8a APP_STL=c++_static

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: resources
path: src/main/cpp/libs/arm64-v8a

build-jar:
name: Compile Jar
runs-on: ubuntu-latest
needs: [windows, linux, osx]
needs: [windows, linux, osx, android]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand Down
5 changes: 5 additions & 0 deletions src/main/cpp/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := imaginebreaker_android
LOCAL_SRC_FILES := zone_rong_imaginebreaker_NativeImagineBreaker.cpp
include $(BUILD_SHARED_LIBRARY)

0 comments on commit 973f4d9

Please sign in to comment.