Skip to content

Commit

Permalink
fix: remove unnecessary check for plugin id
Browse files Browse the repository at this point in the history
  • Loading branch information
matrei committed Dec 21, 2024
1 parent 4de50df commit e6f4f12
Showing 1 changed file with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,19 @@ class AbstractGroovyTemplatePlugin implements Plugin<Project> {
templateCompileTask.packageName.set(project.name)
templateCompileTask.setSource(project.file("${project.projectDir}/$pathToSource"))
templateCompileTask.dependsOn(tasks.named('classes').get())
project.plugins.withId('org.springframework.boot') {
tasks.withType(Jar).configureEach { Task task ->
if (task.name in ['jar', 'bootJar', 'war', 'bootWar']) {
task.dependsOn(templateCompileTask)
}
}
tasks.named('resolveMainClassName').configure { Task task ->
tasks.withType(Jar).configureEach { Task task ->
if (task.name in ['jar', 'bootJar', 'war', 'bootWar']) {
task.dependsOn(templateCompileTask)
}
}
project.plugins.withId('org.grails.gradle.plugin.core.IntegrationTestGradlePlugin') {
tasks.named('compileIntegrationTestGroovy') { Task task ->
task.dependsOn(templateCompileTask)
}
tasks.named('integrationTest') { Task task ->
task.dependsOn(templateCompileTask)
}
tasks.named('resolveMainClassName').configure { Task task ->
task.dependsOn(templateCompileTask)
}
tasks.named('compileIntegrationTestGroovy').configure { Task task ->
task.dependsOn(templateCompileTask)
}
tasks.named('integrationTest').configure { Task task ->
task.dependsOn(templateCompileTask)
}
}

Expand Down

0 comments on commit e6f4f12

Please sign in to comment.