Skip to content

Commit 950e337

Browse files
authored
Ensure deterministic task execution ordering in DRA (#2413) (#2416)
- we push different tasks output into build/distribution - should be not necessary ones we remove osshr compliant maven dra artifacts (cherry picked from commit a724c49)
1 parent f883b31 commit 950e337

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dist/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,21 @@ project.tasks.named('dependencyLicenses', DependencyLicensesTask) {
198198
it.dependencies = project.configurations.licenseChecks
199199
}
200200

201-
202201
tasks.register('copyPoms', Copy) {
203202
BasePluginExtension baseExtension = project.getExtensions().getByType(BasePluginExtension.class);
204203
from(tasks.named('generatePomFileForMainPublication'))
205204
into(new File(project.buildDir, 'distributions'))
206205
rename 'pom-default.xml', "${baseExtension.archivesName.get()}-${project.getVersion()}.pom"
207206
}
208207

208+
tasks.named('collectArtifacts') {
209+
mustRunAfter 'publishMainPublicationToNmcpMainRepository'
210+
}
211+
212+
tasks.named('publishMainPublicationToNmcpMainRepository') {
213+
mustRunAfter 'copyPoms'
214+
}
215+
209216
tasks.named('distribution').configure {
210217
dependsOn 'copyPoms'
211218
}

0 commit comments

Comments
 (0)