[英]How to exclude module from Release Build
我有一個TestFixture
模塊,其中包含我的應用程序中不同模塊的共享測試依賴項。 但是,這個模塊在我的發布版本中完全沒有必要,因為我的應用程序(在測試之外)從不引用其中的任何項目。
有沒有辦法從我的發布版本中排除這個TestFixture
模塊?
我所有的模塊
testImplementation project(':testfixtures')
測試夾具模塊
implementation project(':app')
implementation project(':server')
implementation project (':data')
implementation project(':cache')
implementation project(':core')
implementation "androidx.test.ext:truth:$androidxExtTruthVer"
implementation "com.google.truth:truth:$truthVer"
// Testing Moshi
implementation "com.squareup.moshi:moshi-kotlin:$moshi_version"
implementation "com.squareup.moshi:moshi:$moshi_version"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version"
... Other implementations
你能分享你的項目級別 Gradle 嗎? 您也可以通過這種方式排除
configurations {
compile.exclude group: "junit", module: "junit"
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.