| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/android/internal_rules.gni") | 6 import("//build/config/android/internal_rules.gni") |
| 7 import("//tools/grit/grit_rule.gni") | 7 import("//tools/grit/grit_rule.gni") |
| 8 | 8 |
| 9 assert(is_android) | 9 assert(is_android) |
| 10 | 10 |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 # (and so not through builtin targets like 'action', 'group', etc). | 568 # (and so not through builtin targets like 'action', 'group', etc). |
| 569 # java_files: List of .java files to include in the apk. | 569 # java_files: List of .java files to include in the apk. |
| 570 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 570 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
| 571 # will be added to java_files and be included in this apk. | 571 # will be added to java_files and be included in this apk. |
| 572 # apk_name: Name for final apk. | 572 # apk_name: Name for final apk. |
| 573 # final_apk_path: Path to final built apk. Default is | 573 # final_apk_path: Path to final built apk. Default is |
| 574 # $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name. | 574 # $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name. |
| 575 # native_libs: List paths of native libraries to include in this apk. If these | 575 # native_libs: List paths of native libraries to include in this apk. If these |
| 576 # libraries depend on other shared_library targets, those dependencies will | 576 # libraries depend on other shared_library targets, those dependencies will |
| 577 # also be included in the apk. | 577 # also be included in the apk. |
| 578 # testonly: Marks this target as "test-only". |
| 578 # | 579 # |
| 579 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 580 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in |
| 580 # this directory will be included in the library. This is only supported to | 581 # this directory will be included in the library. This is only supported to |
| 581 # ease the gyp->gn conversion and will be removed in the future. | 582 # ease the gyp->gn conversion and will be removed in the future. |
| 582 # | 583 # |
| 583 # Example | 584 # Example |
| 584 # android_apk("foo_apk") { | 585 # android_apk("foo_apk") { |
| 585 # android_manifest = "AndroidManifest.xml" | 586 # android_manifest = "AndroidManifest.xml" |
| 586 # java_files = [ | 587 # java_files = [ |
| 587 # "android/org/chromium/foo/FooApplication.java", | 588 # "android/org/chromium/foo/FooApplication.java", |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 | 641 |
| 641 write_build_config("${target_name}__build_config") { | 642 write_build_config("${target_name}__build_config") { |
| 642 type = "android_apk" | 643 type = "android_apk" |
| 643 srcjar = resource_srcjar_path | 644 srcjar = resource_srcjar_path |
| 644 dex_path = final_dex_path | 645 dex_path = final_dex_path |
| 645 resources_zip = resources_zip_path | 646 resources_zip = resources_zip_path |
| 646 | 647 |
| 647 if (defined(invoker.deps)) { | 648 if (defined(invoker.deps)) { |
| 648 deps = invoker.deps | 649 deps = invoker.deps |
| 649 } | 650 } |
| 651 if (defined(invoker.testonly)) { |
| 652 testonly = invoker.testonly |
| 653 } |
| 650 | 654 |
| 651 native_libs = _native_libs | 655 native_libs = _native_libs |
| 652 } | 656 } |
| 653 | 657 |
| 654 final_deps = [] | 658 final_deps = [] |
| 655 | 659 |
| 656 final_deps += [":${target_name}__process_resources"] | 660 final_deps += [":${target_name}__process_resources"] |
| 657 process_resources("${target_name}__process_resources") { | 661 process_resources("${target_name}__process_resources") { |
| 658 android_manifest = invoker.android_manifest | 662 android_manifest = invoker.android_manifest |
| 659 | 663 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk" | 798 final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk" |
| 795 java_files = [ | 799 java_files = [ |
| 796 "//testing/android/java/src/org/chromium/native_test/ChromeNativeTestActiv
ity.java" | 800 "//testing/android/java/src/org/chromium/native_test/ChromeNativeTestActiv
ity.java" |
| 797 ] | 801 ] |
| 798 android_manifest = "//testing/android/java/AndroidManifest.xml" | 802 android_manifest = "//testing/android/java/AndroidManifest.xml" |
| 799 unittests_outputs = [ unittests_binary ] | 803 unittests_outputs = [ unittests_binary ] |
| 800 native_libs = [unittests_outputs[0]] | 804 native_libs = [unittests_outputs[0]] |
| 801 if (defined(invoker.deps)) { | 805 if (defined(invoker.deps)) { |
| 802 deps = invoker.deps | 806 deps = invoker.deps |
| 803 } | 807 } |
| 808 testonly = true |
| 804 } | 809 } |
| 805 } | 810 } |
| 806 | 811 |
| 807 # Generate .java files from .aidl files. | 812 # Generate .java files from .aidl files. |
| 808 # | 813 # |
| 809 # This target will store the .java files in a srcjar and should be included in | 814 # This target will store the .java files in a srcjar and should be included in |
| 810 # an android_library or android_apk's srcjar_deps. | 815 # an android_library or android_apk's srcjar_deps. |
| 811 # | 816 # |
| 812 # Variables | 817 # Variables |
| 813 # sources: Paths to .aidl files to compile. | 818 # sources: Paths to .aidl files to compile. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 "//build/android/gyp/find.py", | 871 "//build/android/gyp/find.py", |
| 867 rebase_path([invoker.import_include], root_build_dir), | 872 rebase_path([invoker.import_include], root_build_dir), |
| 868 "list lines" | 873 "list lines" |
| 869 ) | 874 ) |
| 870 _java_files = rebase_path(_java_files_build_rel, ".", root_build_dir) | 875 _java_files = rebase_path(_java_files_build_rel, ".", root_build_dir) |
| 871 inputs += _java_files | 876 inputs += _java_files |
| 872 } | 877 } |
| 873 args += rebase_path(sources, root_build_dir) | 878 args += rebase_path(sources, root_build_dir) |
| 874 } | 879 } |
| 875 } | 880 } |
| OLD | NEW |