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

Side by Side Diff: build/android/BUILD.gn

Issue 2447413003: Write out useful Android GN vars in a non-gradle-specific form. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | build/android/gradle/generate_gradle.py » ('j') | 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("//build/config/android/rules.gni") 5 import("//build/config/android/rules.gni")
6 6
7 if (enable_java_templates) { 7 if (enable_java_templates) {
8 import("//third_party/ijar/ijar.gni") 8 import("//third_party/ijar/ijar.gni")
9 9
10 sun_tools_jar_path = "$root_gen_dir/sun_tools_jar/tools.jar" 10 sun_tools_jar_path = "$root_gen_dir/sun_tools_jar/tools.jar"
(...skipping 23 matching lines...) Expand all
34 java_prebuilt("sun_tools_java") { 34 java_prebuilt("sun_tools_java") {
35 jar_path = sun_tools_jar_path 35 jar_path = sun_tools_jar_path
36 jar_dep = ":find_sun_tools_jar" 36 jar_dep = ":find_sun_tools_jar"
37 } 37 }
38 38
39 generate_interface_jar("android_ijar") { 39 generate_interface_jar("android_ijar") {
40 input_jar = android_sdk_jar 40 input_jar = android_sdk_jar
41 output_jar = "$root_out_dir/lib.java/android.interface.jar" 41 output_jar = "$root_out_dir/lib.java/android.interface.jar"
42 } 42 }
43 43
44 _rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir) 44 # Write to a file some GN vars that are useful to scripts that use the output
45 45 # directory. Format is chosen as easliy importable by both python and bash.
46 # Record GN vars that are needed by generate_gradle.py.
47 # One statement per-line to make GN's formatter leave it alone.
48 CR = "$0x0A" 46 CR = "$0x0A"
49 _json = "{$CR" 47 _data = ""
50 _json += " \"android_sdk_root\": \"$_rebased_android_sdk_root\",$CR" 48 _data += "android_sdk_build_tools=" +
51 _json += " \"compile_sdk_version\": \"$android_sdk_version\",$CR" 49 rebase_path(android_sdk_build_tools, root_build_dir) + CR
52 _json += " \"build_tools_version\": \"$android_sdk_build_tools_version\"$CR" 50 _data += "android_sdk_build_tools_version=$android_sdk_build_tools_version$CR"
53 _json += "}$CR" 51 _data +=
54 write_file("$root_build_dir/gradle/config.json", _json) 52 "android_sdk_root=" + rebase_path(android_sdk_root, root_build_dir) + CR
53 _data += "android_sdk_version=$android_sdk_version$CR"
54 write_file("$root_build_dir/build_vars.txt", _data)
55 } 55 }
56 56
57 # Copy to the lib.unstripped directory so that gdb can easily find it. 57 # Copy to the lib.unstripped directory so that gdb can easily find it.
58 copy("cpplib_unstripped") { 58 copy("cpplib_unstripped") {
59 _soname = "libc++_shared.so" 59 _soname = "libc++_shared.so"
60 sources = [ 60 sources = [
61 "${android_libcpp_lib_dir}/${_soname}", 61 "${android_libcpp_lib_dir}/${_soname}",
62 ] 62 ]
63 outputs = [ 63 outputs = [
64 "${root_out_dir}/lib.unstripped/${_soname}", 64 "${root_out_dir}/lib.unstripped/${_soname}",
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 _target_name = get_path_info(script, "name") + "_wrapper" 146 _target_name = get_path_info(script, "name") + "_wrapper"
147 _wrapper_targets += [ ":$_target_name" ] 147 _wrapper_targets += [ ":$_target_name" ]
148 wrapper_script(_target_name) { 148 wrapper_script(_target_name) {
149 target = script 149 target = script
150 } 150 }
151 } 151 }
152 152
153 group("wrapper_scripts") { 153 group("wrapper_scripts") {
154 deps = _wrapper_targets 154 deps = _wrapper_targets
155 } 155 }
OLDNEW
« no previous file with comments | « no previous file | build/android/gradle/generate_gradle.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698