Only add module attribute for non-test entries (#1383)
This commit is contained in:
Родитель
0f477a0f73
Коммит
7f7b91eb35
|
@ -515,13 +515,16 @@ public class GradleBuildServerBuildSupport implements IBuildSupport {
|
|||
List<IClasspathAttribute> attributes = new LinkedList<>();
|
||||
if (isTest) {
|
||||
attributes.add(testAttribute);
|
||||
} else if (isModular) {
|
||||
// Assume that a test-only dependency is not a module, which corresponds
|
||||
// to how Eclipse does test running for modules:
|
||||
// It patches the main module with the tests and expects test dependencies
|
||||
// to be part of the unnamed module (classpath).
|
||||
attributes.add(modularAttribute);
|
||||
}
|
||||
if (!artifact.exists()) {
|
||||
attributes.add(optionalAttribute);
|
||||
}
|
||||
if (isModular) {
|
||||
attributes.add(modularAttribute);
|
||||
}
|
||||
|
||||
dependencyEntries.add(JavaCore.newLibraryEntry(
|
||||
new Path(artifact.getAbsolutePath()),
|
||||
|
|
Загрузка…
Ссылка в новой задаче