# Replace gradleApi() dependency with newer version?

**URL:** <https://discuss.gradle.org/t/replace-gradleapi-dependency-with-newer-version/5610>\
**Category:** Old Forum Archive\
**Created:** [August 16, 2013, 3:50pm UTC](https://discuss.gradle.org/t/replace-gradleapi-dependency-with-newer-version/5610 "2013-08-16T15:50:00Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Abrar\_Syed](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/abrar_syed/32/599_2.png) [@Abrar\_Syed](https://discuss.gradle.org/u/Abrar_Syed)\
**Post date:** [March 14, 2014, 8:20am UTC](https://discuss.gradle.org/t/replace-gradleapi-dependency-with-newer-version/5610/3 "2014-03-14T08:20:00Z")

</div>

The best solution I can come up with… is to ammend the GradleAPI() method so that it does the following. 1. adds the gradle install directory and lib directories as FlatFile repositories. 2. constructs a module with the GradleAPI as the main artifact and the other artifacts as transitive dependencies.

This way us users can use the standard dependency filtering systems and configure it all however we want.

Unfortunately… the placing of the gradleApi() method makes me assume that its called on the DependencuHandler… which may not have a project instance on which to create a repository… I think it would be best if they simply had a GradlePlugin plugin, which would add everything as I mentioned above. of course thats quite a major APi breakage, and its unlikely to happen.

---

_[View the full topic](https://discuss.gradle.org/t/replace-gradleapi-dependency-with-newer-version/5610)._
