Build System with different project version

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Build System with different project version

ruben
This post has NOT been accepted by the mailing list yet.
HI

I'm trying  to organize  my system  application in Components and Modules.
The Modules are software libraries that follow a proper version number.

The Components are software parts that uses the Modules and also They have a  number of version.

Now I have setup a Flat  structure for a single component using a multi-project build.


I would like to have a global structure that given a root project builds all components.
 

I have a Flat project structure in this way :


    ROOT(master)
        settings.gradle
        common.gradle
        build.gradle

    COMPONENT_1
        COMPONENT_1
            build.gradle
        MODULES
            MOD_1 (ver1.0)
                build.gradle
            MOD_2 (ver1.0)
                build.gradle
            MOD_3 (ver1.0)
                build.gradle
   
    COMPONENT_2
        COMPONENT_2
            build.gradle
        MODULES
            MOD_3 (ver2.0)
                build.gradle
            MOD_4 (ver1.0)
                build.gradle
            MOD_5 (ver1.0)
                build.gradle

    COMPONENT_3
        COMPONENT_3
            build.gradle
        MODULES
            MOD_1 (ver2.0)
                build.gradle
            MOD_3 (ver3.0)
                build.gradle
            MOD_5 (ver2.0)
                build.gradle


The components depends from modules  through project reference, as the following snippet code of build.gradle :


COMPONENT_1
    dependencies {    
        compile(project(':MOD_1'))
        compile(project(':MOD_2'))
        compile(project(':MOD_3'))
        }


COMPONENT_2
    dependencies {    
        compile(project(':MOD_3'))
        compile(project(':MOD_4'))
        compile(project(':MOD_5'))
        }


COMPONENT_3
    dependencies {    
        compile(project(':MOD_1'))
        compile(project(':MOD_2'))
        compile(project(':MOD_5'))
        }


I don't know if this approach is correct.
if yes, how can I do to reference from two components the same project(Module) with different version?
if no, which is the correct approach ?

Thanks
 
Ruben