Index: components/url_formatter/url_formatter.gyp |
diff --git a/components/url_formatter/url_formatter.gyp b/components/url_formatter/url_formatter.gyp |
index 9375e96d93dd15e63ddf362c0edc5b3452a9e1b3..c5ad043e8bfd8093bc10a4c0ecc0924cbc5efc9f 100644 |
--- a/components/url_formatter/url_formatter.gyp |
+++ b/components/url_formatter/url_formatter.gyp |
@@ -17,12 +17,16 @@ |
], |
'sources': [ |
# Note: sources list duplicated in GN build. |
+ 'android/component_jni_registrar.cc', |
+ 'android/component_jni_registrar.h', |
'elide_url.cc', |
'elide_url.h', |
'url_fixer.cc', |
'url_fixer.h', |
'url_formatter.cc', |
'url_formatter.h', |
+ 'url_formatter_android.cc', |
+ 'url_formatter_android.h', |
], |
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
'msvs_disabled_warnings': [4267, ], |
@@ -31,9 +35,50 @@ |
['OS != "android"', { |
'dependencies': [ |
'../../ui/gfx/gfx.gyp:gfx', |
+ ], |
+ 'sources!': [ |
+ 'android/component_jni_registrar.cc', |
+ 'android/component_jni_registrar.h', |
+ 'url_formatter_android.cc', |
+ 'url_formatter_android.h', |
+ ] |
+ }], |
+ ['OS == "android"', { |
+ 'dependencies': [ |
+ 'url_formatter_jni_headers', |
] |
}], |
], |
}, |
], |
+ 'conditions': [ |
+ ['OS == "android"', { |
+ 'targets' : [ |
+ { |
+ # GN: //components/url_formatter/android:jni_headers |
+ 'target_name' : 'url_formatter_jni_headers', |
+ 'type': 'none', |
+ 'sources': [ |
+ 'android/java/src/org/chromium/components/url_formatter/UrlFormatter.java', |
+ ], |
+ 'variables': { |
+ 'jni_gen_package': 'url_formatter', |
+ }, |
+ 'includes': [ '../../build/jni_generator.gypi' ], |
+ }, |
+ { |
+ # GN: //components/url_formatter/android:url_formatter_java |
+ 'target_name': 'url_formatter_java', |
+ 'type': 'none', |
+ 'dependencies': [ |
+ '../../base/base.gyp:base_java', |
+ ], |
+ 'variables': { |
+ 'java_in_dir': 'android/java', |
+ }, |
+ 'includes': [ '../../build/java.gypi' ], |
+ }, |
+ ], |
+ }], |
+ ], |
} |