androidandroid-studioresourcesprojectartwork

Android Projects: Organize Artwork and Sound with Version control


I've been working with Android for quite some time, yet I have never seen any good explanations for this issue.

I'm working on an app with a number of artwork and sound files. Many of these files are temporary, are base files that future work will evolve from, or are large versions that will be split into multiple files later. I want to keep them under version control with this project, and I'd like to keep everything in the same place on my hard drive.

But I don't want these "work" files to end up in my apk. They are often huge and have nothing to do with the final product.

For most of my life (ie, before Android), I would simply have a subdirectory within my project called art_work_files. And this directory would be subdivided into all the various tasks. And git is fine with this, especially for SVG files (it even properly notes differences and changes).

But when I put these files in my Android Studio project, I get concerned that the AS will think these are somehow important and keep references to them--possibly even adding them to jar or apk files.

Yes, I realize that the final versions of the art needs to go in the res/drawing/ directories (and similar for sound and other resources). And I'm happy to do this final copy.

Am I over-thinking this, or is there a better way to organize and still keep Android Studio happy?


Solution

  • Since no one has answered this question in 7 months, I'll submit my solution.

    I have created a directory under the main directectory (same level as java and res) called assets. Git recognizes this directory and will notice any files that are added, removed, or changed. I'm fine with using git to handle binaries btw.

    For each type of asset, I make another subdirectory. Here's what it looks like:

    app ->
        libs
        src ->
            main ->
                assets ->
                    font
                    ogg
                    png
                    svg
                java
                res
    ...
    

    This seems to work fine and keeps everyone happy. I'm still curious how other people do this; I welcome your comments and answers.