| 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("//base/android/linker/config.gni") | 5 import("//base/android/linker/config.gni") |
| 6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
| 7 import("//build/config/android/internal_rules.gni") | 7 import("//build/config/android/internal_rules.gni") |
| 8 import("//tools/grit/grit_rule.gni") | 8 import("//tools/grit/grit_rule.gni") |
| 9 import("//tools/relocation_packer/config.gni") | 9 import("//tools/relocation_packer/config.gni") |
| 10 | 10 |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 # Variables | 648 # Variables |
| 649 # deps: Specifies the dependencies of this target. Java targets in this list | 649 # deps: Specifies the dependencies of this target. Java targets in this list |
| 650 # will be included in the executable (and the javac classpath). | 650 # will be included in the executable (and the javac classpath). |
| 651 # | 651 # |
| 652 # java_files: List of .java files included in this library. | 652 # java_files: List of .java files included in this library. |
| 653 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 653 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
| 654 # will be added to java_files and be included in this library. | 654 # will be added to java_files and be included in this library. |
| 655 # srcjars: List of srcjars to be included in this library, together with the | 655 # srcjars: List of srcjars to be included in this library, together with the |
| 656 # ones obtained from srcjar_deps. | 656 # ones obtained from srcjar_deps. |
| 657 # | 657 # |
| 658 # bypass_platform_checks: Disables checks about cross-platform (Java/Android) |
| 659 # dependencies for this target. This will allow depending on an |
| 660 # android_library target, for example. |
| 661 # |
| 658 # chromium_code: If true, extra analysis warning/errors will be enabled. | 662 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 659 # | 663 # |
| 660 # datadeps, testonly | 664 # datadeps, testonly |
| 661 # | 665 # |
| 662 # Example | 666 # Example |
| 663 # java_library("foo") { | 667 # java_library("foo") { |
| 664 # java_files = [ "org/chromium/foo/FooMain.java" ] | 668 # java_files = [ "org/chromium/foo/FooMain.java" ] |
| 665 # deps = [ ":bar_java" ] | 669 # deps = [ ":bar_java" ] |
| 666 # main_class = "org.chromium.foo.FooMain" | 670 # main_class = "org.chromium.foo.FooMain" |
| 667 # } | 671 # } |
| 668 template("java_binary") { | 672 template("java_binary") { |
| 669 # TODO(cjhopman): This should not act like a java_library for dependents (i.e. | 673 # TODO(cjhopman): This should not act like a java_library for dependents (i.e. |
| 670 # dependents shouldn't get the jar in their classpath, etc.). | 674 # dependents shouldn't get the jar in their classpath, etc.). |
| 671 java_library_impl(target_name) { | 675 java_library_impl(target_name) { |
| 672 if (defined(invoker.DEPRECATED_java_in_dir)) { DEPRECATED_java_in_dir = invo
ker.DEPRECATED_java_in_dir } | 676 if (defined(invoker.DEPRECATED_java_in_dir)) { DEPRECATED_java_in_dir = invo
ker.DEPRECATED_java_in_dir } |
| 673 if (defined(invoker.chromium_code)) { chromium_code = invoker.chromium_code
} | 677 if (defined(invoker.chromium_code)) { chromium_code = invoker.chromium_code
} |
| 674 if (defined(invoker.datadeps)) { deps = invoker.datadeps } | 678 if (defined(invoker.datadeps)) { deps = invoker.datadeps } |
| 675 if (defined(invoker.deps)) { deps = invoker.deps } | 679 if (defined(invoker.deps)) { deps = invoker.deps } |
| 676 if (defined(invoker.java_files)) { java_files = invoker.java_files } | 680 if (defined(invoker.java_files)) { java_files = invoker.java_files } |
| 677 if (defined(invoker.srcjar_deps)) { srcjar_deps = invoker.srcjar_deps } | 681 if (defined(invoker.srcjar_deps)) { srcjar_deps = invoker.srcjar_deps } |
| 678 if (defined(invoker.srcjars)) { srcjars = invoker.srcjars } | 682 if (defined(invoker.srcjars)) { srcjars = invoker.srcjars } |
| 683 if (defined(invoker.bypass_platform_checks)) { bypass_platform_checks = invo
ker.bypass_platform_checks } |
| 679 if (defined(invoker.testonly)) { testonly = invoker.testonly } | 684 if (defined(invoker.testonly)) { testonly = invoker.testonly } |
| 680 | 685 |
| 681 main_class = invoker.main_class | 686 main_class = invoker.main_class |
| 682 } | 687 } |
| 683 } | 688 } |
| 684 | 689 |
| 685 | 690 |
| 686 # Declare an java library target | 691 # Declare an java library target |
| 687 # | 692 # |
| 688 # Variables | 693 # Variables |
| (...skipping 13 matching lines...) Expand all Loading... |
| 702 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 707 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
| 703 # final jar. | 708 # final jar. |
| 704 # | 709 # |
| 705 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 710 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
| 706 # be used to remove unwanted parts of the library. | 711 # be used to remove unwanted parts of the library. |
| 707 # proguard_config: Path to the proguard config for preprocessing. | 712 # proguard_config: Path to the proguard config for preprocessing. |
| 708 # | 713 # |
| 709 # supports_android: If true, Android targets (android_library, android_apk) | 714 # supports_android: If true, Android targets (android_library, android_apk) |
| 710 # may depend on this target. Note: if true, this target must only use the | 715 # may depend on this target. Note: if true, this target must only use the |
| 711 # subset of Java available on Android. | 716 # subset of Java available on Android. |
| 712 # requires_android_platform: If true, this library may depend on | 717 # bypass_platform_checks: Disables checks about cross-platform (Java/Android) |
| 713 # android-specific targets. If this is the case, there should be some | 718 # dependencies for this target. This will allow depending on an |
| 714 # android-platform-like implementation available at runtime (Android, | 719 # android_library target, for example. |
| 715 # robolectric, etc). | |
| 716 # | 720 # |
| 717 # datadeps, testonly | 721 # datadeps, testonly |
| 718 # | 722 # |
| 719 # Example | 723 # Example |
| 720 # java_library("foo_java") { | 724 # java_library("foo_java") { |
| 721 # java_files = [ | 725 # java_files = [ |
| 722 # "org/chromium/foo/Foo.java", | 726 # "org/chromium/foo/Foo.java", |
| 723 # "org/chromium/foo/FooInterface.java", | 727 # "org/chromium/foo/FooInterface.java", |
| 724 # "org/chromium/foo/FooService.java", | 728 # "org/chromium/foo/FooService.java", |
| 725 # ] | 729 # ] |
| (...skipping 12 matching lines...) Expand all Loading... |
| 738 if (defined(invoker.DEPRECATED_java_in_dir)) { DEPRECATED_java_in_dir = invo
ker.DEPRECATED_java_in_dir } | 742 if (defined(invoker.DEPRECATED_java_in_dir)) { DEPRECATED_java_in_dir = invo
ker.DEPRECATED_java_in_dir } |
| 739 if (defined(invoker.chromium_code)) { chromium_code = invoker.chromium_code
} | 743 if (defined(invoker.chromium_code)) { chromium_code = invoker.chromium_code
} |
| 740 if (defined(invoker.datadeps)) { deps = invoker.datadeps } | 744 if (defined(invoker.datadeps)) { deps = invoker.datadeps } |
| 741 if (defined(invoker.deps)) { deps = invoker.deps } | 745 if (defined(invoker.deps)) { deps = invoker.deps } |
| 742 if (defined(invoker.jar_excluded_patterns)) { jar_excluded_patterns = invoke
r.jar_excluded_patterns } | 746 if (defined(invoker.jar_excluded_patterns)) { jar_excluded_patterns = invoke
r.jar_excluded_patterns } |
| 743 if (defined(invoker.java_files)) { java_files = invoker.java_files } | 747 if (defined(invoker.java_files)) { java_files = invoker.java_files } |
| 744 if (defined(invoker.proguard_config)) { proguard_config = invoker.proguard_c
onfig } | 748 if (defined(invoker.proguard_config)) { proguard_config = invoker.proguard_c
onfig } |
| 745 if (defined(invoker.proguard_preprocess)) { proguard_preprocess = invoker.pr
oguard_preprocess } | 749 if (defined(invoker.proguard_preprocess)) { proguard_preprocess = invoker.pr
oguard_preprocess } |
| 746 if (defined(invoker.srcjar_deps)) { srcjar_deps = invoker.srcjar_deps } | 750 if (defined(invoker.srcjar_deps)) { srcjar_deps = invoker.srcjar_deps } |
| 747 if (defined(invoker.srcjars)) { srcjars = invoker.srcjars } | 751 if (defined(invoker.srcjars)) { srcjars = invoker.srcjars } |
| 752 if (defined(invoker.bypass_platform_checks)) { bypass_platform_checks = invo
ker.bypass_platform_checks } |
| 748 if (defined(invoker.testonly)) { testonly = invoker.testonly } | 753 if (defined(invoker.testonly)) { testonly = invoker.testonly } |
| 749 if (defined(invoker.jar_path)) { jar_path = invoker.jar_path } | 754 if (defined(invoker.jar_path)) { jar_path = invoker.jar_path } |
| 750 | 755 |
| 751 if (defined(invoker.supports_android) && invoker.supports_android) { | 756 if (defined(invoker.supports_android) && invoker.supports_android) { |
| 752 supports_android = true | 757 supports_android = true |
| 753 } | 758 } |
| 754 if (defined(invoker.requires_android_platform) | |
| 755 && invoker.requires_android_platform) { | |
| 756 supports_android = true | |
| 757 requires_android = true | |
| 758 } | |
| 759 } | 759 } |
| 760 } | 760 } |
| 761 | 761 |
| 762 | 762 |
| 763 # Declare an java library target for a prebuilt jar | 763 # Declare an java library target for a prebuilt jar |
| 764 # | 764 # |
| 765 # Variables | 765 # Variables |
| 766 # deps: Specifies the dependencies of this target. Java targets in this list | 766 # deps: Specifies the dependencies of this target. Java targets in this list |
| 767 # will be added to the javac classpath. | 767 # will be added to the javac classpath. |
| 768 # jar_path: Path to the prebuilt jar. | 768 # jar_path: Path to the prebuilt jar. |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 } | 1493 } |
| 1494 | 1494 |
| 1495 # TODO(GYP): implement this. | 1495 # TODO(GYP): implement this. |
| 1496 template("uiautomator_test") { | 1496 template("uiautomator_test") { |
| 1497 if (defined(invoker.testonly)) { testonly = invoker.testonly } | 1497 if (defined(invoker.testonly)) { testonly = invoker.testonly } |
| 1498 assert(target_name != "") | 1498 assert(target_name != "") |
| 1499 assert(invoker.deps != [] || true) | 1499 assert(invoker.deps != [] || true) |
| 1500 group(target_name) { | 1500 group(target_name) { |
| 1501 } | 1501 } |
| 1502 } | 1502 } |
| OLD | NEW |