# How do you import a module of a local multiplatform library using Gradle?

**URL:** <https://discuss.kotlinlang.org/t/how-do-you-import-a-module-of-a-local-multiplatform-library-using-gradle/11752>\
**Category:** Libraries\
**Created:** [February 27, 2019, 2:57pm UTC](https://discuss.kotlinlang.org/t/how-do-you-import-a-module-of-a-local-multiplatform-library-using-gradle/11752 "2019-02-27T14:57:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lamba92](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/lamba92/32/5089_2.png) [@lamba92](https://discuss.kotlinlang.org/u/lamba92)\
**Post date:** [February 27, 2019, 2:57pm UTC](https://discuss.kotlinlang.org/t/how-do-you-import-a-module-of-a-local-multiplatform-library-using-gradle/11752/1 "2019-02-27T14:57:04Z")

</div>

Say a have 2 distinct projects:

- project A: a Kotlin JVM project
- project B: a Kotlin Multiplatform project (which containts a JVM target as well).

If project B was a normal JVM project I could have added its reference in project A inside `settings.gradle.kts` with:

```kotlin
project(":project-B").projectDir = File("../prroject-b")

```

and then inside `build.gradle.kts` of project A:

```kotlin
dependencies {
    implementation(project(":project-B"))
}

```

How can I do the same with a multiplatform project?

EDIT: with the above setup seems working even with a multiplatform local dependency. Somehow Gradle is able to understand what it needs or it just import everything 😆

---

<div class="post-metadata">

**Author:** ![darksnake](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/darksnake/32/2479_2.png) [@darksnake](https://discuss.kotlinlang.org/u/darksnake)\
**Post date:** [February 28, 2019, 11:32am UTC](https://discuss.kotlinlang.org/t/how-do-you-import-a-module-of-a-local-multiplatform-library-using-gradle/11752/2 "2019-02-28T11:32:28Z")

</div>

What you want is called a [composite build](https://docs.gradle.org/current/userguide/composite_builds.html). It should work for mpp, though I had some troubles with idea recognizing an mpp module though composite.
