Hello I have a issue with Gradle and IntelliJ that appeared from nowhere. Everything was working but one day it stop to work. I am talking about any interaction with Gradle in IntelliJ. I have Spring Boot app, Gradle 6.7. When there is no .gradle directory in the root, everything works. If the directory is present I gets
Main class name has not been configured and it could not be resolved
for gradle build or
Test events were not received
for gradle test. If I delete .gradle directory one gradle task is completed fine and the some goes again and again. If I try to run test by IntelliJ runner with .gradle directory present I get
No tests were found
I noticed that after first build, build directory contains everything as expected. But when I run another task, build directory emptied somehow and I believe that the absence of compiled sources leads to the errors.
I have no vintage-engine on classpath, only jupiter for junit tests.
I tried to clear gradle cache, invalidate IntelliJ caches, both in the same time, reinstall IntelliJ with by older version, uninstall IntelliJ completely and install new one. Nothing helped.
Does anybody has an idea how to solve it?
Thanks
UPDATE:
build.gradle on what I am able to reproduce the issue:
plugins {
id 'org.springframework.boot' version '2.5.2'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
I found that the file which is causing the behavior is executionHistory.bin. If the file is present, it ruins a build.