Я получаю множество error: cannot find symbol
ошибок, когда в моем проекте Gradle выполняется задача compileTestJava. Похоже, что задача не может видеть никаких классов в главном каталоге.
Мой код находится в src / main / java, а мои тесты находятся в src / test / java, и у меня есть только плагины, репозитории и разделы зависимостей вмой build.gradle, поэтому я не играю со стандартными плагинами или их конфигурациями.
Я использую Gradle 6 с JDK 13.01 для Windows.
Это мой build.gradle:
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building an application
id 'application'
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is found on compile classpath of this component and consumers.
implementation 'com.google.guava:guava:27.0.1-jre'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
// Define the main class for the application
mainClassName = 'q.Main'
Почему тесты не видят классы в main?