diff --git a/src/main/groovy/net/researchgate/release/ReleasePlugin.groovy b/src/main/groovy/net/researchgate/release/ReleasePlugin.groovy index a8c91163..20c45b9b 100644 --- a/src/main/groovy/net/researchgate/release/ReleasePlugin.groovy +++ b/src/main/groovy/net/researchgate/release/ReleasePlugin.groovy @@ -31,6 +31,7 @@ import org.gradle.api.Task import org.gradle.api.plugins.BasePlugin import org.gradle.api.tasks.GradleBuild import org.gradle.api.tasks.TaskState +import org.gradle.util.GradleVersion class ReleasePlugin extends PluginHelper implements Plugin { @@ -104,7 +105,10 @@ class ReleasePlugin extends PluginHelper implements Plugin { startParameter.projectProperties.putAll(project.getGradle().startParameter.projectProperties) startParameter.projectProperties.put('release.releasing', "true") startParameter.projectDir = project.projectDir - startParameter.settingsFile = project.getGradle().startParameter.settingsFile + if (GradleVersion.current() < GradleVersion.version("9.0")) { + // Setting custom settings file for the build has been deprecated. + startParameter.settingsFile = project.getGradle().startParameter.settingsFile + } startParameter.gradleUserHomeDir = project.getGradle().startParameter.gradleUserHomeDir buildName = project.name