summaryrefslogtreecommitdiffstats
path: root/content/content.gyp
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-01 23:12:33 +0000
committercjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-01 23:12:33 +0000
commitb50a8b536ce7f2707293966deee3d2816c773392 (patch)
tree0d794ed9f79d49c8e5f6f7ce1495e2c131663725 /content/content.gyp
parent043e41762215cd4c6d93880d6c381adcd9e818aa (diff)
downloadchromium_src-b50a8b536ce7f2707293966deee3d2816c773392.zip
chromium_src-b50a8b536ce7f2707293966deee3d2816c773392.tar.gz
chromium_src-b50a8b536ce7f2707293966deee3d2816c773392.tar.bz2
Make the build control what library(/ies) to load
At build time, we know what native libraries an apk needs to load. Instead of requiring those .apks to specify this again in code, instead generate a .java file containing a list of the libraries to load. This is done using a pattern similar to resources, content_java is built with a placeholder NativeLibraries.java (i.e. without an actual value for its libraries list). The corresponding .class file is not included in content_java.jar. Then, when building an apk we generate the "real" NativeLibraries.java (with the real String[]) and include that in the .apk. This is designed to also support the component build, where, we will have to calculate the list of libraries at build time, and sort them in dependency order (because Android's linker, for some reason, doesn't do that itself). BUG=158821 TBR=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/12939021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/content.gyp')
-rw-r--r--content/content.gyp17
1 files changed, 17 insertions, 0 deletions
diff --git a/content/content.gyp b/content/content.gyp
index 1068b7e..6f7104f 100644
--- a/content/content.gyp
+++ b/content/content.gyp
@@ -301,6 +301,21 @@
'includes': [ '../build/java_aidl.gypi' ],
},
{
+ 'target_name': 'content_native_libraries_gen',
+ 'type': 'none',
+ 'sources': [
+ 'public/android/java/templates/NativeLibraries.template',
+ ],
+ 'variables': {
+ 'package_name': 'org/chromium/content/app',
+ 'include_path': 'public/android/java/templates',
+ 'template_deps': [
+ 'public/android/java/templates/native_libraries_array.h'
+ ],
+ },
+ 'includes': [ '../build/android/java_cpp_template.gypi' ],
+ },
+ {
'target_name': 'content_java',
'type': 'none',
'dependencies': [
@@ -312,9 +327,11 @@
'content_common',
'page_transition_types_java',
'result_codes_java',
+ 'content_native_libraries_gen',
],
'variables': {
'java_in_dir': '../content/public/android/java',
+ 'jar_excluded_classes': [ '*/NativeLibraries.class' ],
'has_java_resources': 1,
'R_package': 'org.chromium.content',
'R_package_relpath': 'org/chromium/content',