How to modify build.gradle of the app for android target

How can I add this code to the android build.gradle of my project?

buildscript
{
	repositories {
		jcenter()
		google()
	}

    dependencies {
    	// Adding Google Services plugin
    	classpath 'com.google.gms:google-services:4.3.8' 
    }
}

// apply Google Services plugin
apply plugin: 'com.google.gms.google-services'

I know there is a <dependency /> tag that i can use in the project.xml but how can I use it to add somehow this dependency and the plugin to be applied?

Thanks

1 Like

I am not sure if this is the best approach but what I have done and seems to work is overwriting lime’s template with my own using

<template path="templates\android\template\app\build.gradle" rename="app\build.gradle" if="android" />

But maybe there is a better and nicer solution to this :wink:

I am all ears if someone has another way to do it

1 Like

Yes, that’s it. :grinning: :grinning: :grinning:

Great, thanks :slight_smile: