# Multiproject vs model with multicomponents

**URL:** <https://discuss.gradle.org/t/multiproject-vs-model-with-multicomponents/12399>\
**Category:** Help/Discuss\
**Created:** [October 23, 2015, 4:38pm UTC](https://discuss.gradle.org/t/multiproject-vs-model-with-multicomponents/12399 "2015-10-23T16:38:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin2](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@Kevin2](https://discuss.gradle.org/u/Kevin2)\
**Post date:** [October 23, 2015, 4:38pm UTC](https://discuss.gradle.org/t/multiproject-vs-model-with-multicomponents/12399/1 "2015-10-23T16:38:44Z")

</div>

Hi,

I have a polyglot codebase with tens of C++ projects and tens of Java projects. I am not sure if today’s Gradle-speak calls them projects or components. I read in the user guide that the project space is going to be eventually replaced by the model space ([https://docs.gradle.org/current/userguide/new\_model.html#N17FCD](https://docs.gradle.org/current/userguide/new_model.html#N17FCD)).

What does this mean for how we are to organize our root level buildscripts? Does this mean we should create a model with components representing each of our subprojects, or should we be folding a model into a subproject? I have given an example below.

```gradle
allprojects {
    model { platforms {
        ...
    } buildTypes {
        ...
    } }
}

project(':Project1') {
    apply plugin: 'cpp'
    model.components.project1(NativeLibrarySpec) {
    }
}

project(':Project2') {
    apply plugin: 'cpp'
    model.components.project2(NativeLibrarySpec) {
    }
}

```

**As opposed to**

```gradle
project(':') { // for context only
    apply plugin: 'cpp'
    model { platforms {
        ...
    } buildTypes {
        ...
    } }
    model.components.project1(NativeLibrarySpec) {
    }
    model.components.project2(NativeLibrarySpec) {
    }
}

```

For the single root model approach I see in the components report that a binary has a path but we can’t call

```
$ ./gradlew component_name:platform_name:build_type:binary_spec

```

So it looks like having a project path adds more convenience:

```
$ ./gradlew projectA:build

```

as opposed to

```
$ ./gradlew win64ReleaseProject1StaticLibrary

```
