Skip to content

Commit

Permalink
Remove superfluous Gradle DSL classes for GraalVM
Browse files Browse the repository at this point in the history
Gradle and Kotlin DSL did the same thing, this condenses it down to
only one class.
  • Loading branch information
mhalbritter committed May 27, 2024
1 parent 0e3cca2 commit 2401e95
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ public final void customize(GradleBuild build) {
if (this.nbtVersion != null) {
build.plugins().add("org.graalvm.buildtools.native", (plugin) -> plugin.setVersion(this.nbtVersion));
}
// Spring Boot plugin
customizeSpringBootPlugin(build);
}

protected void customizeSpringBootPlugin(GradleBuild build) {

}

}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,9 @@ GraalVmMavenBuildCustomizer graalVmMavenBuildCustomizer() {
}

@Bean
@ConditionalOnBuildSystem(value = GradleBuildSystem.ID, dialect = GradleBuildSystem.DIALECT_GROOVY)
GraalVmGroovyDslGradleBuildCustomizer graalVmGroovyDslGradleBuildCustomizer() {
return new GraalVmGroovyDslGradleBuildCustomizer(this.nbtVersion.get());
}

@Bean
@ConditionalOnBuildSystem(value = GradleBuildSystem.ID, dialect = GradleBuildSystem.DIALECT_KOTLIN)
GraalVmKotlinDslGradleBuildCustomizer graalVmKotlinDslGradleBuildCustomizer() {
return new GraalVmKotlinDslGradleBuildCustomizer(this.nbtVersion.get());
@ConditionalOnBuildSystem(GradleBuildSystem.ID)
GraalVmGradleBuildCustomizer graalVmGradleBuildCustomizer() {
return new GraalVmGradleBuildCustomizer(this.nbtVersion.get());
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@
*
* @author Stephane Nicoll
*/
abstract class GraalVmGradleBuildCustomizerTests {

protected abstract GraalVmGradleBuildCustomizer createCustomizer(String nbtVersion);
class GraalVmGradleBuildCustomizerTests {

@Test
void gradleBuildConfigureNativeBuildToolsPlugin() {
GraalVmGradleBuildCustomizer customizer = createCustomizer("1.0.0");
GraalVmGradleBuildCustomizer customizer = new GraalVmGradleBuildCustomizer("1.0.0");
GradleBuild build = createBuild();
customizer.customize(build);
GradlePlugin nbtPlugin = build.plugins()
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 2401e95

Please sign in to comment.