class GradleAnnotationProcessorScopeBuildCustomizer implements BuildCustomizer<GradleBuild> {

	@Override
	public void customize(GradleBuild build) {<FILL_FUNCTION_BODY>}

	@Override
	public int getOrder() {
		return Ordered.LOWEST_PRECEDENCE;
	}

}

		boolean annotationProcessorUsed = build.dependencies()
			.items()
			.anyMatch((dependency) -> dependency.getScope() == DependencyScope.ANNOTATION_PROCESSOR);
		if (annotationProcessorUsed) {
			build.configurations()
				.customize("compileOnly", (configuration) -> configuration.extendsFrom("annotationProcessor"));
		}
	
<no_super_class>