Android Eclipse - How to share an assets folder? -
i have number of different android applications building in eclipse / adt share common code , assets. sharing common source code folder easy can use link source
in build path set-up. works great.
these programs share content that's in assets folder. @ moment i'm duplicating, bit inelegant , error-prone.
is trivially possible tell eclipse / adt use common assets folder in similar way trivial have share source code folder? can't find similar option or tool.
notes:
i not looking 'library' solution (indeed seems fraught issues anyway, , did try , hit issues this one). in case that's less relevant assets, , i'm looking simplicity.
it doesn't matter if shared assets folder has contain superset of needs of applications.
assets. not "resources".
i'm using adt version 22.2
for many complex reasons, symbolically linking folders not suffice. (you not want know details. you'd never believe them anyway.)
sharing common source code folder easy can use link source in build path set-up
i not count on working on long haul.
at moment i'm duplicating, bit inelegant , error-prone.
alas, given other restrictions, suspect option, though take steps reduce error-prone aspect (e.g., script synchronized contents).
long-term, gradle android 1 true answer builds, eclipse included. @ point, expect "link source" break. however, @ time, should able cut on gradle builds.
gradle allows developers override default locations of sorts of directories, including assets directory. should able set build.gradle
file points common location assets directory, overriding default location looks inside project itself.
it's unclear why think symlinks/hardlinks not work stopgap measure. might wish consider asking separate stackoverflow question, explaining have tried , problems encountered technique, whether think believe them or not.
bear in mind while eclipse handles javac
step android build, else largely handled external tools (e.g., aapt
). oblivious things exist solely in eclipse-land. conversely, that's why symlinks/hardlinks should work, standpoint of tools, such items should treated same actual files in filesystem. hence, reason why "link source" works not because android supports it, android presently delegates 1 piece of build eclipse itself. once google adds gradle android support eclipse (which hope before end of 2014), expect eclipse cut out of build process, , expect "link source" fail @ point.
Comments
Post a Comment