# Multiple dependencies for the same configuration shortcut notation

**URL:** <https://discuss.gradle.org/t/multiple-dependencies-for-the-same-configuration-shortcut-notation/18915>\
**Category:** Help/Discuss\
**Created:** [August 12, 2016, 9:23am UTC](https://discuss.gradle.org/t/multiple-dependencies-for-the-same-configuration-shortcut-notation/18915 "2016-08-12T09:23:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazyjavahacking](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/crazyjavahacking/32/5353_2.png) [@crazyjavahacking](https://discuss.gradle.org/u/crazyjavahacking)\
**Post date:** [August 12, 2016, 9:23am UTC](https://discuss.gradle.org/t/multiple-dependencies-for-the-same-configuration-shortcut-notation/18915/1 "2016-08-12T09:23:38Z")

</div>

I was trying to figure out how exactly is the following Gradle code transformed into Gradle method calls:

```
dependencies {
    configurationName dependencyNotation1, dependencyNotation2, ...
}

```

From JavaDocs it does not look like there is a method taking an array or warargs.

**So how does it actually work? How exactly is it compiled into bytecode?**

Is there a compile time AST transformation to multiple calls of `Dependency.add(String, Object)`?

---

<div class="post-metadata">

**Author:** ![mark\_vieira](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mark_vieira/32/5396_2.png) [@mark\_vieira](https://discuss.gradle.org/u/mark_vieira)\
**Post date:** [August 12, 2016, 7:46pm UTC](https://discuss.gradle.org/t/multiple-dependencies-for-the-same-configuration-shortcut-notation/18915/2 "2016-08-12T19:46:03Z")

</div>

It’s not an AST transformation, it’s actually just leveraging Groovy’s `methodMissing()`. Here’s where the magic happens.

> <https://github.com/gradle/gradle/blob/9db91fbafe44226495f0852b5ba7af3ff9b29155/subprojects/core/src/main/java/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyHandler.java#L125-L127>
