# Add PluginAware.apply(Action)

**URL:** <https://discuss.gradle.org/t/add-pluginaware-apply-action/416>\
**Category:** Old Forum Archive\
**Created:** [October 23, 2014, 6:58am UTC](https://discuss.gradle.org/t/add-pluginaware-apply-action/416 "2014-10-23T06:58:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [October 23, 2014, 6:58am UTC](https://discuss.gradle.org/t/add-pluginaware-apply-action/416/1 "2014-10-23T06:58:00Z")

</div>

With the deprecation of PluginContainer.apply(Class), non-Groovy-users are currently left with two unwieldy APIs: apply(Map) and apply(groovy.Closure).

I suggest adding PluginAware.apply(Action), similar to most other Gradle APIs. This way we can use Java 8 or Xtend lambda expressions for adding plugins.

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [October 23, 2014, 8:30am UTC](https://discuss.gradle.org/t/add-pluginaware-apply-action/416/2 "2014-10-23T08:30:00Z")

</div>

Ask and ye shall receive…  
  
[https://github.com/gradle/gradle/commit/0a19af6ac12ff3beb3a5704aecf5d9920749ee8f](https://github.com/gradle/gradle/commit/0a19af6ac12ff3beb3a5704aecf5d9920749ee8f "Link: https://github.com/gradle/gradle/commit/0a19af6ac12ff3beb3a5704aecf5d9920749ee8f")  
  
I happened to be working in this area today.

---

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [October 23, 2014, 8:45am UTC](https://discuss.gradle.org/t/add-pluginaware-apply-action/416/3 "2014-10-23T08:45:00Z")

</div>

Great, thanks! =)
