Open rafaeliga opened 8 years ago
The easy way would just be to use motion-gradle
for Flow. We wanted Flow to be very easy to get started, so I would prefer not.
We could try to be smarter and detect if motion-gradle is in the project and if the gradle dependencies include support-v4, would be something like:
unless app.respond_to?(:gradle) && gradle.dependencies.map(&:name).include?("support-v4")
vendor_dir = File.join(File.dirname(__FILE__), '../vendor/android')
v7_app_compat_dir = File.join(vendor_dir, 'support/v7/appcompat')
app.vendor_project(:jar => File.join(v7_app_compat_dir, "/libs/android-support-v4.jar"))
app.vendor_project(:jar => File.join(v7_app_compat_dir, "/libs/android-support-v7-appcompat.jar"), :resources => File.join(v7_app_compat_dir, "/res"), :manifest => File.join(v7_app_compat_dir, "/AndroidManifest.xml"))
end
That sounds good!
Thanks for your fast answer.
Do I need to create a pull request with this or will probably be include in a next release? :D
happy to merge a PR if you get something working
The first part works "unless app.respond_to?(:gradle)", but the second didnt, because on that moment my code that adds the gradle dependencies wasnt executed yet, is that right?
I can create a Pull request only with the respond_to, but Im sure if that is correct.
yeah... was afraid of this, we need to figure out a solution to this :)
I don't have time to dig this for now, maybe using motion-gradle
for flow would be the best solution.
Got it.
Im going to create a pull request with that.
Thanks!
Is there a way to remove android-support-v* from default config?
My project needs motion-gradle support and I want to keep everything there, using gradle.
These are the lines that I needed to remove from default android project file:
I tried to find a way to just clean the vendor_projects array but it seems not possible with motion.