Skip to content

Commit

Permalink
Plugin projects should not have bootRun tasks enabled by default
Browse files Browse the repository at this point in the history
Closes gh-775
  • Loading branch information
rainboyan committed Dec 4, 2024
1 parent 27e4b78 commit cc5d1c3
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import org.gradle.api.tasks.compile.GroovyCompile
import org.gradle.language.jvm.tasks.ProcessResources
import org.gradle.tooling.provider.model.ToolingModelBuilderRegistry
import org.springframework.boot.gradle.tasks.bundling.BootJar
import org.springframework.boot.gradle.tasks.run.BootRun

import grails.util.Environment

Expand All @@ -46,8 +47,8 @@ import org.grails.gradle.plugin.util.SourceSets
* A Gradle plugin for Grails plugins
*
* @author Graeme Rocher
* @author Michael Yan
* @since 3.0
*
*/
@CompileStatic
class GrailsPluginGradlePlugin extends GrailsGradlePlugin {
Expand Down Expand Up @@ -126,9 +127,12 @@ class GrailsPluginGradlePlugin extends GrailsGradlePlugin {
@Override
protected void applySpringBootPlugin(Project project) {
super.applySpringBootPlugin(project)
project.tasks.withType(BootJar) { BootJar bootJar ->
project.tasks.withType(BootJar).configureEach { BootJar bootJar ->
bootJar.enabled = false
}
project.tasks.withType(BootRun).configureEach { BootRun bootRun ->
bootRun.enabled = false
}
}

@CompileDynamic
Expand Down

0 comments on commit cc5d1c3

Please sign in to comment.