Add is_android guard to all Android rule usages.

Android rules contain `assert is_android`.
This didn't cause any problems only because GN doesn't touch files if they are not referenced from the root BUILD.gn file.

Skipping presubmit because this CL triggers a warning even though it's just adding indentation.

No-Presubmit: True
Bug: None
Change-Id: Ifcb8f0e1d47784ff800507f9d560c68e8f78c717
Reviewed-on: https://webrtc-review.googlesource.com/90040
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24061}
This commit is contained in:
Oleh Prypin 2018-07-23 10:01:26 +02:00 committed by Commit Bot
parent 3d72f6dac8
commit fdc0ef11ad
3 changed files with 1422 additions and 1415 deletions

View File

@ -6,8 +6,10 @@
# in the file PATENTS. All contributing project authors may # in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree. # be found in the AUTHORS file in the root of the source tree.
if (is_android) {
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
android_java_prebuilt("autobanh_java") { android_java_prebuilt("autobanh_java") {
jar_path = "lib/autobanh.jar" jar_path = "lib/autobanh.jar"
} }
}

View File

@ -1,5 +1,6 @@
import("//webrtc.gni") import("//webrtc.gni")
if (is_android) {
rtc_android_apk("androidnativeapi") { rtc_android_apk("androidnativeapi") {
testonly = true testonly = true
apk_name = "androidnativeapi" apk_name = "androidnativeapi"
@ -71,3 +72,4 @@ android_resources("resources") {
resource_dirs = [ "res" ] resource_dirs = [ "res" ]
custom_package = "org.webrtc.examples.androidnativeapi" custom_package = "org.webrtc.examples.androidnativeapi"
} }
}

View File

@ -6,6 +6,7 @@
# in the file PATENTS. All contributing project authors may # in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree. # be found in the AUTHORS file in the root of the source tree.
if (is_android) {
import("../../webrtc.gni") import("../../webrtc.gni")
import("//build/config/android/config.gni") import("//build/config/android/config.gni")
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
@ -1113,8 +1114,9 @@ if (rtc_include_tests) {
"//third_party/junit", "//third_party/junit",
] ]
shared_libraries = shared_libraries = [
[ "../../sdk/android:libjingle_peerconnection_instrumentationtests_so" ] "../../sdk/android:libjingle_peerconnection_instrumentationtests_so",
]
} }
} }
@ -1380,3 +1382,4 @@ rtc_source_set("native_unittests") {
"//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/memory",
] ]
} }
}