HipByte / Flow

Cross-platform libraries for RubyMotion
BSD 2-Clause "Simplified" License
141 stars 29 forks source link

fix android resources directory problem #64

Closed hasumikin closed 7 years ago

hasumikin commented 7 years ago

I think this PR will resolve this issue https://github.com/HipByte/Flow/issues/36

lrz commented 7 years ago

I think we need to do that in case Flow is required from a regular RubyMotion Android project (and not a Flow project, using the flow template).

hasumikin commented 7 years ago

@lrz As far as I see the source code of Flow, I could not find a reasonable mechanism to distinguish whether it is a Flow project or not.

I think independent android projects can have work around in Rakefile like this:

  ...
  app.assets_dirs.delete('resources')
  app.resources_dirs << './resources'
  ...

and it is possible to print an instruction about editing Rakefile like above after bundle install. please tell me what do you think.

lrz commented 7 years ago

It looks like we are able to detect this in lib/motion-flow.rb, perhaps we could set a global variable there before requiring the lib/android.rb file?

hasumikin commented 7 years ago

@lrz let me study for a while. I will send new PR if it goes well. thank you