diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ecc7c40dbf..9569f3a183 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -56,6 +56,7 @@ jobs: - if: matrix.language == 'java' name: Build Android run: | + export NDK_HOME=$ANDROID_NDK_LATEST_HOME ./build.js cd platform/android make -C ../core android_bindings diff --git a/.github/workflows/daily-instrumentation-test.yml b/.github/workflows/daily-instrumentation-test.yml index 2d15d37657..97b55ab468 100644 --- a/.github/workflows/daily-instrumentation-test.yml +++ b/.github/workflows/daily-instrumentation-test.yml @@ -28,7 +28,9 @@ jobs: run: ./build.js build - name: Build core working-directory: platform/core - run: make + run: | + export NDK_HOME=$ANDROID_NDK_LATEST_HOME + make android_bindings - uses: actions/setup-java@v2 with: distribution: 'zulu' diff --git a/.github/workflows/ios-test.yml b/.github/workflows/ios-test.yml index c40caee071..cd5f90f233 100644 --- a/.github/workflows/ios-test.yml +++ b/.github/workflows/ios-test.yml @@ -34,7 +34,7 @@ jobs: run: ./build.js - name: Build core working-directory: platform/core - run: make + run: make ios_bindings - name: Build and test iOS working-directory: platform/ios run: make test diff --git a/.github/workflows/js-and-android-test.yml b/.github/workflows/js-and-android-test.yml index e41418e596..c9e7b0ff17 100644 --- a/.github/workflows/js-and-android-test.yml +++ b/.github/workflows/js-and-android-test.yml @@ -78,7 +78,9 @@ jobs: - name: Build core with Android bindings if: steps.changes.outputs.android == 'true' working-directory: platform/core - run: make android_bindings + run: | + export NDK_HOME=$ANDROID_NDK_LATEST_HOME + make android_bindings - name: Test android if: steps.changes.outputs.android == 'true' working-directory: platform/android diff --git a/platform/core/Makefile b/platform/core/Makefile index 6d0464c9e1..094e24066b 100644 --- a/platform/core/Makefile +++ b/platform/core/Makefile @@ -15,19 +15,13 @@ ios_targets := iPhone simulator tools_dir := tools android_core := PolyPodCoreAndroid/core/src/main/ android_version := 24 -# Rust still uses old-ish r22 version of NDK. -# For reference https://github.com/rust-lang/rust/pull/85806 -ndk_version := r22b google_repo := https://dl.google.com/android/repository -ndk_lib := android-ndk-$(ndk_version) -ndk=$(tools_dir)/NDK_$(ndk_version) -ndk_archive = $(tools_dir)/NDK.zip -export ANDROID_NDK_HOME := $(ndk)/$(ndk_lib) android_triples := aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android android_binaries := $(patsubst %, target/%, $(android_triples)) android_architectures := arm64-v8a armeabi-v7a x86_64 x86 jni_libs_copy_path := $(android_core)/jniLibs android_core_libraries := $(patsubst %, $(jni_libs_copy_path)/%, $(android_architectures)) +cargo_ndk_version = 2.10.0 ifeq ($(OS),Windows_NT) ndk_download_url = $(google_repo)/$(ndk_lib)-windows-x86_64.zip @@ -45,6 +39,7 @@ else endif + # ============ Rust core ============ # $(target): @@ -100,14 +95,8 @@ endef # ============ Android lib ============ # -$(ndk): - mkdir -p $(ndk) - curl -L $(ndk_download_url) -o $(ndk_archive) - unzip -q -d $(ndk) $(ndk_archive) - rm $(ndk_archive) - -$(android_binaries): $(target) $(ndk) - cargo install cargo-ndk +$(android_binaries): $(target) + cargo install cargo-ndk --version $(cargo_ndk_version) rustup target add $(android_triples) $(foreach triple, $(android_triples), \ diff --git a/platform/core/README.md b/platform/core/README.md index 4ec9516634..a89b6fd46d 100644 --- a/platform/core/README.md +++ b/platform/core/README.md @@ -26,6 +26,8 @@ make ios_bindings - Building android core: + Prerequisite: You should install NDK (it is recommended to use Android Studio for installing it). Version r24 should be installed. Make sure that either `NDK_HOME` or `ANDROID_NDK_HOME`(specifying the path to NDK) is exported as an environment variable on your system. + ```shell make android_bindings ``` diff --git a/platform/core/flatbuffers_shared/flatbuffer_models/feature_manifest.fbs b/platform/core/flatbuffers_shared/flatbuffer_models/feature_manifest.fbs deleted file mode 100644 index 5de5f2d5c7..0000000000 --- a/platform/core/flatbuffers_shared/flatbuffer_models/feature_manifest.fbs +++ /dev/null @@ -1,19 +0,0 @@ -table Link { - name:string (required); - url:string (required); -} - -table FeatureManifest { - name:string; - author:string; - version:string; - description:string; - thumbnail:string; - thumbnail_color:string; - primary_color:string; - links:[Link]; - border_color:string; - tile_text_color:string; -} - -root_type FeatureManifest;