Skip to content
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

[android] build the Android App in GH jobs #3340

Merged
merged 11 commits into from
Oct 28, 2020
10 changes: 10 additions & 0 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,13 @@ jobs:
- name: Run Build
run: |
scripts/build/gn_build.sh
rsync -a out/lib/*.jar src/android/CHIPTool/app/libs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we split steps into separately named items for easier following? We did already split bootstrap for example.

A large list of commands is harder to follow since output is mixed with the commands themselves.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe add a script in scripts directory (which by the way could be used to build the app locally) and run it here?

Copy link
Contributor Author

@wgtdkp wgtdkp Oct 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andy31415 Updated.

@Damian-Nordic Sounds good to me. But then we need to update the Android App for new build steps. I would prefer we do it in a separate small PR, this PR is for adding current Android App build steps to GH to make sure it works.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Damian-Nordic Added the script for building Android App, please re-review.

rsync -a out/lib/jni/* src/android/CHIPTool/app/src/main/jniLibs
git submodule update --init --recursive third_party/ot-commissioner/repo
ABI=arm64-v8a API=21 ./third_party/ot-commissioner/build-android-libs.sh
# sdkmanager doesn't work with JDK 11.
wgtdkp marked this conversation as resolved.
Show resolved Hide resolved
update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64
yes | /opt/android/sdk/tools/bin/sdkmanager --licenses
update-java-alternatives --set /usr/lib/jvm/java-1.11.0-openjdk-amd64
cd src/android/CHIPTool
./gradlew build