Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirah source files included in Android package #15

Closed
sattvik opened this issue Apr 6, 2011 · 4 comments
Closed

Mirah source files included in Android package #15

sattvik opened this issue Apr 6, 2011 · 4 comments
Assignees
Labels
Milestone

Comments

@sattvik
Copy link
Contributor

sattvik commented Apr 6, 2011

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.

@zapnap
Copy link
Contributor

zapnap commented Apr 8, 2011

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.

@abscondment
Copy link
Contributor

We should try to make use of ANDROID_AAPT_IGNORE instead:

https://android.googlesource.com/platform/frameworks/base/+/90897ed87bce639bf6bb2ccf15fbabb59b131bab

@ghost ghost assigned AtomicPair Nov 20, 2013
@AtomicPair
Copy link
Contributor

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.

@AtomicPair
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants