@@ -32,10 +32,6 @@ plugins {
3232 id ' com.github.johnrengelman.shadow' version ' 8.1.1' apply false
3333}
3434
35- if (verifySettingsGradle()) {
36- throw new GradleException (" Settings has been updated, please re-run task." )
37- }
38-
3935def out = services. get(StyledTextOutputFactory ). create(' an-output' )
4036
4137
@@ -1022,29 +1018,18 @@ static URL availableBuildScriptUrl() {
10221018 new URL (" https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/build.gradle" )
10231019}
10241020
1025- static URL exampleSettingsGradleUrl () {
1021+ static URL availableSettingsGradleUrl () {
10261022 new URL (" https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/settings.gradle" )
10271023}
10281024
1029- boolean verifySettingsGradle () {
1030- def settingsFile = getFile(" settings.gradle" )
1031- if (! settingsFile. exists()) {
1032- println (" Downloading default settings.gradle" )
1033- exampleSettingsGradleUrl(). withInputStream { i -> settingsFile. withOutputStream { it << i } }
1034- return true
1035- }
1036- return false
1037- }
1038-
10391025boolean performBuildScriptUpdate () {
10401026 if (isNewBuildScriptVersionAvailable()) {
10411027 def buildscriptFile = getFile(" build.gradle" )
1028+ def settingsFile = getFile(" settings.gradle" )
10421029 availableBuildScriptUrl(). withInputStream { i -> buildscriptFile. withOutputStream { it << i } }
1030+ availableSettingsGradleUrl(). withInputStream { i -> settingsFile. withOutputStream { it << i } }
10431031 def out = services. get(StyledTextOutputFactory ). create(' buildscript-update-output' )
10441032 out. style(Style.Success ). print (" Build script updated. Please REIMPORT the project or RESTART your IDE!" )
1045- if (verifySettingsGradle()) {
1046- throw new GradleException (" Settings has been updated, please re-run task." )
1047- }
10481033 return true
10491034 }
10501035 return false
0 commit comments