Merge branch '2.5.x' into 2.6.x

Closes gh-29880
This commit is contained in:
Andy Wilkinson
2022-02-16 14:58:58 +00:00
3 changed files with 164 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,10 +45,12 @@ final class MavenPluginAction implements PluginApplicationAction {
@Override
public void execute(Project project) {
project.getTasks().withType(Upload.class, (upload) -> {
if (this.uploadTaskName.equals(upload.getName())) {
project.afterEvaluate((evaluated) -> clearConfigurationMappings(upload));
}
project.afterEvaluate((evaluated) -> {
project.getTasks().withType(Upload.class).configureEach((upload) -> {
if (this.uploadTaskName.equals(upload.getName())) {
clearConfigurationMappings(upload);
}
});
});
}