File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,7 +119,11 @@ listOf(
119119 val proj = " :minecraft:$version "
120120 include(proj)
121121 project(proj).apply {
122- projectDir = file(" minecraft/versions/$version " )
122+ projectDir = file(" minecraft/versions/$version " ).also {
123+ if (! it.exists() && ! it.mkdirs()) {
124+ throw IllegalStateException (" Could not create project directory: ${it.absolutePath} " )
125+ }
126+ }
123127 buildFileName = " ../../build.gradle.kts"
124128 }
125129 val bootstrapProj = " :bootstrap:bootstrap-$version "
@@ -137,7 +141,11 @@ listOf(
137141 ).contains(version)) {
138142 include(bootstrapProj)
139143 project(bootstrapProj).apply {
140- projectDir = file(" bootstrap/versions/$version " )
144+ projectDir = file(" bootstrap/versions/$version " ).also {
145+ if (! it.exists() && ! it.mkdirs()) {
146+ throw IllegalStateException (" Could not create project directory: ${it.absolutePath} " )
147+ }
148+ }
141149 buildFileName = " ../../build.gradle.kts"
142150 }
143151 }
You can’t perform that action at this time.
0 commit comments