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

Unified Diff: components/cronet.gypi

Issue 344793006: Generate Cronet Version.java based on VERSION and LASTCHANGE files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Matt's comments. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/cronet/android/java/src/org/chromium/net/HttpUrlConnectionUrlRequestFactory.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet.gypi
diff --git a/components/cronet.gypi b/components/cronet.gypi
index 9a8f3ec34b1d3d9d69c2169826e7e5f3d3fc30c8..3a011d5b8cca2e04f083eed671e22681afe18c01 100644
--- a/components/cronet.gypi
+++ b/components/cronet.gypi
@@ -56,6 +56,41 @@
'includes': [ '../build/android/java_cpp_template.gypi' ],
},
{
+ 'target_name': 'cronet_version',
+ 'type': 'none',
+ # Because cronet_version generates a header, we must set the
+ # hard_dependency flag.
+ 'hard_dependency': 1,
+ 'actions': [
+ {
+ 'action_name': 'cronet_version',
+ 'variables': {
+ 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
+ 'version_py_path': '<(DEPTH)/build/util/version.py',
+ 'version_path': '<(DEPTH)/chrome/VERSION',
+ 'template_input_path': 'cronet/android/java/src/org/chromium/net/Version.template',
+ },
+ 'inputs': [
+ '<(template_input_path)',
+ '<(version_path)',
+ '<(lastchange_path)',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/templates/org/chromium/cronet/Version.java',
+ ],
+ 'action': [
+ 'python',
+ '<(version_py_path)',
+ '-f', '<(version_path)',
+ '-f', '<(lastchange_path)',
+ '<(template_input_path)',
+ '<@(_outputs)',
+ ],
+ 'message': 'Generating version information',
+ },
+ ],
+ },
+ {
'target_name': 'libcronet',
'type': 'shared_library',
'dependencies': [
@@ -68,6 +103,7 @@
'cronet_url_request_context_config_list',
'cronet_url_request_error_list',
'cronet_url_request_priority_list',
+ 'cronet_version',
'../net/net.gyp:net',
],
'sources': [
@@ -88,8 +124,6 @@
'cronet/android/url_request_peer.h',
],
'cflags': [
- # TODO(mef): Figure out a good way to get version from chrome_version_info_posix.h.
- '-DCHROMIUM_VERSION=\\"TBD\\"',
'-DLOGGING=1',
'-fdata-sections',
'-ffunction-sections',
« no previous file with comments | « no previous file | components/cronet/android/java/src/org/chromium/net/HttpUrlConnectionUrlRequestFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698