j256 / ormlite-android

ORMLite Android functionality used in conjunction with ormlite-core
http://ormlite.com/
ISC License
1.59k stars 367 forks source link

Do a more extensive search for the raw directory. Fixes #10. #11

Closed nhaarman closed 5 years ago

nhaarman commented 10 years ago

Gradle uses a different folder structure compared to Eclipse. This does a more extensive search for the raw folder.

j256 commented 10 years ago

Thanks for this @nhaarman. Seems like you've changed the support for the Eclipse way, no? Can you just add support for the build directory instead of removing existing support?

nhaarman commented 10 years ago

Not to my knowledge, no. The res folder in Eclipse is in the root folder, with the raw folder directly beneath it, right? This is basically a depth-first search, with a matching criteria of not being in a build folder, and where the folder name equals raw with a parent folder named res.

The only thing that could happen is there is another folder matching those criteria somewhere else, but I don't believe this is the case.

BraisGabin commented 10 years ago

The only thing that could happen is there is another folder matching those criteria somewhere else, but I don't believe this is the case.

If you are using flavours this case is possible.

A solution: count the number of */res/raw/. If there's only one use this one else throw an exception. What do you think?