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

Side by Side Diff: build/config/android/rules.gni

Issue 1317853006: GN: Make the wrapper script generated for junit work without extra args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//build/toolchain/toolchain.gni") 8 import("//build/toolchain/toolchain.gni")
9 import("//third_party/android_platform/config.gni") 9 import("//third_party/android_platform/config.gni")
10 import("//tools/grit/grit_rule.gni") 10 import("//tools/grit/grit_rule.gni")
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 } 789 }
790 790
791 # Declare a Java executable target 791 # Declare a Java executable target
792 # 792 #
793 # This target creates an executable from java code and libraries. The executable 793 # This target creates an executable from java code and libraries. The executable
794 # will be in the output folder's /bin/ directory. 794 # will be in the output folder's /bin/ directory.
795 # 795 #
796 # Variables 796 # Variables
797 # deps: Specifies the dependencies of this target. Java targets in this list 797 # deps: Specifies the dependencies of this target. Java targets in this list
798 # will be included in the executable (and the javac classpath). 798 # will be included in the executable (and the javac classpath).
799 #
800 # java_files: List of .java files included in this library. 799 # java_files: List of .java files included in this library.
801 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars 800 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars
802 # will be added to java_files and be included in this library. 801 # will be added to java_files and be included in this library.
803 # srcjars: List of srcjars to be included in this library, together with the 802 # srcjars: List of srcjars to be included in this library, together with the
804 # ones obtained from srcjar_deps. 803 # ones obtained from srcjar_deps.
805 #
806 # bypass_platform_checks: Disables checks about cross-platform (Java/Android) 804 # bypass_platform_checks: Disables checks about cross-platform (Java/Android)
807 # dependencies for this target. This will allow depending on an 805 # dependencies for this target. This will allow depending on an
808 # android_library target, for example. 806 # android_library target, for example.
809 #
810 # chromium_code: If true, extra analysis warning/errors will be enabled. 807 # chromium_code: If true, extra analysis warning/errors will be enabled.
811 # enable_errorprone: If true, enables the errorprone compiler. 808 # enable_errorprone: If true, enables the errorprone compiler.
809 # main_class: When specified, a wrapper script is created within
810 # $target_out_dir/bin to launch the binary with the given class as the
811 # entrypoint.
812 # wrapper_script_args: List of additional arguments for the wrapper script.
812 # 813 #
813 # data_deps, testonly 814 # data_deps, testonly
814 # 815 #
815 # Example 816 # Example
816 # java_binary("foo") { 817 # java_binary("foo") {
817 # java_files = [ "org/chromium/foo/FooMain.java" ] 818 # java_files = [ "org/chromium/foo/FooMain.java" ]
818 # deps = [ ":bar_java" ] 819 # deps = [ ":bar_java" ]
819 # main_class = "org.chromium.foo.FooMain" 820 # main_class = "org.chromium.foo.FooMain"
820 # } 821 # }
821 template("java_binary") { 822 template("java_binary") {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 # deps = [ ":bar_java" ] 854 # deps = [ ":bar_java" ]
854 # } 855 # }
855 template("junit_binary") { 856 template("junit_binary") {
856 set_sources_assignment_filter([]) 857 set_sources_assignment_filter([])
857 858
858 java_binary(target_name) { 859 java_binary(target_name) {
859 deps = [] 860 deps = []
860 forward_variables_from(invoker, "*") 861 forward_variables_from(invoker, "*")
861 bypass_platform_checks = true 862 bypass_platform_checks = true
862 main_class = "org.chromium.testing.local.JunitTestMain" 863 main_class = "org.chromium.testing.local.JunitTestMain"
864 wrapper_script_args = [
865 "-test-jars",
866 "$target_name.jar",
867 ]
863 testonly = true 868 testonly = true
864 869
865 deps += [ 870 deps += [
866 "//testing/android/junit:junit_test_support", 871 "//testing/android/junit:junit_test_support",
867 "//third_party/junit", 872 "//third_party/junit",
868 "//third_party/mockito:mockito_java", 873 "//third_party/mockito:mockito_java",
869 "//third_party/robolectric:robolectric_java", 874 "//third_party/robolectric:robolectric_java",
870 "//third_party/robolectric:android-all-4.3_r2-robolectric-0", 875 "//third_party/robolectric:android-all-4.3_r2-robolectric-0",
871 ] 876 ]
872 } 877 }
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 2010
2006 # TODO(GYP): implement this. 2011 # TODO(GYP): implement this.
2007 template("uiautomator_test") { 2012 template("uiautomator_test") {
2008 set_sources_assignment_filter([]) 2013 set_sources_assignment_filter([])
2009 forward_variables_from(invoker, [ "testonly" ]) 2014 forward_variables_from(invoker, [ "testonly" ])
2010 assert(target_name != "") 2015 assert(target_name != "")
2011 assert(invoker.deps != [] || true) 2016 assert(invoker.deps != [] || true)
2012 group(target_name) { 2017 group(target_name) {
2013 } 2018 }
2014 } 2019 }
OLDNEW
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698