```configurations.all { resolutionStrategy.eac...
# questions
g
Copy code
configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        // If anything is requesting the old Groovy 3 BOM, force it to Groovy 4
        if (details.requested.group == 'org.codehaus.groovy' && details.requested.name == 'groovy-bom') {
            details.useTarget("org.apache.groovy:groovy-bom:4.0.30")
        }
    }
    
    // Globally exclude the problematic module if it keeps appearing as a transitive dependency
    exclude group: 'org.codehaus.groovy', module: 'groovy-bom'
}