Flash Builder has built in support for GIT. Simply set your project(s) with GIT and all your code will be shared between your 2 platforms.
My setup is often to place most of the project into an actionscript library project and then have a platform specific project that incorporate my library(ies) and publish to the platform (usually one class only).
Here's a rundown on how to do it:
Create a Git project using your favorite Git depository (in your case it has to be online or in your network and not just local of course). If you have your own like me great if not purchase a private one or use a public one.
Write down your depository URI (clone) and depository name.
Open Flash Builder
- Go to File-> Import
- Open the Git section
- Pick Projects from Git -> click next
- Choose URI -> Click Next
- Paste your URI in the URI section at the top. (all fields should fill up)
- Enter your username and password and check store in secure store
- click next
- source is probably empty at this point so click next again, if not pick a branch.
- now set the local directory where your project will be cloned (should be inside a FB workspace)
At this point I usually set the directory inside my workspace with the name of the depository name.
- Select Use the New Project Wizard and click finish.
- This opens the Wizard where you can select the project type (let's say a actionscript library).
- Go through all screen and create your project.
- That's it you are set with Git.
Do same operation on your other platform and you end up with a project on each platform that are linked via Git. When you work on one just commit your changes and then pull those changes on the other platform and so on.
For easy convenience I recommend this approach:
- Shared project (via Git) is set as a actionscript library.
- Each platform has its own project (not linked) that references that linked library (this makes it easy to implement platform specific features). That platform specific project is made up of just one class (a starting point for the library).