Skip to content

Commit

Permalink
Gradle Plugin: remove configureGroovy
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Mar 17, 2024
1 parent b844343 commit b4f9591
Showing 1 changed file with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension
import org.apache.tools.ant.filters.EscapeUnicode
import org.apache.tools.ant.filters.ReplaceTokens
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.api.Action
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.ConfigurationContainer
import org.gradle.api.artifacts.DependencyResolveDetails
import org.gradle.api.file.DuplicatesStrategy
import org.gradle.api.file.FileCollection
import org.gradle.api.java.archives.Manifest
Expand Down Expand Up @@ -122,8 +120,6 @@ class GrailsGradlePlugin extends GroovyPlugin {

applyDefaultPlugins(project)

configureGroovy(project)

registerToolingModelBuilder(project, registry)

registerGrailsExtension(project)
Expand Down Expand Up @@ -239,23 +235,6 @@ class GrailsGradlePlugin extends GroovyPlugin {
}
}

@CompileStatic
protected void configureGroovy(Project project) {
String groovyVersion = resolveGroovyVersion(project)
if (groovyVersion) {
project.configurations.all({ Configuration configuration ->
configuration.resolutionStrategy.eachDependency({ DependencyResolveDetails details ->
String dependencyName = details.requested.name
String group = details.requested.group
if (group == 'org.apache.groovy' && dependencyName.startsWith('groovy')) {
details.useVersion(groovyVersion)
return
}
} as Action<DependencyResolveDetails>)
} as Action<Configuration>)
}
}

@CompileStatic
protected void configureSpringBootExtension(Project project) {
}
Expand Down Expand Up @@ -361,15 +340,6 @@ class GrailsGradlePlugin extends GroovyPlugin {
grailsVersion
}

protected String resolveGroovyVersion(Project project) {
def groovyVersion = project.findProperty('groovyVersion')

groovyVersion = groovyVersion ?: new GrailsDependenciesDependencyManagement().getGroovyVersion()
groovyVersion = groovyVersion ?: GroovySystem.getVersion()

groovyVersion
}

protected String resolveSpringBootVersion(Project project) {
def springBootVersion = project.findProperty('springBootVersion')

Expand Down

0 comments on commit b4f9591

Please sign in to comment.