Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Android Studio 中使用“Build -> Generate Signed Bundle”操作签署包之前自动运行单元测试?
将以下配置添加到您的模块build.gradle文件中:
build.gradle
对于单元测试:
afterEvaluate { bundleRelease.dependsOn testReleaseUnitTest }
对于单元测试和仪器测试,请使用:
afterEvaluate { bundleRelease.dependsOn testReleaseUnitTest, connectedAndroidTest }