# Using repository dependencies with native plugin

**URL:** <https://discuss.gradle.org/t/using-repository-dependencies-with-native-plugin/1276>\
**Category:** Old Forum Archive\
**Created:** [November 19, 2014, 8:51pm UTC](https://discuss.gradle.org/t/using-repository-dependencies-with-native-plugin/1276 "2014-11-19T20:51:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim2](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/tim2/32/358_2.png) [@Tim2](https://discuss.gradle.org/u/Tim2)\
**Post date:** [November 19, 2014, 8:51pm UTC](https://discuss.gradle.org/t/using-repository-dependencies-with-native-plugin/1276/1 "2014-11-19T20:51:00Z")

</div>

Hi, I’m migrating from gradle 1.12 to 2.2 and ran into a problem

You used to be able to do:

```gradle
sources {
    main {
      cpp {
        source {
          include '**/*.c'
        }
        dependency 'somegroup:somelib:123-x86'
      }
    }
  }

```

But this was removed as of 2.1 [http://www.gradle.org/docs/2.1/release-notes#changes-to-the-incubating-languagebaseplugin](http://www.gradle.org/docs/2.1/release-notes#changes-to-the-incubating-languagebaseplugin).

I don’t see a way to achieve the same behavior though?

---

<div class="post-metadata">

**Author:** ![sterling](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sterling/32/5395_2.png) [@sterling](https://discuss.gradle.org/u/sterling)\
**Post date:** [November 21, 2014, 6:47pm UTC](https://discuss.gradle.org/t/using-repository-dependencies-with-native-plugin/1276/2 "2014-11-21T18:47:00Z")

</div>

Proper native dependency management is planned, but not completed (you can see design docs on GitHub). The [new syntax](http://www.gradle.org/docs/current/userguide/userguide_single.html#N15EBA) only supports project and pre-built libraries at the moment (no remote dependencies).

What used to happen, under the covers, was the dependency was converted into two dependencies:

```gradle
...
   someConf"somegroup:somelib:123-x86:so@so"
   someConf"somegroup:somelib:123-x86:headers@zip"
...

```

Then resolved into temporary directories and wired into the options for the compiler/linker. It’s possible to do that yourself still. You’d have to create your own configuration, download task, generate pre-built library blocks for each dependency, etc. If you don’t have to worry about too many variants, you can probably cut some corners (native dependency management is hard).
