I split my project onto modules/sub-projects following this guide:

<https://docs.gradle.org/current/userguide/multi_project_builds.html>

In the main script `build.gradle` i apply the configuration for the sub-projects:

```
subprojects {
  repositories {
    mavenCentral()
  }
}

```

And this works fine if i run the subproject build from the root build directory: 

```
mainProject$ ./gradlew clean :common:build 

```

(successfully builds `:common` module)

BUT i want to be able to build the `:common` module being in `common` directory:

```
mainProject$ cd common
common$ ./gradlew clean build 

```

This fails if the *repositories* are not configured explicitly in `common/build.gradle` file. But i did it already in the parent config above and i'd like the subprojects pick-up parent config where it's possible.

So, hot to configure parent project and sub-projects so when i run a subproject build from the subproject directory, it considers parent configuration as well (and not only repositories configuration, but also some constants, dependencies and so on).