https://kotlinlang.org logo
#gradle
Title
x

xenoterracide

08/23/2018, 12:42 AM
tried adding constraints above the task configuration block
Copy code
project.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
Copy code
Caused by: org.gradle.api.artifacts.UnknownConfigurationException: Configuration with name 'compileOnly' not found.