Several projects one source

We have a program that we want to deploy on several devices.

  • Standalone Captive AIR
  • Web flash application
  • iOS app
  • Android app

Code other than some interface elements is identical in many parts. I am wondering what is the best approach. If we have a project with a common library or we should have one large project with different settings, which are controlled using ant or some other method.

+6
source share
4 answers

Access to and use of a shared library project is the best implementation method for cross-platform projects. Besides this approach, you can use ant build.

+3
source

The answer will usually have a lot in common with the β€œUI stuff”, which is different, but since it sounds like you are Flash / AIR, this is probably not a big concern. If it were me, I would go on a β€œone big project” and get a serious set of CI / NI and SCM compatible with my IDE. If you use Eclipse / Aptana , I like Husdon / Surround . (Full disclosure: I used @Seapine to work.) If you are not using Eclipse, you should check the CI / SCM parameters that integrate your IDE (and yourself, for example, Hudson has a Surround module and vice versa). Working with a shared library works but since Flash Flash Darn is everywhere, I don’t see the need to increase the separation of individual projects. Full-featured CI can quite efficiently manage compiler differences.

+2
source

We use this combination of approaches for the large-scale mobile / web project that currently exists on the iOS AppStore, and will be released soon on Android and the Internet:

  • One main project that uses compiler directives to process specific platform logic and elements
  • Compiler directives for processing specific platform logic in the main project code base
  • A separate project for our video and interactivity engine , which is mostly platform independent, using switch statements for specific platform logic
  • One common SWC for graphic assets . Platform-specific elements have a platform prefix and underscores. Compiler directives are used to indicate which movie clips will be displayed on the screen.
  • Ant scripts to compile for various platforms.
  • Built-in extensions for interacting with hardware features

We use some commercial, some open source and some home-made ANEs for things like AppStore integration, social networking features, network monitoring, notifications, and interaction between applications.

  • com.adobe.extension.NetworkInfo.ane
  • com.milkmangames.extensions.EasyPush.ane
  • com.milkmangames.extensions.GoViral.ane
  • com.milkmangames.extensions.StoreKit.ane

(I have no connection with milkmangames)

I am currently writing Android ANE to handle interactions between applications using Intents. This is the project in which I am open:

https://github.com/interactivenyc/ANESampleProject .

I am currently stuck in a problem and will post a question soon with details if anyone is interested in the next project. The project setup is pretty well described in the ReadMe file displayed on the first page of the project.

+1
source

If you are using git for version control, look at the submodules. I used it to save everything in one project, but separately controlled versions of each module, and this led to an excellent solution.

0
source

Source: https://habr.com/ru/post/915785/


All Articles