Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: components/cronet/android/BUILD.gn

Issue 2440613003: [Cronet] Enforce implementation does not call through API classes (Closed)
Patch Set: add exception for Exception.getMessage() call Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cronet/PRESUBMIT.py ('k') | components/cronet/tools/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/BUILD.gn
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn
index 21eabaaa157a98c98c81e317663bea3767a52b76..9d50f574e106897e5612d4c1027852b3959bf5e9 100644
--- a/components/cronet/android/BUILD.gn
+++ b/components/cronet/android/BUILD.gn
@@ -1403,6 +1403,40 @@ if (target_cpu == "arm" && arm_version == 7 && !arm_use_neon) {
}
}
+# Enforce restrictions for API<->impl boundary.
+action("api_static_checks") {
+ script = "//components/cronet/tools/api_static_checks.py"
+ outputs = [
+ "$target_gen_dir/$target_name.stamp",
+ ]
+ args = [
+ "--api_jar",
+ rebase_path(
+ "$root_out_dir/lib.java/components/cronet/android/cronet_api.jar",
+ root_build_dir),
+ "--impl_jar",
+ rebase_path(
+ "$root_out_dir/lib.java/components/cronet/android/cronet_impl_common_java.jar",
+ root_build_dir),
+ "--impl_jar",
+ rebase_path(
+ "$root_out_dir/lib.java/components/cronet/android/cronet_impl_platform_java.jar",
+ root_build_dir),
+ "--impl_jar",
+ rebase_path(
+ "$root_out_dir/lib.java/components/cronet/android/cronet_impl_native_java.jar",
+ root_build_dir),
+ "--stamp",
+ rebase_path(outputs[0], root_build_dir),
+ ]
+ deps = [
+ ":cronet_api_java",
+ ":cronet_impl_common_java",
+ ":cronet_impl_native_java",
+ ":cronet_impl_platform_java",
+ ]
+}
+
group("cronet_package") {
# Marked as testonly as it contains test-only targets too.
testonly = true
@@ -1413,6 +1447,7 @@ group("cronet_package") {
if (use_platform_icu_alternatives &&
(!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon)) {
deps = [
+ ":api_static_checks",
":cronet_package_copy",
":cronet_package_copy_native_lib",
":cronet_package_copy_native_lib_unstripped",
« no previous file with comments | « components/cronet/PRESUBMIT.py ('k') | components/cronet/tools/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698