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.
如果我"buildOptions": ["unittests"]在 的根目录中定义dub.json,我会为所有构建启用单元测试,例如发布版本。如何仅为默认构建启用单元测试?即由命令触发的构建dub?
"buildOptions": ["unittests"]
dub.json
dub
尝试将此添加到dub.json:
"buildTypes": { "plain": { "buildOptions": ["unittests", "debugMode", "debugInfo"] }, }
请注意,如果这是一个库并且您发布了它,那么如果库用户使用配置构建他们的项目,那么将为您的库启用单元测试plain,这可能不是您想要的。
plain