title: DefaultTaskContainer#NamedDomainObjectProvider.configure(Action) on task set cannot be executed in the current context
body: <p>I am getting this error when I try to connect my app with firebase.<a href="https://i.stack.imgur.com/t5fcl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/t5fcl.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/fgwbx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fgwbx.png" alt="enter image description here" /></a>
  and here are Gradle scripts
  <a href="https://i.stack.imgur.com/GVSeD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GVSeD.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/FiYmc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FiYmc.png" alt="enter image description here" /></a></p>