Deprecate BootJar#getConfigurations

Fixes gh-23527
This commit is contained in:
Andy Wilkinson 2020-10-17 07:53:53 +01:00
parent c4a5a34702
commit 11b5e86ffd
2 changed files with 9 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import java.util.Collections;
import java.util.concurrent.Callable;
import org.gradle.api.Action;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.file.CopySpec;
import org.gradle.api.file.FileCollection;
@ -117,7 +118,14 @@ public class BootJar extends Jar implements BootArchive {
return this.support.createCopyAction(this);
}
/**
* Returns the {@link Configuration Configurations} of the project associated with
* this task.
* @return the configurations
* @deprecated since 2.3.5 in favor of {@link Project#getConfigurations}
*/
@Internal
@Deprecated
protected Iterable<Configuration> getConfigurations() {
return getProject().getConfigurations();
}

View File

@ -347,6 +347,7 @@ class BootJarTests extends AbstractBootArchiveTests<TestBootJar> {
private Iterable<Configuration> configurations = Collections.emptySet();
@Override
@SuppressWarnings("deprecation")
protected Iterable<Configuration> getConfigurations() {
return this.configurations;
}