Workflow/file organization recommendations?

I'm at a point in my one of my projects that I need to break out a portion of the code to be shared amongst multiple projects, and I'm looking for the best way to manage this. In good JUCE fashion I use the Introjucer to generate my projects, and I think creating a 'juce module' for this chunk of code is a good approach, but I don't fully understand the module system. So, questions:

1. Is there a way to make my module available by default in the IntroJucer? (my assumption is that I will need put it in the juce/modules folder, which feels slightly messy, as I am polluting my local copy of juce.)

2. Can I have module dependancies on non-juce modules? ie. I am using JuceSerial as a module, and my module depends on this.

3. Any pointers/advice from people doing something similar?

 

I do a similar thing with a couple of modules and yes, it's definitely the easiest way to do it.

1. I think if you put it in the juce/modules folder it will automatically appear in all your projects. If not, all you have to do is add it as a path. I have a couple of projects which use a module stored along with the rest of the project's source code just because it was the simplest way to separate the Obj-C.

2. Yes, I don't think there is anything special about the JUCE modules, any module will be in the include path so you should be able to reference it in other modules.

3. The only thing I can think of is that sometimes it's easier to just create things in header files. I have many classes in header files that I can just include from anywhere and keep these in a "Common" repository. To ben honest I write a lot of code like this these days and only really split via .h/.cpp if the class is huge or you need to hide native code.

Thanks Dave.

Hey Dave, I just downloaded dRowAudio from git, and I notice that you have two different juce_module_info files, and two dRowAudio.h files. Can you comment on the reasoning for this? Thanks again.