You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem was that I also had org.gradle.jvmargs entry in my ~/.gradle/gradle.properties so my fix was not working (user settings takes precedence over project settings in Gradle).
The behaviour of the plugin was as follows, all files where marked as INVALID. No error message was provided, neither in Gradle --debug output or in Gradle deamon logs.
Interestingly after removing org.gradle.jvmargs from ~/.gradle/gradle.properties the plugin cached the INVALID statuses in fileStates.txt file and the problem persisted until I executed ./gradlew clean.
Looking at the source code of the plugin I noticed that in few places you are catching Throwable or Error. This is a bad practice. If you want to catch JVM errors like ClassDefNotFound (like I get with the missing exports) it would be good to at least log those errors to Gradle output.
Recently I have been migrating my project to JDK 17.
I used the common workaround for GJF 15.x, that is extra
--add-exports
directives:The problem was that I also had
org.gradle.jvmargs
entry in my~/.gradle/gradle.properties
so my fix was not working (user settings takes precedence over project settings in Gradle).The behaviour of the plugin was as follows, all files where marked as INVALID. No error message was provided, neither in Gradle
--debug
output or in Gradle deamon logs.Interestingly after removing
org.gradle.jvmargs
from~/.gradle/gradle.properties
the plugin cached the INVALID statuses infileStates.txt
file and the problem persisted until I executed./gradlew clean
.Looking at the source code of the plugin I noticed that in few places you are catching
Throwable
orError
. This is a bad practice. If you want to catch JVM errors like ClassDefNotFound (like I get with the missing exports) it would be good to at least log those errors to Gradle output.One example of such place:
google-java-format-gradle-plugin/subprojects/format/src/main/groovy/com/github/sherter/googlejavaformatgradleplugin/format/OneDotOneFactory.groovy
Line 40 in 100b46c
Please make the plugin more debuggable by not swallowing important JVM errors but instead by logging them as WARNings to Gradle output.
The text was updated successfully, but these errors were encountered: