| 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 | 6 |
| 7 | 7 |
| 8 # Write the target's .build_config file. This is a json file that contains a | 8 # Write the target's .build_config file. This is a json file that contains a |
| 9 # dictionary of information about how to build this target (things that | 9 # dictionary of information about how to build this target (things that |
| 10 # require knowledge about this target's dependencies and cannot be calculated | 10 # require knowledge about this target's dependencies and cannot be calculated |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 # If base_dir is provided, the archive paths will be relative to it. | 65 # If base_dir is provided, the archive paths will be relative to it. |
| 66 template("zip") { | 66 template("zip") { |
| 67 assert(defined(invoker.inputs)) | 67 assert(defined(invoker.inputs)) |
| 68 assert(defined(invoker.output)) | 68 assert(defined(invoker.output)) |
| 69 | 69 |
| 70 rebase_inputs = rebase_path(invoker.inputs, root_build_dir) | 70 rebase_inputs = rebase_path(invoker.inputs, root_build_dir) |
| 71 rebase_output = rebase_path(invoker.output, root_build_dir) | 71 rebase_output = rebase_path(invoker.output, root_build_dir) |
| 72 action(target_name) { | 72 action(target_name) { |
| 73 script = "//build/android/gn/zip.py" | 73 script = "//build/android/gn/zip.py" |
| 74 depfile = "$target_gen_dir/$target_name.d" | 74 depfile = "$target_gen_dir/$target_name.d" |
| 75 source_prereqs = invoker.inputs | 75 inputs = invoker.inputs |
| 76 outputs = [ | 76 outputs = [ |
| 77 depfile, | 77 depfile, |
| 78 invoker.output | 78 invoker.output |
| 79 ] | 79 ] |
| 80 args = [ | 80 args = [ |
| 81 "--depfile", rebase_path(depfile, root_build_dir), | 81 "--depfile", rebase_path(depfile, root_build_dir), |
| 82 "--inputs=$rebase_inputs", | 82 "--inputs=$rebase_inputs", |
| 83 "--output=$rebase_output", | 83 "--output=$rebase_output", |
| 84 ] | 84 ] |
| 85 if (defined(invoker.base_dir)) { | 85 if (defined(invoker.base_dir)) { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 system_jars = [ "${android_sdk}/android.jar" ] | 145 system_jars = [ "${android_sdk}/android.jar" ] |
| 146 action("${target_name}__javac") { | 146 action("${target_name}__javac") { |
| 147 script = "//build/android/gyp/javac.py" | 147 script = "//build/android/gyp/javac.py" |
| 148 depfile = "$target_gen_dir/$target_name.d" | 148 depfile = "$target_gen_dir/$target_name.d" |
| 149 outputs = [ | 149 outputs = [ |
| 150 depfile, | 150 depfile, |
| 151 jar_path, | 151 jar_path, |
| 152 jar_path + ".md5.stamp" | 152 jar_path + ".md5.stamp" |
| 153 ] | 153 ] |
| 154 sources = java_files + java_srcjars | 154 sources = java_files + java_srcjars |
| 155 source_prereqs = system_jars + [ build_config ] | 155 inputs = system_jars + [ build_config ] |
| 156 | 156 |
| 157 rebase_system_jars = rebase_path(system_jars, root_build_dir) | 157 rebase_system_jars = rebase_path(system_jars, root_build_dir) |
| 158 rebase_java_srcjars = rebase_path(java_srcjars, root_build_dir) | 158 rebase_java_srcjars = rebase_path(java_srcjars, root_build_dir) |
| 159 rebase_build_config = rebase_path(build_config, root_build_dir) | 159 rebase_build_config = rebase_path(build_config, root_build_dir) |
| 160 rebase_depfile = rebase_path(depfile, root_build_dir) | 160 rebase_depfile = rebase_path(depfile, root_build_dir) |
| 161 args = [ | 161 args = [ |
| 162 "--depfile=$rebase_depfile", | 162 "--depfile=$rebase_depfile", |
| 163 "--classpath=$rebase_system_jars", | 163 "--classpath=$rebase_system_jars", |
| 164 "--classpath=@($rebase_build_config:javac:classpath)", | 164 "--classpath=@($rebase_build_config:javac:classpath)", |
| 165 "--jar-path=$rebase_jar_path", | 165 "--jar-path=$rebase_jar_path", |
| (...skipping 11 matching lines...) Expand all Loading... |
| 177 | 177 |
| 178 rebase_jar_toc_path = rebase_path(jar_toc_path, root_build_dir) | 178 rebase_jar_toc_path = rebase_path(jar_toc_path, root_build_dir) |
| 179 action("${target_name}__jar_toc") { | 179 action("${target_name}__jar_toc") { |
| 180 script = "//build/android/gyp/jar_toc.py" | 180 script = "//build/android/gyp/jar_toc.py" |
| 181 depfile = "$target_gen_dir/$target_name.d" | 181 depfile = "$target_gen_dir/$target_name.d" |
| 182 outputs = [ | 182 outputs = [ |
| 183 depfile, | 183 depfile, |
| 184 jar_toc_path, | 184 jar_toc_path, |
| 185 jar_toc_path + ".md5.stamp" | 185 jar_toc_path + ".md5.stamp" |
| 186 ] | 186 ] |
| 187 source_prereqs = [ jar_path ] | 187 inputs = [ jar_path ] |
| 188 args = [ | 188 args = [ |
| 189 "--depfile", rebase_path(depfile, root_build_dir), | 189 "--depfile", rebase_path(depfile, root_build_dir), |
| 190 "--jar-path=${rebase_jar_path}", | 190 "--jar-path=${rebase_jar_path}", |
| 191 "--toc-path=${rebase_jar_toc_path}", | 191 "--toc-path=${rebase_jar_toc_path}", |
| 192 ] | 192 ] |
| 193 } | 193 } |
| 194 | 194 |
| 195 group(target_name) { | 195 group(target_name) { |
| 196 deps = [ | 196 deps = [ |
| 197 ":${target_name}__javac", | 197 ":${target_name}__javac", |
| (...skipping 27 matching lines...) Expand all Loading... |
| 225 | 225 |
| 226 # TODO(cjhopman): lint | 226 # TODO(cjhopman): lint |
| 227 # TODO(cjhopman): dex | 227 # TODO(cjhopman): dex |
| 228 | 228 |
| 229 group(target_name) { | 229 group(target_name) { |
| 230 deps = [ | 230 deps = [ |
| 231 ":${target_name}__java_library" | 231 ":${target_name}__java_library" |
| 232 ] | 232 ] |
| 233 } | 233 } |
| 234 } | 234 } |
| OLD | NEW |