[英]facing issue in converting gradle to kotlin dsl
How to convert this to kotlin dsl?如何将其转换为 kotlin dsl?
buildTypes {
debug {
minifyEnabled false
}
staging {
debuggable true
minifyEnabled true
consumerProguardFiles 'project-proguard-rules.pro'
}
release {
minifyEnabled false
consumerProguardFiles 'project-proguard-rules.pro'
}
}
Mainly facing issue in converting the staging part?主要面临转换暂存部分的问题?
It would look like:它看起来像:
buildTypes {
getByName("debug") {
isMinifyEnabled = false
}
getByName("staging") {
isDebuggable = true // TODO it is assumption, you have to double check
isMinifyEnabled = true
consumerProguardFiles("project-proguard-rules.pro")
}
getByName("release") {
isMinifyEnabled = false
consumerProguardFiles("project-proguard-rules.pro")
}
}
Source docs: Official android docs Official gradle docs源文档:官方 android 文档官方 gradle 文档
Please also note there is an option to convert many things automatically over console command.另请注意,有一个选项可以通过控制台命令自动转换许多内容。 This option requires more research.
此选项需要更多研究。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.