mirah/pindah

Mirah source files included in Android package

sattvik opened this issue · 4 comments

Since Pindah relies on Mirah source files being in the same directory as Android expects Java sources, Android will package any non-Java source files in that directory into the apk file. Off-hand, there are two ways to resolve this:

  1. Split Java/Mirah sources into different directories, such as 'src/java' and 'src/mirah'. This would presumably break existing projects, unless some backward-compatibility code were introduced.
  2. Add a step after packaging but before aligning/signing that removes any *.mirah files in the apk.

I can contribute a patch if there is a preference for one of these solutions.

Good point. I think I like the src/ option, but it would be a breaking change. On the other hand we're early along enough now that it'd be a better time to do it than later. Perhaps it could default to looking for top-level package names in src/ if neither a src/java or src/mirah directory is found.

Hi, @sattvik. Sorry it's taken so long to get you a response on this!

Personally, I'm not against the idea of having split source directories, although I share the concern that it would likely break existing projects without the addition of some deprecation and transitional support code.

Given then choice, I would prefer @abscondment's solution of using the ANDROID_AAPT_IGNORE variable to exclude these source files. Simple, straightforward, and easily supported within our custom build process.

What do you guys think? If there are no objections to the contrary, I'll close this issue, the related pull request, and open a separate issue to add the AAPT_IGNORE variable into the upcoming 0.1.3 release.

Closing this one for now and opening a separate issue for the ANDROID_AAPT_IGNORE solution. If the need for this solution arises in the future, or if anyone has any further input, please open a new issue and/or pull request.