Skip to content

Commit 39f6b48

Browse files
authored
task generateSourceMirror now waits project to compile. (#846)
1 parent de9d94f commit 39f6b48

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

dumper/app/build.gradle

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -205,22 +205,25 @@ tasks.named('distZip') {
205205
}
206206

207207
tasks.register('generateSourceMirror', Copy) {
208-
from {
209-
dependencies.createArtifactResolutionQuery()
210-
.forComponents(
211-
configurations.runtimeClasspath.incoming.resolutionResult
212-
.allDependencies.collect { it.selected.id }
213-
)
214-
.withArtifacts(JvmLibrary, SourcesArtifact)
215-
.execute()
216-
.resolvedComponents
217-
.collectMany {
218-
it.artifactResults
219-
.collect { it.file.path }
220-
}
208+
dependsOn 'compileJava'
209+
doLast {
210+
from {
211+
dependencies.createArtifactResolutionQuery()
212+
.forComponents(
213+
configurations.runtimeClasspath.incoming.resolutionResult
214+
.allDependencies.collect { it.selected.id }
215+
)
216+
.withArtifacts(JvmLibrary, SourcesArtifact)
217+
.execute()
218+
.resolvedComponents
219+
.collectMany {
220+
it.artifactResults
221+
.collect { it.file.path }
222+
}
223+
}
224+
into layout.buildDirectory.dir('mirror/sources')
225+
outputs.dir "mirror/sources"
221226
}
222-
into layout.buildDirectory.dir('mirror/sources')
223-
outputs.dir "mirror/sources"
224227
}
225228

226229
tasks.register('copyGceLauncher', Copy) {

0 commit comments

Comments
 (0)