I am trying to setup error prone using gradle, however everything ive tried gives me some kind of error:
To test I have setup a simple hello world java program using gradle, which without error prone compiles fine. Then I read: https://github.com/tbroyer/gradle-errorprone-plugin found from the install guide and tried this in the build.gradle:
plugins {
id 'java'
id("net.ltgt.errorprone") version "2.3.3"
}
group 'test'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
errorprone("com.google.errorprone:error_prone_core:2.3.3")
}
This gave me this error:
Plugin [id: 'net.ltgt.errorprone', version: '2.3.3'] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Plugin Repositories (could not resolve plugin artifact 'net.ltgt.errorprone:net.ltgt.errorprone.gradle.plugin:2.3.3')
Searched in the following repositories:
Gradle Central Plugin Repository
I changed 2.3.3
to latest.version
and got the same error
Then I found this https://plugins.gradle.org/plugin/net.ltgt.errorprone and tried version number 0.8.1. I need to be able to use java11 so can't use gradle 4.x as far as I understand.
Also if anybody knows of an actual repository that has used error prone with gradle that I could look at I would be very grateful :)
My gradle wrapper properties is set to use gradle version 5.4.1