class GroovyProjectGenerationDefaultContributorsConfiguration {

	private static final VersionRange GROOVY4 = VersionParser.DEFAULT.parseRange("3.0.0-M2");

	@Bean
	MainApplicationTypeCustomizer<GroovyTypeDeclaration> mainMethodContributor() {
		return (typeDeclaration) -> typeDeclaration.addMethodDeclaration(GroovyMethodDeclaration.method("main")
			.modifiers(Modifier.PUBLIC | Modifier.STATIC)
			.returning("void")
			.parameters(Parameter.of("args", String[].class))
			.body(CodeBlock.ofStatement("$T.run($L, args)", "org.springframework.boot.SpringApplication",
					typeDeclaration.getName())));
	}

	@Bean
	TestApplicationTypeCustomizer<GroovyTypeDeclaration> junitJupiterTestMethodContributor() {<FILL_FUNCTION_BODY>}

	@Bean
	BuildCustomizer<Build> groovyDependenciesConfigurer(ProjectDescription description) {
		return new GroovyDependenciesConfigurer(GROOVY4.match(description.getPlatformVersion()));
	}

	/**
	 * Groovy source code contributions for projects using war packaging.
	 */
	@Configuration
	@ConditionalOnPackaging(WarPackaging.ID)
	static class WarPackagingConfiguration {

		@Bean
		ServletInitializerCustomizer<GroovyTypeDeclaration> javaServletInitializerCustomizer(
				ProjectDescription description) {
			return (typeDeclaration) -> {
				GroovyMethodDeclaration configure = GroovyMethodDeclaration.method("configure")
					.modifiers(Modifier.PROTECTED)
					.returning("org.springframework.boot.builder.SpringApplicationBuilder")
					.parameters(
							Parameter.of("application", "org.springframework.boot.builder.SpringApplicationBuilder"))
					.body(CodeBlock.ofStatement("application.sources($L)", description.getApplicationName()));
				configure.annotations().add(ClassName.of(Override.class));
				typeDeclaration.addMethodDeclaration(configure);
			};
		}

	}

	/**
	 * Configuration for Groovy projects built with Maven.
	 */
	@Configuration
	@ConditionalOnBuildSystem(MavenBuildSystem.ID)
	static class GroovyMavenProjectConfiguration {

		@Bean
		GroovyMavenBuildCustomizer groovyBuildCustomizer() {
			return new GroovyMavenBuildCustomizer();
		}

	}

}

		return (typeDeclaration) -> {
			GroovyMethodDeclaration method = GroovyMethodDeclaration.method("contextLoads")
				.returning("void")
				.body(CodeBlock.of(""));
			method.annotations().add(ClassName.of("org.junit.jupiter.api.Test"));
			typeDeclaration.addMethodDeclaration(method);
		};
	
<no_super_class>