crosswalk-project/crosswalk — pull request #1637 by wang16 (2014-02-26 05:58:18+00:00)
Title: [Android] Determine id for resources in chromium at runtime

In chromium, there are two java target contains resources.
They are org.chromium.content.R and org.chromium.ui.R. The
R.java of these two package in chromium repo are just a
declaration with no ids specified.

In chromium's gyp system, it is handled well to make sure the
ids are unique for each resource.

If xwalk core is used as an Android library project. All the
resources will be only counted in org.xwalk.core.R. Previously,
we added an additional step running as pre-compile to copy
org.xwalk.core.R to org.chromium.content and org.chromium.ui to
make the ids correct.

Now we want to expose a set of embedding API based on xwalk core
library, which will be an Android library project used by multiple
projects. The original way is not appropriate any more.

The new solution is to set the ids at runtime by using java
reflection to iterate over chromium resources.

BUG=https://crosswalk-project.org/jira/browse/XWALK-1042