[英]Is there any way to remove "classpath 'com.google.gms:google-services:4.2.0' dependency from top level project gradle
For firebase setup now my project gradle has classpath 'com.google.gms:google-services:4.2.0'
. 对于Firebase设置,现在我的项目gradle具有classpath 'com.google.gms:google-services:4.2.0'
。
app gradle contains apply plugin: 'com.google.gms.google-services'
应用程式gradle包含apply plugin: 'com.google.gms.google-services'
I want to move firebase related code to the dynamic module 我想将与Firebase相关的代码移至动态模块
So I moved apply plugin: 'com.google.gms.google-services'
from app Gradle
to module Gradle
所以我将apply plugin: 'com.google.gms.google-services'
从app Gradle
移到了module Gradle
but classpath 'com.google.gms:google-services:4.2.0'
is still related to full project. 但是classpath 'com.google.gms:google-services:4.2.0'
仍与完整项目相关。 Is there any way to remove this dependency from top-level project Gradle? 有什么办法可以从顶级项目Gradle中删除此依赖项?
Just add the buildscript
block inside the module/build.gradle
file: 只需在module/build.gradle
文件中添加buildscript
块:
buildscript {
repositories {
//...
}
dependencies {
//..
classpath 'com.google.gms:google-services:4.2.0'
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.