gpt4 book ai didi

android - 有没有办法只组装一种风格的 androidTest 版本?

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:18:22 25 4
gpt4 key购买 nike

我的 Android 项目中有三种风格。我如何才能为我的仪器测试构建其中一个(“androidTest”构建 Artifact )?

当我使用 Android Studio 2.0 Beta 2 运行 gradle 任务 assembleAndroidTest 时,我得到三个输出 - 一个用于我的每一种口味:

myproject-dev-debug-androidTest-unaligned.apk
myproject-itest-debug-androidTest-unaligned.apk
myproject-production-debug-androidTest-unaligned.apk

如果我只想构建其中一个怎么办?我不想等待 3 倍的构建时间来构建我不需要的东西(是的,那太糟糕了)。

这是包含名称“androidTest”的所有 gradle 任务的列表:

assembleAndroidTest - Assembles all the Test applications.
compileDebugAndroidTestSources
compileDevDebugAndroidTestSources
compileItestDebugAndroidTestSources
compileProductionDebugAndroidTestSources
compileTelenorDebugAndroidTestSources
installDebugAndroidTest - Installs the android (on device) tests for the Debug build.
installDevDebugAndroidTest - Installs the android (on device) tests for the DevDebug build.
installItestDebugAndroidTest - Installs the android (on device) tests for the ItestDebug build.
installProductionDebugAndroidTest - Installs the android (on device) tests for the ProductionDebug build.
installTelenorDebugAndroidTest - Installs the android (on device) tests for the TelenorDebug build.
uninstallDebugAndroidTest - Uninstalls the android (on device) tests for the Debug build.
uninstallDevDebugAndroidTest - Uninstalls the android (on device) tests for the DevDebug build.
uninstallItestDebugAndroidTest - Uninstalls the android (on device) tests for the ItestDebug build.
uninstallProductionDebugAndroidTest - Uninstalls the android (on device) tests for the ProductionDebug build.
uninstallTelenorDebugAndroidTest - Uninstalls the android (on device) tests for the TelenorDebug build.
connectedAndroidTest - Installs and runs instrumentation tests for all flavors on connected devices.
connectedDebugAndroidTest - Installs and runs the tests for debug on connected devices.
connectedDevDebugAndroidTest - Installs and runs the tests for devDebug on connected devices.
connectedItestDebugAndroidTest - Installs and runs the tests for itestDebug on connected devices.
connectedProductionDebugAndroidTest - Installs and runs the tests for productionDebug on connected devices.
connectedTelenorDebugAndroidTest - Installs and runs the tests for telenorDebug on connected devices.
deviceAndroidTest - Installs and runs instrumentation tests using all Device Providers.
spoonDevDebugAndroidTest - Run all instrumentation tests on all connected devices for 'DevDebugAndroidTest'
spoonItestDebugAndroidTest - Run all instrumentation tests on all connected devices for 'ItestDebugAndroidTest'
spoonProductionDebugAndroidTest - Run all instrumentation tests on all connected devices for 'ProductionDebugAndroidTest'
spoonTelenorDebugAndroidTest - Run all instrumentation tests on all connected devices for 'TelenorDebugAndroidTest'
compileRetrolambdaDebugAndroidTest
compileRetrolambdaDevDebugAndroidTest
compileRetrolambdaItestDebugAndroidTest
compileRetrolambdaProductionDebugAndroidTest
compileRetrolambdaTelenorDebugAndroidTest

最佳答案

如果 flavor = "flavor"和 type = "debug",那么尝试:

./gradlew assembleFlavorDebugAndroidTest

关于android - 有没有办法只组装一种风格的 androidTest 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35334384/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com