# Gradle and plugins

**URL:** <https://forums.unrealengine.com/t/gradle-and-plugins/106043>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [February 5, 2018, 1:25pm UTC](https://forums.unrealengine.com/t/gradle-and-plugins/106043 "2018-02-05T13:25:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_75de26c9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_75de26c9](https://forums.unrealengine.com/u/anonymous_user_75de26c9)\
**Post date:** [February 5, 2018, 1:25pm UTC](https://forums.unrealengine.com/t/gradle-and-plugins/106043/1 "2018-02-05T13:25:52Z")

</div>

I have some issues when I want to add some Gradle plugins for Android. For example, I want to use this plugin: com.google.gms.google-services. I added apply plugin: ‘com.google.gms.google-services’ to \<buildGradleAdditions\> block that will put all my code inside \<buildGradleAdditions\> block to buildAdditions.gradle file. BuildAdditions.gradle will be used in main build.gradle because of line apply from: ‘buildAdditions.gradle’. But that’s the reason of issue as we cannot use plugins inside buildAdditions.gradle as it was connected using ‘apply from: file’. I’ve found a couple of relevant issues. You can see one example on [https://discuss.gradle.org/t/how-do-…adle-file/7508](https://discuss.gradle.org/t/how-do-i-apply-a-plugin-to-a-project-from-a-shared-applied-gradle-file/7508) . Looks like it cannot be easily done. But I solved this issue by modifying engine source code and main build.gradle file.  
What I’ve done:  
I remove line apply from: ‘buildAdditions.gradle’ in build.gradle file and modify UEDeployAndroid.cs to write all content of buildAdditions.gradle file on top of build.gradle file.  
I think you should consider my approach and make similar changes inside Engine sources. I can provide diff of necessary files if you need.

Thank you.
