Modernize android build and sample (#6229)

Android build was dated, using the Android.mk approach. Current
project configuration on Android encourages the usage of CMake, so we
are updating the android project as an example on how to use either the
Java/Kotlin generate code or the native C++ one.
This commit is contained in:
Paulo Pinheiro
2020-11-05 23:23:37 +01:00
committed by GitHub
parent 46a8c7e958
commit 0ff0471488
54 changed files with 898 additions and 1286 deletions

View File

@@ -65,24 +65,20 @@ jobs:
name: Mac flatc binary
path: Release/flatc
# FIXME: to make this work, this apparently needs:
# - a newer version of gradle in build.gradle (e.g. 3.2.1)
# - google() in the repos in build.gradle
# - gradle version 4.6 in gradle-wrapper.properties ?
# - some kind of flavor declaration?
# All while not breaking the existing Travis Android build.
# good luck.
# build-android:
# name: Build Android (on Linux)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - name: set up JDK 1.8
# uses: actions/setup-java@v1
# with:
# java-version: 1.8
# - name: build
# working-directory: android
# run: bash ./gradlew buildDebug
build-android:
name: Build Android (on Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: set up flatc
run: |
cmake -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF .
make
echo "${PWD}" >> $GITHUB_PATH
- name: build
working-directory: android
run: bash ./gradlew clean build