infinitered / bluepotion

Like RedPotion, but for Android
MIT License
74 stars 18 forks source link

Include .java files in the gemspec #91

Closed darinwilson closed 9 years ago

darinwilson commented 9 years ago

We wouldn't want to lose our lovely Java hacks in the generated gem file...

GantMan commented 9 years ago

woah :cat:

jamonholmgren commented 9 years ago

Can you write Java files and then just include them in app.files like that?

darinwilson commented 9 years ago

@jamonholmgren Yep - if you have a .java file next to a .rb file of the same name, the contents of the .java file are dumped into the Java class that RM creates for your Ruby class.

http://www.rubymotion.com/developers/guides/manuals/android/project-management/#_extending_classes_with_java

This is a necessary evil for cases where bridgesupport does the wrong thing, or if you have to override constructors.

GantMan commented 9 years ago

For a moment there, I thought this was the ability to include raw .java. Yes I remember this... it's a necessary evil.

I spoke with Joffrey recently, and he'll be working in a way to include .java files via gradle soon.

jamonholmgren commented 9 years ago

That's interesting, @darinwilson . You can also include other methods, not just constructors?

darinwilson commented 9 years ago

Yep - it can be anything. It's just copied wholesale into the generated Java class.

darinwilson commented 9 years ago

So, who do you have to know to get a merge around this place? ;)

skellock commented 9 years ago

Sorry Darin.