Package org.gradle.api.plugins
Interface JavaResolutionConsistency
-
@Incubating public interface JavaResolutionConsistency
Dependency resolution consistency configuration for the Java derived plugins.- Since:
- 6.8
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
useCompileClasspathVersions()
Configures the runtime classpath of every source set to be consistent with the compile classpath.void
useRuntimeClasspathVersions()
Configures the compile classpath of every source set to be consistent with the runtime classpath.
-
-
-
Method Detail
-
useCompileClasspathVersions
void useCompileClasspathVersions()
Configures the runtime classpath of every source set to be consistent with the compile classpath. For dependencies which are common between the compile classpath and the runtime classpath, the version from the compile classpath is going to be used. Unless you have a good reason to, this option should be preferred touseRuntimeClasspathVersions()
for different reasons:- As code is compiled first against the given dependencies, it is expected that the versions at runtime would be the same.
- It avoids resolving the runtime classpath in case of a compile error.
-
useRuntimeClasspathVersions
void useRuntimeClasspathVersions()
Configures the compile classpath of every source set to be consistent with the runtime classpath. For dependencies which are common between the compile classpath and the runtime classpath, the version from the runtime classpath is going to be used. In addition, the test runtime classpath is going to be configured to be consistent with the main runtime classpath. PreferuseCompileClasspathVersions()
unless you have special requirements at runtime.
-
-