# Reusing subproject methods in root project

**URL:** <https://discuss.gradle.org/t/reusing-subproject-methods-in-root-project/27380>\
**Category:** Help/Discuss\
**Created:** [June 16, 2018, 9:31am UTC](https://discuss.gradle.org/t/reusing-subproject-methods-in-root-project/27380 "2018-06-16T09:31:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gintautassulskus](https://avatars.discourse-cdn.com/v4/letter/g/c77e96/32.png) [@gintautassulskus](https://discuss.gradle.org/u/gintautassulskus)\
**Post date:** [June 16, 2018, 9:31am UTC](https://discuss.gradle.org/t/reusing-subproject-methods-in-root-project/27380/1 "2018-06-16T09:31:17Z")

</div>

I have a method that should be called in both root and sub projects.  
The said method should reside in the sub-project however.

As far as I know, the only way to share this method with the root project is writing it to ext.method={}.  
How do I evaluate the sub-project first in order to expose the shared method to the root project?

Is there a more elegant way to achieve the behaviour described above?
