-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle #649
Gradle #649
Conversation
Thanks for the PR. I'm a bit reluctant to add yet another build config, because it will increase maintenance burden, but will be OK adding it to the |
@vitaut Confirmed. P.S. Since Travis CI's Android build doesn't contain NDK in its image, checking this build config in Travis can take more than 5 min. I will provide the detailed log when things become clear. |
@luncliff, any luck moving the build config to a subdirectory? |
- Build job for Travis CI - Moved gradle file to support/
- Absolute path for Gradle binary
- Additional script for build success - Check the Gradle's `assemble.doLast` task
@vitaut Sorry for my laziness. I've been doing multiple works last month. Change
For build config, you can find a column in the build matrix. Since Travis-CI image doesn't contain NDK bundle, I had to install it manually with matrix:
# ...
include:
- language: android
android:
components:
- tools
- platform-tools
- android-21
- sys-img-armeabi-v7a-android-21
env:
- ANDROID=true
before_install:
- git submodule update --init --recursive
- sudo apt-get install wget unzip tree
install:
# Accept SDK Licenses + Install NDK
- yes | sdkmanager --update > /dev/null 2>&1
- sdkmanager ndk-bundle > /dev/null 2>&1
# Download Gradle 4.3.1
- wget https://services.gradle.org/distributions/gradle-4.3.1-bin.zip
- mkdir -p gradle
- unzip -q -d ./gradle gradle-4.3.1-bin.zip
- export GRADLE=${TRAVIS_BUILD_DIR}/gradle/gradle-4.3.1/bin/gradle
before_script:
- bash $GRADLE --version
- cd ./support
script:
- bash $GRADLE clean assemble
after_success:
- cd ${TRAVIS_BUILD_DIR}
- tree ./libs At the end of the build, you can see the file tree created with Gradle task. |
No worries, thanks a lot for updating the PR. 5+ mins is not a big problem I guess since the CI build is asynchronous. |
Summary
.so
file generationThere is no change for existing
CMakeLists.txt
.The change includes dummy
AndroidManifest.xml
file insupport/
directory to generate Android library. Descriptions are commented inbuild.gradle
file.Build
For command line build,
gradle assemble
will trigger build phase.