mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
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:
38
.github/workflows/build.yml
vendored
38
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user