| Index: build/config/android/internal_rules.gni
 | 
| diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
 | 
| index 37727692965b6eb46ec368d23ab3bd5223129ca7..47787059983844577e8bd21b5d617785b3ab18a7 100644
 | 
| --- a/build/config/android/internal_rules.gni
 | 
| +++ b/build/config/android/internal_rules.gni
 | 
| @@ -15,6 +15,7 @@ android_sdk_jar = "$android_sdk/android.jar"
 | 
|  rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir)
 | 
|  
 | 
|  template("android_lint") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -62,6 +63,7 @@ template("android_lint") {
 | 
|  }
 | 
|  
 | 
|  template("dex") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -113,6 +115,7 @@ template("dex") {
 | 
|  # Creates a zip archive of the inputs.
 | 
|  # If base_dir is provided, the archive paths will be relative to it.
 | 
|  template("zip") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -155,6 +158,7 @@ template("zip") {
 | 
|  # See build/android/gyp/write_build_config.py and
 | 
|  # build/android/gyp/util/build_utils.py:ExpandFileArgs
 | 
|  template("write_build_config") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -288,6 +292,7 @@ template("write_build_config") {
 | 
|  }
 | 
|  
 | 
|  template("process_java_prebuilt") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -375,6 +380,7 @@ template("process_java_prebuilt") {
 | 
|  # Packages resources, assets, dex, and native libraries into an apk. Signs and
 | 
|  # zipaligns the apk.
 | 
|  template("create_apk") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -554,6 +560,7 @@ template("create_apk") {
 | 
|  }
 | 
|  
 | 
|  template("java_prebuilt_impl") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -633,6 +640,7 @@ template("java_prebuilt_impl") {
 | 
|  #   jar_path: Use this to explicitly set the output jar path. Defaults to
 | 
|  #     "${target_gen_dir}/${target_name}.jar.
 | 
|  template("compile_java") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -733,6 +741,7 @@ template("compile_java") {
 | 
|  }
 | 
|  
 | 
|  template("java_library_impl") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -916,6 +925,7 @@ template("java_library_impl") {
 | 
|  
 | 
|  # Runs process_resources.py
 | 
|  template("process_resources") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -1006,6 +1016,7 @@ template("process_resources") {
 | 
|  }
 | 
|  
 | 
|  template("copy_ex") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    if (defined(invoker.testonly)) {
 | 
|      testonly = invoker.testonly
 | 
|    }
 | 
| @@ -1053,6 +1064,7 @@ template("copy_ex") {
 | 
|  
 | 
|  # Produces a single .dex.jar out of a set of Java dependencies.
 | 
|  template("deps_dex") {
 | 
| +  set_sources_assignment_filter([])
 | 
|    build_config = "$target_gen_dir/${target_name}.build_config"
 | 
|    write_build_config("${target_name}__build_config") {
 | 
|      type = "deps_dex"
 | 
| 
 |