继续这个问题,Accessing configurations ResolutionStrategy from a plugin
我现在很乐意为我的项目设置解决策略,并且构建工作正常。解决方案策略将接受默认版本并将其映射到库的实际版本,并正确解析它。
但是,我无法生成构思或eclipse项目,因为分离的配置无法解析默认版本。
有没有办法为分离配置设置解析策略?
*编辑*
运行插件时运行的错误是:
:ideaProject FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ideaProject'.
> Could not resolve all dependencies for configuration 'detachedConfiguration4'.
> Module version group:xxx, module:mmm, version:trunk, configuration:detachedConfiguration4 declares a dependency on configuration 'default' which is not declared in the module descriptor for group:xxx, module:nnn, version:trunk
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
我假设因为我使用configurations.all设置resolutionStrategy并且这是一个分离的配置,所以resolutionStrategy没有应用于分离的配置。