Skip to content

Commit

Permalink
disable android studio build in build_examples (#10427)
Browse files Browse the repository at this point in the history
* disable android studio build in build_examples

* make unit test work

* Restyle fixes
  • Loading branch information
andy31415 authored and pull[bot] committed Oct 15, 2021
1 parent 1fbca19 commit 4494661
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
7 changes: 6 additions & 1 deletion scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,13 @@ def AndroidTargets():
yield target.Extend('arm64-chip-tool', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TOOL)
yield target.Extend('x64-chip-tool', board=AndroidBoard.X64, app=AndroidApp.CHIP_TOOL)
yield target.Extend('x86-chip-tool', board=AndroidBoard.X86, app=AndroidApp.CHIP_TOOL)
yield target.Extend('androidstudio-chip-tool', board=AndroidBoard.AndroidStudio, app=AndroidApp.CHIP_TOOL)
yield target.Extend('arm64-chip-test', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TEST)
# TODO: android studio build is broken:
# - When compile succeeds, build artifact copy fails with "No such file or
# directory: '<out_prefix>/android-androidstudio-chip-tool/outputs/apk/debug/app-debug.apk'
# - Compiling locally in the vscode image fails with
# "2 files found with path 'lib/armeabi-v7a/libCHIPController.so'"
# yield target.Extend('androidstudio-chip-tool', board=AndroidBoard.AndroidStudio, app=AndroidApp.CHIP_TOOL)


ALL = []
Expand Down
1 change: 0 additions & 1 deletion scripts/build/testdata/all_targets_except_host.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
android-androidstudio-chip-tool
android-arm-chip-tool
android-arm64-chip-test
android-arm64-chip-tool
Expand Down
15 changes: 0 additions & 15 deletions scripts/build/testdata/build_all_except_host.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ python3 build/chip/java/tests/generate_jars_for_test.py
# Setting up Android deps through Gradle
python3 third_party/android_deps/set_up_android_deps.py

# Generating android-androidstudio-chip-tool
gn gen --check --fail-on-unused-args {out}/android-androidstudio-chip-tool '--args=target_os="android" target_cpu="arm64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_use_clusters_for_ip_commissioning="true"' --ide=json --json-ide-script=//scripts/examples/gn_to_cmakelists.py

# Accepting NDK licenses
bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null'

# Generating JARs for Java build rules test
python3 build/chip/java/tests/generate_jars_for_test.py

# Setting up Android deps through Gradle
python3 third_party/android_deps/set_up_android_deps.py

# Generating android-arm-chip-tool
gn gen --check --fail-on-unused-args {out}/android-arm-chip-tool '--args=target_os="android" target_cpu="arm" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_use_clusters_for_ip_commissioning="true"'

Expand Down Expand Up @@ -183,9 +171,6 @@ west build --cmake-only -d {out}/telink-tlsr9518adk80d-light -b tlsr9518adk80d {
# Generating tizen-arm-light
gn gen --check --fail-on-unused-args --root={root}/examples/lighting-app/linux '--args=target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light

# Building APP android-androidstudio-chip-tool
{root}/src/android/CHIPTool/gradlew -p {root}/src/android/CHIPTool -PmatterBuildSrcDir={out}/android-androidstudio-chip-tool -PmatterSdkSourceBuild=true assembleDebug

# Building JNI android-arm-chip-tool
ninja -C {out}/android-arm-chip-tool

Expand Down

0 comments on commit 4494661

Please sign in to comment.