... |
... |
@@ -14,7 +14,7 @@ index 67c9e66d0..6dd949c92 100644 |
14
|
14
|
import javax.inject.Inject
|
15
|
15
|
|
16
|
16
|
import groovy.transform.Immutable
|
17
|
|
-@@ -84,46 +89,13 @@ abstract class NimbusAssembleToolsTask extends DefaultTask {
|
|
17
|
+@@ -84,46 +89,17 @@ abstract class NimbusAssembleToolsTask extends DefaultTask {
|
18
|
18
|
|
19
|
19
|
@TaskAction
|
20
|
20
|
void assembleTools() {
|
... |
... |
@@ -48,8 +48,14 @@ index 67c9e66d0..6dd949c92 100644 |
48
|
48
|
- fmlBinary.get().asFile.setExecutable(true)
|
49
|
49
|
- }
|
50
|
50
|
- visitedFilePaths.add(details.relativePath)
|
51
|
|
-- }
|
52
|
|
-- }
|
|
51
|
++ String nimbusFmlPath = System.getenv("NIMBUS_FML")
|
|
52
|
++ Path source
|
|
53
|
++ if (nimbusFmlPath == null) {
|
|
54
|
++ nimbusFmlPath = System.getProperty("nimbusFml")
|
|
55
|
++ if (nimbusFmlPath == null) {
|
|
56
|
++ throw new GradleException("NIMBUS_FML and property nimbusFml are not defined.")
|
|
57
|
+ }
|
|
58
|
+ }
|
53
|
59
|
-
|
54
|
60
|
- if (visitedFilePaths.empty) {
|
55
|
61
|
- throw new GradleException("Couldn't find any files in archive matching unzip spec: (${unzipSpec.includePatterns.get().collect { "`$it`" }.join(' | ')})")
|
... |
... |
@@ -57,11 +63,8 @@ index 67c9e66d0..6dd949c92 100644 |
57
|
63
|
-
|
58
|
64
|
- if (visitedFilePaths.size() > 1) {
|
59
|
65
|
- throw new GradleException("Ambiguous unzip spec matched ${visitedFilePaths.size()} files in archive: ${visitedFilePaths.collect { "`$it`" }.join(', ')}")
|
60
|
|
-+ String nimbusFmlPath = System.getenv("NIMBUS_FML");
|
61
|
|
-+ if (nimbusFmlPath == null) {
|
62
|
|
-+ throw new GradleException("NIMBUS_FML is not defined.")
|
63
|
|
- }
|
64
|
|
-+ Path source = Paths.get(nimbusFmlPath)
|
|
66
|
+- }
|
|
67
|
++ source = Paths.get(nimbusFmlPath)
|
65
|
68
|
+ Path dest = fmlBinary.get().asFile.toPath()
|
66
|
69
|
+ Files.copy(source, dest, StandardCopyOption.REPLACE_EXISTING)
|
67
|
70
|
}
|