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
It would be nice if it was possible to specify a customer google-java-format JAR to use. This would allow this plugin to used to run forked versions of google-java-format.
The gradle errorprone plugin accomplishes this by using the errorprone JAR in the errorprone configuration, if such a JAR exists, as explained in the documentation:
The plugin adds an errorprone configuration that automatically uses the latest release of error-prone. You can override it to use a specific version with:
dependencies {
errorprone 'com.google.errorprone:error_prone_core:2.0.21'
}
They then retrieve this JAR from the configuration, create a new classloader, and use reflection to instantiate the class which runs errorprone:
I understand that some people don't have another choice than forking and adjusting google-java-format to their needs. I can't really 'support' forks of google-java-format though, as I don't have access to them and therefore cannot test against them. I'd prefer to not have to face all the potential problems this feature might bring and instead only support the 'real' google-java-format.
@sherter thank you for your response! I understand your concerns here, and think it would be reasonable for you to close this feature request if you do not plan on implementing it.
With regard to testing: I think it would be possible to test this by using a "custom" google-java-format JAR which is really just an old version of google-java-format.
That being said, it is of course not possible to test against all possible forks of google-java-format. If this means that you are not comfortable implementing this feature, I understand.
It would be nice if it was possible to specify a customer google-java-format JAR to use. This would allow this plugin to used to run forked versions of google-java-format.
The gradle errorprone plugin accomplishes this by using the errorprone JAR in the
errorprone
configuration, if such a JAR exists, as explained in the documentation:They then retrieve this JAR from the configuration, create a new classloader, and use reflection to instantiate the class which runs errorprone:
The text was updated successfully, but these errors were encountered: