https://github.com/gradle/gradle/issues/1276
the problem only happens with the “Create Module per SourceSet” option. This does not use Gradle’s mapping directly, but has some intermediate code contributed by IDEA. It seems this code removes dependencies that are in multiple scopes
with the “Create Module per SourceSet” option IDEA tries to resolve dependency scopes based on gradle sourceSet configuration. And the main scopes here are compile
and runtime
.provided
scope has been considered as something configured explicitly:
- using War Plugin conventions (i.e.
providedCompile
andprovidedRuntime
configurations) - using workaround provided by
IdeaPlugin
, I mean ideaPlugin.model.module.scopes[‘PROVIDED’].[‘plus’] option.
In order to honor the second configuration, I had to increase the priority of explicitly configured provided
dependencies.
Cause isJavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME
configuration as provided
by default.
近期评论