|
15 | 15 | import org.gradle.api.attributes.Attribute; |
16 | 16 | import org.gradle.api.attributes.AttributeContainer; |
17 | 17 | import org.gradle.api.file.Directory; |
18 | | -import org.gradle.process.ExecResult; |
19 | 18 |
|
20 | | -import java.io.ByteArrayOutputStream; |
21 | 19 | import java.io.IOException; |
22 | 20 | import java.nio.charset.StandardCharsets; |
23 | 21 | import java.nio.file.Files; |
24 | 22 | import java.nio.file.Path; |
25 | 23 | import java.util.ArrayList; |
26 | | -import java.util.Collections; |
27 | 24 | import java.util.Comparator; |
28 | 25 | import java.util.List; |
29 | 26 | import java.util.regex.Pattern; |
@@ -161,12 +158,12 @@ public int base() { |
161 | 158 | } |
162 | 159 | } |
163 | 160 |
|
164 | | - static Path definitionFilePath(Path resourcesDir, String name) { |
165 | | - return getDefinitionsDirectory(resourcesDir).resolve(name + CSV_SUFFIX); |
| 161 | + static Path definitionFilePath(Directory resourcesDirectory, String name) { |
| 162 | + return getDefinitionsDirectory(resourcesDirectory).getAsFile().toPath().resolve(name + CSV_SUFFIX); |
166 | 163 | } |
167 | 164 |
|
168 | | - static Path latestFilePath(Path resourcesDir, String name) { |
169 | | - return getLatestDirectory(resourcesDir).resolve(name + CSV_SUFFIX); |
| 165 | + static Path latestFilePath(Directory resourcesDir, String name) { |
| 166 | + return getLatestDirectory(resourcesDir).getAsFile().toPath().resolve(name + CSV_SUFFIX); |
170 | 167 | } |
171 | 168 |
|
172 | 169 | static TransportVersionDefinition readDefinitionFile(Path file) throws IOException { |
@@ -222,12 +219,12 @@ static List<TransportVersionReference> readReferencesFile(Path file) throws IOEx |
222 | 219 | return results; |
223 | 220 | } |
224 | 221 |
|
225 | | - static Path getDefinitionsDirectory(Path resourcesDir) { |
226 | | - return resourcesDir.resolve("defined"); |
| 222 | + static Directory getDefinitionsDirectory(Directory resourcesDirectory) { |
| 223 | + return resourcesDirectory.dir(DEFINED_DIR); |
227 | 224 | } |
228 | 225 |
|
229 | 226 | static Directory getLatestDirectory(Directory resourcesDirectory) { |
230 | | - return resourcesDirectory.dir("latest"); |
| 227 | + return resourcesDirectory.dir(LATEST_DIR); |
231 | 228 | } |
232 | 229 |
|
233 | 230 | static Directory getResourcesDirectory(Project project) { |
|
0 commit comments