# Introducing source dependencies

DevFeed: [Introducing source dependencies](<https://devfeed.tech/articles/introducing-source-dependencies-24654.md>)

Original publisher: [Read original article](<https://blog.gradle.org/introducing-source-dependencies>)

Author: Adam Murdoch

Published: 2018-09-25T04:00:00Z

Content type: article

Language: en

Sources: [The Gradle Blog](<https://devfeed.tech/sources/the-gradle-blog.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [Dependency management](<https://devfeed.tech/topics/dependency-management.md>), [Git](<https://devfeed.tech/topics/git.md>), [Library](<https://devfeed.tech/topics/library.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Java](<https://devfeed.tech/topics/java.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [build](<https://devfeed.tech/tags/build.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dependency-management](<https://devfeed.tech/tags/dependency-management.md>), [git](<https://devfeed.tech/tags/git.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [source](<https://devfeed.tech/tags/source.md>)

## AI overview

The article introduces Gradle source dependencies, a dependency management feature that checks out library source code from Git and builds the binaries locally instead of downloading prebuilt binaries. It explains the feature's incubating status, supported build types, source mapping syntax, and a sample application workflow.

## Source excerpt

This post introduces a new Gradle dependency management feature called "source dependencies". Normally, when you declare a dependency on a library, Gradle looks for the library's binaries in a binary repository, such as JCenter or Maven Central, and downloads the binaries for use in the build. Source dependencies allow you to instead have Gradle automatically check out the source for the library from Git and build the binaries locally on your machine, rather than downloading them. We'd love to get your feedback on this feature. Please try it out and let us know what works for you and any problems you run into. You can leave feedback on the Gradle forums or raise issues on the Gradle native GitHub repository. You should be aware that this feature is currently incubating and may change in breaking ways in future releases of Gradle. Please do not use this feature in production until the feature is promoted to stable in a future release. How can you try it? You can find many samples that use source dependencies in the native-samples repository. C++ builds are a natural place to use source dependencies, but this isn't a C++ specific feature. Source dependencies work for any type of build that use Gradle's dependency management features, such as Java, Kotlin, or Android builds. You can try this feature out with the latest Gradle 4.10 or a nightly. Let's look at an example application. This sample shows an application that uses a library that lives in a separate Git repository. A source dependency looks the same as a binary dependency in the build file. You declare a dependency on a particular version of a module, such as a library. Here, our sample needs version 1.0 of the "utilities" library: dependencies { implementation 'org.gradle.cpp-samples:utilities:1.0' } You also need to tell Gradle where to find the source for the library. This is similar to how you need to tell Gradle where to find binaries by defining some binary repositories in your build, however, the syntax