xenoterracide
08/23/2018, 12:42 AMproject.getDependencies().constraints( constraints -> {
constraints.add( EP, "com.google.errorprone:error_prone_core" + LATEST );
constraints.add( COMPILE, "com.google.errorprone:error_prone_annotations" + LATEST );
} );
project.getTasks().withType( JavaCompile.class ).configureEach( task -> {
CompileOptions options = task.getOptions();
options.setAnnotationProcessorGeneratedSourcesDirectory( Paths.get( "build/generated/src" ).toFile() );
options.getCompilerArgs().addAll( Arrays.asList(
"-XepExcludedPaths:.*/build/generated/.*",
"-Xep:MissingOverride:ERROR",
"-Xep:Var:ERROR"
) );
} );
but that's devolved into this
Caused by: org.gradle.api.artifacts.UnknownConfigurationException: Configuration with name 'compileOnly' not found.