Should I include RL as a git submodule in my Flex project? If so, how?

kimcity's Avatar

kimcity

16 Apr, 2012 02:15 AM

I have a github account.

I have used git submodule for web projects involving PHP.

I find this easy to bring in other github repo and update the code easily, making my web projects easier to maintain.

I feel like doing the same for RL.

Should I include RL as a git submodule in my brand new Flex project?

if so, how? I have never done git submodule in a Flex project before.

Please advise.

  1. Support Staff 1 Posted by creynders on 16 Apr, 2012 07:16 AM

    creynders's Avatar

    There's no real difference between adding a git submodule to a RL or Flex project than to a PHP one. Only thing you have to do is add the RL src directory as a source directory to the Flex project, through Project Properties>Actionscript Build Path>Source Path>Add folder
    And I'm not sure whether this is still necessary but previously you needed to add this to your compiler options
    -keep-as3-metadata+=Inject -keep-as3-metadata+=PostConstruct in Project Proeprties>Actionscript Compiler>Additional compiler arguments

  2. 2 Posted by kimcity on 16 Apr, 2012 07:25 AM

    kimcity's Avatar

    Hi creynders,

    I do not quite understand your explanation.

    Here is an example. https://github.com/simkimsia/DragDropDemo-in-AIR

    I have the swc for v1.5.2 RL inside the libs folder.

    I used the examples in the book for the MosaicApp as reference and wrote code in the src folder.

    How do I add this https://github.com/robotlegs/robotlegs-framework as a submodule?

  3. Support Staff 3 Posted by creynders on 17 Apr, 2012 07:41 AM

    creynders's Avatar
    • remove the .swc from libs
    • git submodule add https://github.com/robotlegs/robotlegs-framework.git vendor/robotlegs will install the RL source in a directory vendor/robotlegs
    • cd vendor/robotlegs
    • git checkout master

    And then add vendor/robotlegs/src as a source directory to your project as I described in the previous post

  4. 4 Posted by kimcity on 17 Apr, 2012 07:44 AM

    kimcity's Avatar

    Thank you, will try now.

    Regards
    KimSia
    金城

  5. 5 Posted by kimcity on 17 Apr, 2012 07:55 AM

    kimcity's Avatar

    I have only made local commits based on your recommendations.

    Have not pushed these changes to the remote github repo.

    I am getting errors about the base class Reflector.

    See the screenshot here. http://cl.ly/FtOk

  6. Support Staff 6 Posted by creynders on 17 Apr, 2012 08:30 AM

    creynders's Avatar

    Ah, yes, you'll have to add swiftsuspenders as gitmodule too.
    https://github.com/tschneidereit/SwiftSuspenders

    Just follow the same steps as with the RL repo, but use branch the-past instead of master

  7. 7 Posted by kimcity on 17 Apr, 2012 09:04 AM

    kimcity's Avatar

    Hi creynders,

    it worked! Thank you!!

    So basically the code that I have in my own src... I can organize it however I want, right?

    I can even rename them to org.whatevertheheckiwant.controller.bootstrap.BootstrapClasses.as

    etc.

    Yes?

  8. Support Staff 8 Posted by creynders on 17 Apr, 2012 10:21 AM

    creynders's Avatar

    Yes, absolutely.

  9. Ondina D.F. closed this discussion on 24 Apr, 2012 12:51 PM.

  10. kimcity re-opened this discussion on 27 Apr, 2012 12:36 AM

  11. 9 Posted by kimcity on 27 Apr, 2012 12:36 AM

    kimcity's Avatar

    Thank you creynders!!

  12. Ondina D.F. closed this discussion on 28 Jun, 2012 09:14 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac