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

Side by Side Diff: components/cronet/android/BUILD.gn

Issue 2540773003: [Cronet] Add proguard files for different Cronet packaging (Closed)
Patch Set: Moved the definition of _package_dir var to its original location Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/cronet/android/cronet_impl_common_proguard.cfg » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/buildflag_header.gni") 5 import("//build/buildflag_header.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/android/rules.gni") 7 import("//build/config/android/rules.gni")
8 import("//build/util/process_version.gni") 8 import("//build/util/process_version.gni")
9 import("//build/util/version.gni") 9 import("//build/util/version.gni")
10 import("//testing/test.gni") 10 import("//testing/test.gni")
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 415
416 run_findbugs_override = true 416 run_findbugs_override = true
417 } 417 }
418 418
419 android_apk("cronet_sample_apk") { 419 android_apk("cronet_sample_apk") {
420 apk_name = "CronetSample" 420 apk_name = "CronetSample"
421 android_manifest = "sample/AndroidManifest.xml" 421 android_manifest = "sample/AndroidManifest.xml"
422 shared_libraries = [ ":cronet" ] 422 shared_libraries = [ ":cronet" ]
423 423
424 deps = [ 424 deps = [
425 ":cronet_combine_proguard_flags",
425 ":cronet_sample_apk_java", 426 ":cronet_sample_apk_java",
426 ":cronet_sample_apk_resources", 427 ":cronet_sample_apk_resources",
427 "//base:base_java", 428 "//base:base_java",
428 "//third_party/jsr-305:jsr_305_javalib", 429 "//third_party/jsr-305:jsr_305_javalib",
429 ] 430 ]
430 431
431 run_findbugs_override = true 432 run_findbugs_override = true
432 if (!is_java_debug) { 433 proguard_enabled = true
433 proguard_enabled = true 434 proguard_configs = [
434 proguard_configs = [ 435 "$target_gen_dir/cronet_impl_native_proguard.cfg",
435 "proguard.cfg", 436 "cronet_impl_common_proguard.cfg",
436 "sample/javatests/proguard.cfg", 437 "sample/javatests/proguard.cfg",
437 "//base/android/proguard/chromium_apk.flags", 438 "//base/android/proguard/chromium_apk.flags",
438 "//base/android/proguard/chromium_code.flags", 439 ]
439 ]
440 }
441 } 440 }
442 441
443 # cronet_sample_test_apk_resources is identical to 442 # cronet_sample_test_apk_resources is identical to
444 # cronet_sample_apk_resources. The two have to be different targets because 443 # cronet_sample_apk_resources. The two have to be different targets because
445 # targets which are common between the "instrumentation test apk" and the 444 # targets which are common between the "instrumentation test apk" and the
446 # "tested apk" are removed from the "instrumentation test apk". 445 # "tested apk" are removed from the "instrumentation test apk".
447 android_resources("cronet_sample_test_apk_resources") { 446 android_resources("cronet_sample_test_apk_resources") {
448 resource_dirs = [ "sample/res" ] 447 resource_dirs = [ "sample/res" ]
449 android_manifest = "sample/javatests/AndroidManifest.xml" 448 android_manifest = "sample/javatests/AndroidManifest.xml"
450 } 449 }
(...skipping 12 matching lines...) Expand all
463 ":cronet_impl_all_java", 462 ":cronet_impl_all_java",
464 ":cronet_sample_apk_java", 463 ":cronet_sample_apk_java",
465 ":cronet_sample_test_apk_resources", 464 ":cronet_sample_test_apk_resources",
466 "//base:base_java", 465 "//base:base_java",
467 "//base:base_java_test_support", 466 "//base:base_java_test_support",
468 "//net/android:net_java_test_support", 467 "//net/android:net_java_test_support",
469 ] 468 ]
470 additional_apks = [ "//net/android:net_test_support_apk" ] 469 additional_apks = [ "//net/android:net_test_support_apk" ]
471 470
472 run_findbugs_override = true 471 run_findbugs_override = true
473 proguard_enabled = !is_java_debug 472 proguard_enabled = true
474 } 473 }
475 474
476 generate_jni("cronet_tests_jni_headers") { 475 generate_jni("cronet_tests_jni_headers") {
477 testonly = true 476 testonly = true
478 sources = [ 477 sources = [
479 "test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java", 478 "test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java",
480 "test/src/org/chromium/net/CronetTestUtil.java", 479 "test/src/org/chromium/net/CronetTestUtil.java",
481 "test/src/org/chromium/net/MockCertVerifier.java", 480 "test/src/org/chromium/net/MockCertVerifier.java",
482 "test/src/org/chromium/net/MockUrlRequestJobFactory.java", 481 "test/src/org/chromium/net/MockUrlRequestJobFactory.java",
483 "test/src/org/chromium/net/NativeTestServer.java", 482 "test/src/org/chromium/net/NativeTestServer.java",
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 android_apk("cronet_perf_test_apk") { 735 android_apk("cronet_perf_test_apk") {
737 testonly = true 736 testonly = true
738 apk_name = "CronetPerfTest" 737 apk_name = "CronetPerfTest"
739 android_manifest = "test/javaperftests/AndroidManifest.xml" 738 android_manifest = "test/javaperftests/AndroidManifest.xml"
740 shared_libraries = [ 739 shared_libraries = [
741 ":cronet", 740 ":cronet",
742 ":cronet_tests", 741 ":cronet_tests",
743 ] 742 ]
744 743
745 deps = [ 744 deps = [
745 ":cronet_combine_proguard_flags",
746 ":cronet_perf_test_apk_java", 746 ":cronet_perf_test_apk_java",
747 ":cronet_test_apk_java", 747 ":cronet_test_apk_java",
748 "//base:base_java", 748 "//base:base_java",
749 ] 749 ]
750 750
751 run_findbugs_override = true 751 run_findbugs_override = true
752 proguard_enabled = true 752 proguard_enabled = true
753 proguard_configs = [ 753 proguard_configs = [
754 "proguard.cfg", 754 "$target_gen_dir/cronet_impl_native_proguard.cfg",
755 "cronet_impl_common_proguard.cfg",
755 "test/javaperftests/proguard.cfg", 756 "test/javaperftests/proguard.cfg",
756 "//base/android/proguard/chromium_apk.flags", 757 "//base/android/proguard/chromium_apk.flags",
757 "//base/android/proguard/chromium_code.flags",
758 ] 758 ]
759 } 759 }
760 760
761 test("cronet_unittests") { 761 test("cronet_unittests") {
762 sources = [ 762 sources = [
763 "//components/cronet/android/cert/cert_verifier_cache_serializer_unittest.cc ", 763 "//components/cronet/android/cert/cert_verifier_cache_serializer_unittest.cc ",
764 "//components/cronet/histogram_manager_unittest.cc", 764 "//components/cronet/histogram_manager_unittest.cc",
765 "//components/cronet/run_all_unittests.cc", 765 "//components/cronet/run_all_unittests.cc",
766 "//components/cronet/stale_host_resolver_unittest.cc", 766 "//components/cronet/stale_host_resolver_unittest.cc",
767 "//components/cronet/url_request_context_config_unittest.cc", 767 "//components/cronet/url_request_context_config_unittest.cc",
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 deps = [ 1014 deps = [
1015 ":jar_cronet_api_source", 1015 ":jar_cronet_api_source",
1016 ] 1016 ]
1017 } 1017 }
1018 1018
1019 copy("cronet_package_copy") { 1019 copy("cronet_package_copy") {
1020 sources = [ 1020 sources = [
1021 "$root_out_dir/lib.java/components/cronet/android/cronet_api.jar", 1021 "$root_out_dir/lib.java/components/cronet/android/cronet_api.jar",
1022 "$root_out_dir/lib.java/components/cronet/android/cronet_impl_common_java.ja r", 1022 "$root_out_dir/lib.java/components/cronet/android/cronet_impl_common_java.ja r",
1023 "$root_out_dir/lib.java/components/cronet/android/cronet_impl_platform_java. jar", 1023 "$root_out_dir/lib.java/components/cronet/android/cronet_impl_platform_java. jar",
1024 "$target_gen_dir/cronet_impl_native_proguard.cfg",
1024 "//AUTHORS", 1025 "//AUTHORS",
1025 "//chrome/VERSION", 1026 "//chrome/VERSION",
1027 "cronet_impl_common_proguard.cfg",
1028 "cronet_impl_platform_proguard.cfg",
1026 ] 1029 ]
1027 outputs = [ 1030 outputs = [
1028 "$_package_dir/{{source_file_part}}", 1031 "$_package_dir/{{source_file_part}}",
1029 ] 1032 ]
1030 1033
1031 deps = [ 1034 deps = [
1032 ":cronet_api_java", 1035 ":cronet_api_java",
1036 ":cronet_combine_proguard_flags",
1033 ":cronet_impl_common_java", 1037 ":cronet_impl_common_java",
1034 ":cronet_impl_platform_java", 1038 ":cronet_impl_platform_java",
1035 ] 1039 ]
1036 } 1040 }
1037 1041
1038 action("cronet_combine_proguard_flags") { 1042 action("cronet_combine_proguard_flags") {
1039 script = "//components/cronet/tools/generate_proguard_file.py" 1043 script = "//components/cronet/tools/generate_proguard_file.py"
1040 outputs = [ 1044 outputs = [
1041 "$_package_dir/proguard.cfg", 1045 "$target_gen_dir/cronet_impl_native_proguard.cfg",
1042 ] 1046 ]
1043
1044 args = [ 1047 args = [
1045 "--output-file", 1048 "--output-file",
1046 rebase_path("$_package_dir/proguard.cfg", root_build_dir), 1049 rebase_path("$target_gen_dir/cronet_impl_native_proguard.cfg",
1050 root_build_dir),
1051 rebase_path("//components/cronet/android/cronet_impl_native_proguard.cfg",
1052 root_build_dir),
1047 rebase_path("//base/android/proguard/chromium_code.flags", root_build_dir), 1053 rebase_path("//base/android/proguard/chromium_code.flags", root_build_dir),
1048 rebase_path("//components/cronet/android/proguard.cfg", root_build_dir),
1049 ] 1054 ]
1050 } 1055 }
1051 1056
1052 copy("cronet_package_copy_native_lib") { 1057 copy("cronet_package_copy_native_lib") {
1053 sources = [ 1058 sources = [
1054 "$root_out_dir/libcronet.so", 1059 "$root_out_dir/libcronet.so",
1055 ] 1060 ]
1056 outputs = [ 1061 outputs = [
1057 "$_package_dir/libs/${android_app_abi}/libcronet.so", 1062 "$_package_dir/libs/${android_app_abi}/libcronet.so",
1058 ] 1063 ]
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 "//base:base", 1100 "//base:base",
1096 ] 1101 ]
1097 } 1102 }
1098 } 1103 }
1099 1104
1100 group("cronet_package") { 1105 group("cronet_package") {
1101 # Enforce that arm_use_neon==false when building for ARMv7 by 1106 # Enforce that arm_use_neon==false when building for ARMv7 by
1102 # not including any deps in cronet_package target otherwise. 1107 # not including any deps in cronet_package target otherwise.
1103 if (!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon) { 1108 if (!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon) {
1104 deps = [ 1109 deps = [
1105 ":cronet_combine_proguard_flags",
1106 ":cronet_package_copy", 1110 ":cronet_package_copy",
1107 ":cronet_package_copy_native_lib", 1111 ":cronet_package_copy_native_lib",
1108 ":cronet_package_copy_native_lib_unstripped", 1112 ":cronet_package_copy_native_lib_unstripped",
1109 ":generate_javadoc", 1113 ":generate_javadoc",
1110 ":generate_licenses", 1114 ":generate_licenses",
1111 ":jar_cronet_api_source", 1115 ":jar_cronet_api_source",
1112 ":jar_cronet_impl_common_java_source", 1116 ":jar_cronet_impl_common_java_source",
1113 ":jar_cronet_impl_native_java_source", 1117 ":jar_cronet_impl_native_java_source",
1114 ":jar_cronet_impl_platform_java_source", 1118 ":jar_cronet_impl_platform_java_source",
1115 ":jar_cronet_sample_source", 1119 ":jar_cronet_sample_source",
1116 ":repackage_extracted_jars", 1120 ":repackage_extracted_jars",
1117 ] 1121 ]
1118 if (current_cpu == "arm" && arm_version == 7) { 1122 if (current_cpu == "arm" && arm_version == 7) {
1119 deps += [ ":enforce_no_neon" ] 1123 deps += [ ":enforce_no_neon" ]
1120 } 1124 }
1121 } 1125 }
1122 } 1126 }
OLDNEW
« no previous file with comments | « no previous file | components/cronet/android/cronet_impl_common_proguard.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698