Restored scope of transitive dependencies to 'compile' in eclipse-base. #707
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With #428 we modernized the build, replacing
compile
dependencies byimplementation
.As pointed out already in that PR by @jbduncan,
api
fromjava-library
might also be required.The relevant change for
eclipse-base
is actually not caused by thejava-library
, but by themaven-publish
.In the Customizing dependencies versions section it is described that
implementation
is mapped to theruntime
scope, whereasapi
is mapped to thecompile
.Apache Maven explained in their documentation why their default scope is
compile
. So the "silent change" of Gradle fromcompile
toruntime
comes unexpected.Where Gradle really fails is the latter usage in
testImplementation
, where for imported M2runtime
dependencies the class loading fails at runtime. It seems to be a bug in Gradle or at least an inconsistency.However, form the Maven perspective the
compile
scope is cleaner, sinceeclipse-base
is meant as a framework, providing a minimal Eclipse setup. This explicitly foresees that the interfaces provided by the transitive dependencies shall be used by theeclipse-base
user.So the Gradle problem is not investigated further. Instead the dependency scope of
eclipse-base
is restored tocompile
as it has been before version 3.4.0.