Skip to content

Commit de5ca59

Browse files
committed
Add Gradle version check to prevent usage of deprecated settingsFile property
1 parent cd1177a commit de5ca59

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/groovy/net/researchgate/release/ReleasePlugin.groovy

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ class ReleasePlugin extends PluginHelper implements Plugin<Project> {
104104
startParameter.projectProperties.putAll(project.getGradle().startParameter.projectProperties)
105105
startParameter.projectProperties.put('release.releasing', "true")
106106
startParameter.projectDir = project.projectDir
107+
if (GradleVersion.current() < GradleVersion.version("9.0")) {
108+
// Setting custom settings file for the build has been deprecated.
109+
startParameter.settingsFile = project.getGradle().startParameter.settingsFile
110+
}
107111
startParameter.gradleUserHomeDir = project.getGradle().startParameter.gradleUserHomeDir
108112
buildName = project.name
109113

0 commit comments

Comments
 (0)